problem displaying on a Nextion screen

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
cyclone
Normal user
Posts: 4
Joined: 06 Mar 2020, 12:43

problem displaying on a Nextion screen

#1 Post by cyclone » 06 Mar 2020, 13:47

Dear all;

I'm developing a small system control used to 'control' my garden shelter, this system is based on an ESP with Esp Easy R148 and a Nextion display screen (in fact the chinese version of the Nextion).

Two DS18B20 probes are connected to the ESP, and temperature is monitored without any problems,and send to domoticz again without any problem.

The problem occurs when I'm trying to send the Temperature value directly on the screen, inserting commands into the Line
nextion-line.JPG
nextion-line.JPG (18.23 KiB) Viewed 2548 times
, I tried different combinations like t1.txt="[DS18B20#Temperature]", without any success, the t0 text is displaying [DS18B20#Temperature] but not the right value...

After I tried to display some informations, using the command : nextion,t1.txt="%systime%" or nextion,t1.txt="%ip%" expecting to have on the display or the time or the ip address of the esp, as a result on the screen I've : %systime% or %ip% displayed....

has anyone ever had this problem? what are the right commands ?

I'm using right now the Release R148 for esp easy, do I've to switch to ESP mega ?

Many thanks for your help !

Wiki
Normal user
Posts: 185
Joined: 23 Apr 2018, 17:55

Re: problem displaying on a Nextion screen

#2 Post by Wiki » 06 Mar 2020, 17:10

I am running two nextion with mega 20191208 development attached to wemos d1mini witbout problems, but I am sending the values out of rules like
Nextion,page0.t1.txt="[Sensor#value]"

TD-er
Core team member
Posts: 2342
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: problem displaying on a Nextion screen

#3 Post by TD-er » 06 Mar 2020, 17:44

Not sure if those system variables were present in the R148 build.

User avatar
ThomasB
Normal user
Posts: 614
Joined: 17 Jun 2018, 20:41
Location: USA

Re: problem displaying on a Nextion screen

#4 Post by ThomasB » 06 Mar 2020, 17:57

Not sure if those system variables were present in the R148 build.
Good catch. R148 was released about the same time that the Titanic disaster occurred. Time to upgrade.

And besides upgrading to the latest Mega release, I HIGHLY recommend you use the plugin's new Hardware Serial feature. My opinion is that this is essential to achieving reliable touch screen entry. But if the ESPEasy application is only for displaying/updating text (no touch entry) then soft serial is OK. See the wiki for details to using hardware serial.

- Thomas

cyclone
Normal user
Posts: 4
Joined: 06 Mar 2020, 12:43

Re: problem displaying on a Nextion screen

#5 Post by cyclone » 08 Mar 2020, 22:10

Dears ;

many thanks for your answer, I'm trying to installa this version 20191208, and it's OK right now, but the "display Nextion" is not in the device list... so

my stupid question is now how to install this ' device' into the ESP ?

Many thanks

TD-er
Core team member
Posts: 2342
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: problem displaying on a Nextion screen

#6 Post by TD-er » 08 Mar 2020, 22:31

Have you tried the "testing" builds?
See: https://espeasy.readthedocs.io/en/lates ... al-plugins

cyclone
Normal user
Posts: 4
Joined: 06 Mar 2020, 12:43

Re: problem displaying on a Nextion screen

#7 Post by cyclone » 08 Mar 2020, 23:41

many thanks ! now I've to setup the ESP !

cyclone
Normal user
Posts: 4
Joined: 06 Mar 2020, 12:43

Re: problem displaying on a Nextion screen

#8 Post by cyclone » 10 Mar 2020, 23:42

OK, now it's possible to send the temperature on the main screen, this part is OK, but a new problem occurs, it's impossible to receive the Idx - identification number - when a button is pressed on the display.

This was working with R148 but with the new version, using the same pins (D2 & D4), I cannot succeed to have this feedback.

Is with this new version mandatory to use specific pins ? or make a setup particular ?

User avatar
ThomasB
Normal user
Posts: 614
Joined: 17 Jun 2018, 20:41
Location: USA

Re: problem displaying on a Nextion screen

#9 Post by ThomasB » 11 Mar 2020, 00:40

The Nextion plugin has changed. So please review the wiki.
https://www.letscontrolit.com/wiki/inde ... le=Nextion

You can use the serial log and see the touch data received from the Nextion. Check the values to confirm they are being received (and are correct).

BTW, you're using SoftSerial to communicate with the Nextion. In the Mega release the SoftSerial does not work well for decoding touch actions due to interrupt latency corrupting the serial byte decoding. This can be resolved by using the Hardware Serial feature that is available in the Nextion Plugin. See the wiki for the requirements.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests