help me with nexton

Hello, i have problem with code.
I use Arduino UNO board, Nextion display, 8 relay, DHT11 sensor.

I have working sketch for control relay with Nexton display:

#include <SoftwareSerial.h>
#include <Nextion.h>

#define SI !1 
#define NO !0

byte rele[] = {4,5,6,7,8,9,2,3}; //Relay 1,2,3,4,5,6,7,8
const int ledPin = 13;    //LED pin
const byte ReceivePin = 11;
const byte TransmtPin = 10;
int i;
int recv; int trxv;
String message;

SoftwareSerial nextion(ReceivePin, TransmtPin);
Nextion myNextion(nextion, 9600);

boolean button1State = 0; boolean button2State = 0; boolean button3State = 0; boolean button4State = 0;
boolean button5State = 0; boolean button6State = 0; boolean button7State = 0; boolean button8State = 0;

void setup()
{
  Serial.begin(9600);
  myNextion.init();
  
 pinMode(ledPin, OUTPUT);
  for (i = 0; i < 8; i++) 
   { pinMode((rele[i]),OUTPUT); digitalWrite((rele[i]),NO); }

  while (!Serial) {};

  } 

void loop() 
{
  // put your main code here, to run repeatedly:

  message = myNextion.listen(); //check for message
  if (message !="") { Serial.println(message);}
if (message == "65 1 2 0 ffff ffff ffff") {digitalWrite((rele[0]),button1State); button1State = !(button1State); }
if (message == "65 1 3 0 ffff ffff ffff") {digitalWrite((rele[1]),button2State); button2State = !(button2State); }
if (message == "65 1 4 0 ffff ffff ffff") {digitalWrite((rele[2]),button3State); button3State = !(button3State); }
if (message == "65 1 5 0 ffff ffff ffff") {digitalWrite((rele[3]),button4State); button4State = !(button4State); }
if (message == "65 2 2 0 ffff ffff ffff") {digitalWrite((rele[4]),button5State); button5State = !(button5State); }
if (message == "65 2 3 0 ffff ffff ffff") {digitalWrite((rele[5]),button6State); button6State = !(button6State); }
if (message == "65 2 4 0 ffff ffff ffff") {digitalWrite((rele[6]),button7State); button7State = !(button7State); }
if (message == "65 2 5 0 ffff ffff ffff") {digitalWrite((rele[7]),button8State); button8State = !(button8State); }

   
}

And i have second sketch, this sketch send temperature to display:

#include <SoftwareSerial.h>
#include <Nextion.h>
#include "DHT.h"

#define DHTPIN 5
#define DHTTYPE DHT11   // DHT 11 
DHT dht(DHTPIN, DHTTYPE);

SoftwareSerial nextion(2, 3);// Nextion TX to pin 2 and RX to pin 3 of Arduino

Nextion myNextion(nextion, 9600); //create a Nextion object named myNextion using the nextion serial port @ 9600bps

void setup() {
  Serial.begin(9600);
  myNextion.init();
dht.begin();
}

void loop() {

  float h = dht.readHumidity();
  float t = dht.readTemperature();

  myNextion.setComponentText("t0", String(t));
  delay(1000);

  myNextion.setComponentText("t1", String(h));
  delay(1000);
  
}

But i can’t do one sketch from this 2 sketches, please, help.

If i try to do one sketch, i can see temperature, but i can’t control relay.
Example of my code where relays don’t work:

#include <SoftwareSerial.h>
#include <Nextion.h>
#include "DHT.h"

#define SI !1 
#define NO !0
#define DHTPIN 5
#define DHTTYPE DHT11   // DHT 11 
DHT dht(DHTPIN, DHTTYPE);



byte rele[] = {4,15,6,7,8,9,2,3}; //Relay 1,2,3,4,5,6,7,8
const int ledPin = 13; //Led
int i;
int recv; int trxv;
String message;
const byte ReceivePin = 11;
const byte TransmtPin = 10;

SoftwareSerial nextion(ReceivePin,TransmtPin);
Nextion myNextion(nextion,9600);

boolean button1State = 0; boolean button2State = 0; boolean button3State = 0; boolean button4State = 0;
boolean button5State = 0; boolean button6State = 0; boolean button7State = 0; boolean button8State = 0;


void setup() {

  Serial.begin(9600);
  myNextion.init();
  dht.begin();


pinMode(ledPin, OUTPUT); 
  for (i = 0; i < 8; i++) 
   { pinMode((rele[i]),OUTPUT); digitalWrite((rele[i]),NO); }

   while (!Serial) {};
}

void loop() {

  message = myNextion.listen(); //check for message
if (message !="") { Serial.println(message);}
if (message == "65 1 2 0 ffff ffff ffff") {digitalWrite((rele[0]),button1State); button1State = !(button1State); }
if (message == "65 1 3 0 ffff ffff ffff") {digitalWrite((rele[1]),button2State); button2State = !(button2State); }
if (message == "65 1 4 0 ffff ffff ffff") {digitalWrite((rele[2]),button3State); button3State = !(button3State); }
if (message == "65 1 5 0 ffff ffff ffff") {digitalWrite((rele[3]),button4State); button4State = !(button4State); }
if (message == "65 2 2 0 ffff ffff ffff") {digitalWrite((rele[4]),button5State); button5State = !(button5State); }
if (message == "65 2 3 0 ffff ffff ffff") {digitalWrite((rele[5]),button6State); button6State = !(button6State); }
if (message == "65 2 4 0 ffff ffff ffff") {digitalWrite((rele[6]),button7State); button7State = !(button7State); }
if (message == "65 2 5 0 ffff ffff ffff") {digitalWrite((rele[7]),button8State); button8State = !(button8State); }
else{
  float t = dht.readTemperature();
  myNextion.setComponentText("t0", String(t));
  message="1";
}
  
}

Please help me create one working sketch :confused:
Sorry for my english :wink: