Nextion display plugin
Moderators: grovkillen, Stuntteam, TD-er
Re: Nextion display plugin
Which speed? Default setting of the Nextion display as well as the Nextion plugin is set to 9600.
To use 115200 baud I have added to the preinitialize event of page0 "baud=115200"
If you do so, you have to change the baud rate in your Wemos Devices Nextion from 9600 to 115200.
To use 115200 baud I have added to the preinitialize event of page0 "baud=115200"
If you do so, you have to change the baud rate in your Wemos Devices Nextion from 9600 to 115200.
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
I want to order a Nextion display so i can use it on my BBQ controller. My question is does this plugin also works with the improved nextion display??
Re: Nextion display plugin
I have confirmed compatibility with the enhanced version. My evaluation used a NX4024K032-011.My question is does this plugin also works with the improved nextion display??
- Thomas
Re: Nextion display plugin
I haven't updated my ESPs running my nextions for a long time since they were working ok. I used a recent release and now a ton of stuff isn't working right
how do I sent commands to the nextion now?
it used to be just as simple as
nextion,dim=5
but that no longer is the case, how do i do this now?
tried NEXTION,
Nextion
nextion.
nothing works.
plugin is receiving button presses
***Edit*** it's the name of the task now, in my case "lr"
You guys could make a note of that?
how do I sent commands to the nextion now?
it used to be just as simple as
nextion,dim=5
but that no longer is the case, how do i do this now?
tried NEXTION,
Nextion
nextion.
nothing works.
plugin is receiving button presses
***Edit*** it's the name of the task now, in my case "lr"
You guys could make a note of that?
- Attachments
-
- 1.PNG (6.25 KiB) Viewed 346317 times
-
- nextion.PNG (5.15 KiB) Viewed 346318 times
Re: Nextion display plugin
I tested the latest version (mega-20181207) and no issues were observed.
If your nextion device is named lr then the command used in your example would need to be
- Thomas
If your nextion device is named lr then the command used in your example would need to be
Code: Select all
lr,dim=5
Re: Nextion display plugin
If this is ok then the scheme is on https://www.letscontrolit.com/wiki/inde ... le=Nextion is not good.

This scheme shows that D7 (RXD2) na Nodemcu connected with NEXTION RX.
Re: Nextion display plugin
Hi,
RXD2 has to be connected to TX Nextion, TXD2 to RX Nextion.
I don't use a transistor due to the fact that the signals of the Nextion are 3.3V.
RXD2 has to be connected to TX Nextion, TXD2 to RX Nextion.
I don't use a transistor due to the fact that the signals of the Nextion are 3.3V.
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
@homerruma: Thank you for reporting the error. The image has been corrected.
@wiki: Nextion and ESP8266 are indeed 3.3V devices. But the transistor is not intended to convert the logic level. It is a buffer that is used to ensure that the ESP8266 can boot-up. Without it there is a strong chance the ESP8266 will hang on a reset.
- Thomas
@wiki: Nextion and ESP8266 are indeed 3.3V devices. But the transistor is not intended to convert the logic level. It is a buffer that is used to ensure that the ESP8266 can boot-up. Without it there is a strong chance the ESP8266 will hang on a reset.
- Thomas
Re: Nextion display plugin
As I see on the link https://www.letscontrolit.com/wiki/inde ... le=Nextion the image is not corrected.
Still stands RX Nodemcu at RX Nektion.
nextion2 by homerruma3, on Flickr
Still stands RX Nodemcu at RX Nektion.

Re: Nextion display plugin
Oh yes, you are right, now I remember.
Sometimes there are some benefits in the procedure first think before write. Thanks for the reminder...
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
Hmm, I see the correct drawing in my browser.As I see on the link https://www.letscontrolit.com/wiki/inde ... le=Nextion the image is not corrected.
Still stands RX Nodemcu at RX Nektion.
Try refreshing your browser cache to regenerate the Nextion Wiki page. Usually the F5 key will do a refresh (works in FireFox). A refresh should populate the recently uploaded image.
- Thomas
Re: Nextion display plugin
I've refreshed the page. Now I closed it and reopened it, I can not see the changes.
Definitely everything is old.
Ask the third party to confirm.
Definitely everything is old.
Ask the third party to confirm.
Re: Nextion display plugin
Hopefully someone in the audience can confirm the wiki page has the new drawing.
I retested the Nextion wiki page using three different WIN10 PC workstations. And I viewed the page using FF, Edge, IE, and chrome browsers. They all show the latest image.
Here's a screenshot:
I have an idea. Try this test: Go to this wiki image folder: https://www.letscontrolit.com/wiki/inde ... r1_450.jpg
You will see two images in the file history. The original (depreciated) July-30-2018 and the corrected image from today, Jan-10-2019. The corrected image is the one that is targeted by the Nextion Wiki page. If you don't see both images then that would indicate that there is a wiki server cache issue; Check again in a few hours.
- Thomas
I retested the Nextion wiki page using three different WIN10 PC workstations. And I viewed the page using FF, Edge, IE, and chrome browsers. They all show the latest image.
Here's a screenshot:
I have an idea. Try this test: Go to this wiki image folder: https://www.letscontrolit.com/wiki/inde ... r1_450.jpg
You will see two images in the file history. The original (depreciated) July-30-2018 and the corrected image from today, Jan-10-2019. The corrected image is the one that is targeted by the Nextion Wiki page. If you don't see both images then that would indicate that there is a wiki server cache issue; Check again in a few hours.
- Thomas
Re: Nextion display plugin
To refresh chrome's cache you should hold Ctrl and press F5.
https://www.getfilecloud.com/blog/2015/ ... DfeN817kaY
- Thomas
https://www.getfilecloud.com/blog/2015/ ... DfeN817kaY
- Thomas
Re: Nextion display plugin
Thank you.
- VernonBriz
- New user
- Posts: 1
- Joined: 21 Mar 2019, 12:30
Re: Nextion display plugin
Hi! I understand that I may not be in the subject, but I would advise you to use the serial to ethernet connector https://serial-over-ethernet.com program, since It will be more formatted and better. During the data transfer period, you will receive a full signaling branch.ThomasB wrote: ↑31 Oct 2018, 02:40 I've never used the Ser2Net plugin, but maybe it could be used to assist with flashing the Nextion? Or maybe a spinoff of Ser2Net that has been altered to support Nextion's hardware serial wiring scheme. Minor code tweaks shouldn't be a problem, but a major code rewrite would be a deal killer for me.
Ideally we would need a virtual com port on our developer PC that the Nextion IDE could use to redirect its com port to TCP for flashing. Something like this (randomly found with Google):
https://www.hvv-group.com/softwera/hw-v ... erial-port
It would be great if a Nextion plugin user that has experience with Ser2Net would chime in and offer some insight on this idea.
- Thomas
Peace
Vernon
Last edited by VernonBriz on 06 Sep 2019, 12:43, edited 1 time in total.
Re: Nextion display plugin
hey - do any of you guys using a nextion notice that sometimes you press the screen and it reacts but the ESP doesn't seem to register the press?
is this a software/hardware serial issue - as in, if using software serial the ESP misses the transmission from the Nextion?
is this a software/hardware serial issue - as in, if using software serial the ESP misses the transmission from the Nextion?
Re: Nextion display plugin
It's a known issue with soft serial. The problem should not occur if you are using hardware serial with the Nextion Plugin.is this a software/hardware serial issue - as in, if using software serial the ESP misses the transmission from the Nextion?
Top
- Thomas
Re: Nextion display plugin
Using softserial was no way to get the communication reliable. I disabled the serial log to get the standard RX/TX pins of my Wemos D1 free, connected the Nextion and configured the Nextion plugin accordingly, set to 57600 bd, no playing around with transistor, at least rock solid stable.
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
great :\ now i need to order new boards... i have a pile of "hasp" boards i had made quite a while ago before hardware serial came along...
Re: Nextion display plugin
is there further development? The nextion works for me but better integration with domoticz wood be great
Re: Nextion display plugin
Various people worked on this plugin, based on the work of majklovec.
ThomasB was the last person to make major improvements.
Unfortunately it is still in the Test state and it realy deserves to go into the next level.
Although I made the first rough version of what it is right now, based on the work of majklovec, I am not skilled enough to get it to that level.
So I realy hope someone else (@ThomasB?) will, as the plugin works great for me.
ThomasB was the last person to make major improvements.
Unfortunately it is still in the Test state and it realy deserves to go into the next level.
Although I made the first rough version of what it is right now, based on the work of majklovec, I am not skilled enough to get it to that level.
So I realy hope someone else (@ThomasB?) will, as the plugin works great for me.
Re: Nextion display plugin
@BertB
What do you think is needed to get it to "the next level" ?
What do you think is needed to get it to "the next level" ?
Re: Nextion display plugin
I will think this over.
Re: Nextion display plugin
I can work very well with this plugin as it is. Maybe some more line would be nice to have.
Sending data to a controller is not realy required. All event handling is taken care of in rules. Unless you want to fetch the data in a script on something like Domoticz. I only use it for debuging, by sending the data to a text box.
Most important update would be the migration to the non-test status.
Re: Nextion display plugin
Well as easy as that sounds (removing a word "testing" and moving a define + updating documentation), it may be more difficult than you would think.
As you may have noticed, the last number of builds were quite a bit larger than before.
Almost all are now approaching the max. a build can be.
I am working hard to either get the size down, or add a dynamic way to generate just the build you need.
As soon as we found a way for it, I can move the plugin to 'normal'.
But it may even be there is no "normal" anymore, if the user defined build is ready

Re: Nextion display plugin
I already guessed it wasn't that easy.TD-er wrote: ↑05 Sep 2019, 19:50Well as easy as that sounds (removing a word "testing" and moving a define + updating documentation), it may be more difficult than you would think.
As you may have noticed, the last number of builds were quite a bit larger than before.
Almost all are now approaching the max. a build can be.
I am working hard to either get the size down, or add a dynamic way to generate just the build you need.
As soon as we found a way for it, I can move the plugin to 'normal'.
But it may even be there is no "normal" anymore, if the user defined build is ready![]()
Well, I am a patient guy.
Re: Nextion display plugin
I am running the Nextion now for almost one year and it is working perfectly for me. The last improvement was to use a Wemos D1 pro with external antenna to get a reliable Wifi communication. But that is not related to the plugin.
Currently I am displaying the data of 12 sensors spread all over in my house and being able to switch 10 different devices, displaying their status independently from where they were switched (using the display, switched by Domoticz or switched nanually by button).
My only problem is that I am running out of space for more rules. So I am waiting for he new rules engine to come.
I am fine with the test-status and can wait for a change of its status patiently, too.
And many Thanks to everyone who made this plugin available and running.
Currently I am displaying the data of 12 sensors spread all over in my house and being able to switch 10 different devices, displaying their status independently from where they were switched (using the display, switched by Domoticz or switched nanually by button).
My only problem is that I am running out of space for more rules. So I am waiting for he new rules engine to come.
I am fine with the test-status and can wait for a change of its status patiently, too.
And many Thanks to everyone who made this plugin available and running.
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
Hi!
I try to make a smart thermostat step by step. I use an ESP8266 with a Nextion 3,5" basic display, DHT22 sensor and 5V relay. Now I'm able to display measured values and time on the display. Unfortunately I can't figure out, how to get the setpoint from the Nextion to the ESPEasy dummy variable. I use a numeric valie, which is set by screen button press. I want to send or get this value on a dummy variable, then display it on Nextion. So it is sure, that the displayed value is set on the ESP. Should I use the Nextion Command Statements, or the rules? What is the syntax? Or do you have another solution for this problem / application (thermostat)
Thank you!
I try to make a smart thermostat step by step. I use an ESP8266 with a Nextion 3,5" basic display, DHT22 sensor and 5V relay. Now I'm able to display measured values and time on the display. Unfortunately I can't figure out, how to get the setpoint from the Nextion to the ESPEasy dummy variable. I use a numeric valie, which is set by screen button press. I want to send or get this value on a dummy variable, then display it on Nextion. So it is sure, that the displayed value is set on the ESP. Should I use the Nextion Command Statements, or the rules? What is the syntax? Or do you have another solution for this problem / application (thermostat)
Thank you!
Re: Nextion display plugin
I use ESPEasy rules for touch buttons that MQTT to OpenHAB. Some Nextion buttons send a single var (idx). Others have two (idx and value). My rule set is like this:
I use the Nextion device command statements for periodic events. For example, the Nextion display has a RSSI bargraph that is refreshed every 10 secs: The device statement is:
This statement uses serial TXD to write the rssi value (0-100) to the attached Nextion screen.
- Thomas
Code: Select all
on NEXTION#idx do
if [NEXTION#idx]>=10 and [NEXTION#idx]<=30 // Touch events for various Washer & Dryer controls
Publish %sysname%/NEXTION/idx,[NEXTION#idx]
endif
if [NEXTION#idx]>=500 // Default Nextion Touch Events
Publish %sysname%/NEXTION/idx,[NEXTION#idx]
Publish %sysname%/NEXTION/value,[NEXTION#value]
endif
endon
Code: Select all
page0.j1.val=rssibar
- Thomas
Re: Nextion display plugin
Hi,wchpikus wrote: ↑09 Jun 2017, 07:04 Hi
I'm new on this forum,so hello.
I have nextion lcd and i trying send to them some data using lua script.
I saw examples to this,but only using arduino software..i like to use only esp and lua.
One thing is hard to do,mayby someone has solution.
I have to send 3x 0xff data to end transmission.
In lua to send hex command is write(0,0xff,0xff,0xff)
Now i have to split this with print command,but it must be one command e.g. print("t0.txt=/"test/""....and here send hex data)
If i send hex in next line,to the end of print commant i got /r/n so this metod is not ok.
How to send some hex data inside the print command?
Variable,table or using function inside?
The string must look this:
"t0="test"0xff 0xff 0xff (0xff='255' in asci,11111111 in binary).
Regards
Anyone has already done this ?, i.e send a string data like a word from Nextion to Espeasy ?
I tried with some print...etc on the Nextion but it didn't work at all and also with convertion hex/bin.
Tks for the help.
Re: Nextion display plugin
String data not supported. Up to two numerical data values can be sent in a Nextion print command. The numerical data can represent button press states or any other activity that is important to you. ESPEasy Rules can convert the numeric value(s) to do whatever action you need.Anyone has already done this ?, i.e send a string data like a word from Nextion to Espeasy ?
- Thomas
Re: Nextion display plugin
Ok thanks.
I hope they will update the Nextion to support it.
I hope they will update the Nextion to support it.
Re: Nextion display plugin
Just curious why you need to send text messages (strings) since Nextion is intended to send numeric button/control state values. ESPEasy has a rule engine that will act on them and perform your custom events, including sending string messages to your controller. This allows you to move the event processing onto the local host (ESPEasy), which is a traditional way to use a Nextion touch screen display.I hope they will update the Nextion to support it.
And keep in mind that to change a text message in a Nextion touch display requires a SD card or direct USB connection. Changing a text message in a ESPEasy rule can be done by WiFi OTA. So using numeric codes in Nextion, and avoiding string messages, is a significant advantage in a Nextion equipped ESPEasy installation.
- Thomas
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: Nextion display plugin
hi Thomas

are you talking about changing the text which is displayed in a textfield or a button at the nextion display ?
For my arduinos i use this commands over serial which works perfect, no SD card, no usb connection:
Code: Select all
sendCommand("tid7.pic=156");
tid7.setText("Aufzeichnung");
sendCommand("tid8.pic=155");
tid8.setText("Fahrt Ende");
by the way, will it be possible to send string messages to the nextion display ?
since the nextion is an integer device i can only send a float value as string.
or is there another solution how to display float values at the nextion ?
Have a great day

"the flat earth society has members all around the globe"
Re: Nextion display plugin
Sorry for the confusion. I was talking about having the NEXTION sending a text string to ESPEasy (not supported in ESPEasy), whereas you are sending the string from ESPEasy to Nextion (supported in ESPEasy).are you talking about changing the text which is displayed in a textfield or a button at the nextion display ?
Sending text strings to Nextion is supported. For example, here's just a small sample of the messages I send to one of mine that include values:by the way, will it be possible to send string messages to the nextion display ?
Code: Select all
NEXTION,'page7.t_time.txt="Time %syshour_0%:%sysmin_0%:%syssec_0% "'
NEXTION,'page8.t_ram.txt="Free Ram [FREERAM#ram]"'
NEXTION,'page8.t_load.txt="System Load [SYSLOAD#load]%"'
Re: Nextion display plugin
Hi there. Guys i need help. I have WEMOS D1 mini and NExtion 2.4 display. So i decided to create Thermostat which could send command to domoticz and set temp value from touchcreen with 0.5 scale, but it taken so many time and i still can`t figue it out how to make it. I have 2 buttons on display Up and Down once pushing on it should increase or decrease temperature by 0.5. Pls give an advise how i could make it!
Re: Nextion display plugin
I can help review your wiring and ESPEasy settings if the Nextion display isn't communicating with your Wemos D1 mini. But I don't use domoticz so I can't help with the Nextion commands or ESPEasy rules.
- Thomas
- Thomas
Re: Nextion display plugin
Thx Thomas, but it working well, wirring it`s not problem for me.
Just searching solution, how to increment by 0.5
va0.val++
if(va0.val>25)
{
va0.val=15
}
cov va0.val,t1.txt,0
print "|u,i230,n,s"
print t1.txt
printh 0a
Re: Nextion display plugin
Just let the Wemos do the work of calculating the 0.5 values. Something like:
Rule in ESPEasy
Code: Select all
va0.val=va0.val+5
if(va0.val>250)
{
va0.val=150
}
print "|u,i230,n,s"
print va0.val
printh 0a
Code: Select all
On Nextion#Idx=230
%v1%=[Nextion#value]/10
//Send value to Domoticz however you want
Nextion.page0.t1.txt="%v1%"
EndOn
Last edited by Wiki on 26 Jan 2021, 11:52, edited 1 time in total.
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
Don't use %v1%=[Nextion#value]/10
But use the "let" command for this:
But use the "let" command for this:
Code: Select all
let,1,[Nextion#value]/10
Re: Nextion display plugin
Erm, yes, of course, sorry, my old brain just didn't remember the needs of ESPEasy at the momentTD-er wrote: ↑26 Jan 2021, 11:48 Don't use %v1%=[Nextion#value]/10
But use the "let" command for this:Code: Select all
let,1,[Nextion#value]/10
Code: Select all
pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $
Re: Nextion display plugin
TD-er wrote: ↑26 Jan 2021, 11:48 Don't use %v1%=[Nextion#value]/10
But use the "let" command for this:Code: Select all
let,1,[Nextion#value]/10
Thank you very much Both of YOUWiki wrote: ↑26 Jan 2021, 11:46 Just let the Wemos do the work of calculating the 0.5 values. Something like:
Rule in ESPEasyCode: Select all
va0.val=va0.val+5 if(va0.val>250) { va0.val=150 } print "|u,i230,n,s" print va0.val printh 0a
Code: Select all
On Nextion#Idx=230 %v1%=[Nextion#value]/10 //Send value to Domoticz however you want Nextion.page0.t1.txt="%v1%" EndOn
Re: Nextion display plugin
I`ve found this rules for ESPeasy. How to adopt this in Nextion, if it possible?Wiki wrote: ↑26 Jan 2021, 11:55Erm, yes, of course, sorry, my old brain just didn't remember the needs of ESPEasy at the momentTD-er wrote: ↑26 Jan 2021, 11:48 Don't use %v1%=[Nextion#value]/10
But use the "let" command for this:Code: Select all
let,1,[Nextion#value]/10
Code: Select all
on valuedown do
if [thermTEST#getLevel]>15
config,task,thermTEST,setlevel,[thermTEST#getLevel]-0.5
endif
endon
on valueup do
if [thermTEST#getLevel]<27
config,task,thermTEST,setlevel,[thermTEST#getLevel]+0.5
endif
endon
Re: Nextion display plugin
The rules you refer to change the setpoint (temperature threshold) value for the ThermOLED plugin, so I wouldn't know how to relate that to the Nextion display? Previous rules you have used are sufficient to display values on a Nextion, I'd assume.
/Ton (PayPal.me)
Re: Nextion display plugin
Ah, the Level plugin. But still nothing specific to the Nextion.
For the Level control you can react on a sensor value changing from a specific threshold (hysteresis). You would need a rule like:
It can be used to display a warning on the Nextion (or any other type of output, like a buzzer, LED, OLED, or send an email).
For the Level control you can react on a sensor value changing from a specific threshold (hysteresis). You would need a rule like:
Code: Select all
on Level#Output do
if %eventvalue% = 1
// value within range
else
// value outside set range
endif
endon
/Ton (PayPal.me)
Who is online
Users browsing this forum: No registered users and 20 guests