Nextion display plugin

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Wiki
Normal user
Posts: 272
Joined: 23 Apr 2018, 17:55

Re: Nextion display plugin

#451 Post by Wiki » 21 Nov 2018, 21:51

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.

frank
Normal user
Posts: 85
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Nextion display plugin

#452 Post by frank » 25 Nov 2018, 13:03

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??

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

Re: Nextion display plugin

#453 Post by ThomasB » 25 Nov 2018, 18:11

My question is does this plugin also works with the improved nextion display??
I have confirmed compatibility with the enhanced version. My evaluation used a NX4024K032-011.

- Thomas

frank
Normal user
Posts: 85
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Nextion display plugin

#454 Post by frank » 25 Nov 2018, 18:24

ThomasB wrote:
25 Nov 2018, 18:11
My question is does this plugin also works with the improved nextion display??
I have confirmed compatibility with the enhanced version. My evaluation used a NX4024K032-011.

- Thomas
great thx

waspie
Normal user
Posts: 119
Joined: 09 Feb 2017, 19:35

Re: Nextion display plugin

#455 Post by waspie » 10 Dec 2018, 03:51

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?
Attachments
1.PNG
1.PNG (6.25 KiB) Viewed 6571 times
nextion.PNG
nextion.PNG (5.15 KiB) Viewed 6572 times

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

Re: Nextion display plugin

#456 Post by ThomasB » 10 Dec 2018, 05:43

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

Code: Select all

lr,dim=5
- Thomas

homerruma
Normal user
Posts: 14
Joined: 21 Feb 2017, 12:48

Re: Nextion display plugin

#457 Post by homerruma » 10 Jan 2019, 14:28

waspie wrote:
25 Jul 2018, 18:03
to take advantage of H/W serial using the pin swap option it needs to be wired like this, correct?

NextionHwSerialPinout1.jpg
If this is ok then the scheme is on https://www.letscontrolit.com/wiki/inde ... le=Nextion is not good.
Image

This scheme shows that D7 (RXD2) na Nodemcu connected with NEXTION RX.

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

Re: Nextion display plugin

#458 Post by Wiki » 10 Jan 2019, 16:52

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.

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

Re: Nextion display plugin

#459 Post by ThomasB » 10 Jan 2019, 17:10

@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

homerruma
Normal user
Posts: 14
Joined: 21 Feb 2017, 12:48

Re: Nextion display plugin

#460 Post by homerruma » 10 Jan 2019, 18:28

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.

Imagenextion2 by homerruma3, on Flickr

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

Re: Nextion display plugin

#461 Post by Wiki » 10 Jan 2019, 20:50

ThomasB wrote:
10 Jan 2019, 17:10
....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.
Oh yes, you are right, now I remember.

Sometimes there are some benefits in the procedure first think before write. Thanks for the reminder...

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

Re: Nextion display plugin

#462 Post by ThomasB » 11 Jan 2019, 00:01

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.
Hmm, I see the correct drawing in my browser.

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

homerruma
Normal user
Posts: 14
Joined: 21 Feb 2017, 12:48

Re: Nextion display plugin

#463 Post by homerruma » 11 Jan 2019, 00:13

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.

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

Re: Nextion display plugin

#464 Post by ThomasB » 11 Jan 2019, 00:38

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:
nextion_screenshot.jpg
nextion_screenshot.jpg (176.44 KiB) Viewed 6324 times

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

homerruma
Normal user
Posts: 14
Joined: 21 Feb 2017, 12:48

Re: Nextion display plugin

#465 Post by homerruma » 11 Jan 2019, 00:56

This time, Chrome vs Firefox
Imagechrome vs firefox by homerruma3, on Flickr

homerruma
Normal user
Posts: 14
Joined: 21 Feb 2017, 12:48

Re: Nextion display plugin

#466 Post by homerruma » 11 Jan 2019, 00:59

Yes, it's corrected
Imagenextion file history by homerruma3, on Flickr

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

Re: Nextion display plugin

#467 Post by ThomasB » 11 Jan 2019, 01:08

To refresh chrome's cache you should hold Ctrl and press F5.
https://www.getfilecloud.com/blog/2015/ ... DfeN817kaY

- Thomas

homerruma
Normal user
Posts: 14
Joined: 21 Feb 2017, 12:48

Re: Nextion display plugin

#468 Post by homerruma » 11 Jan 2019, 12:26

Thank you.

User avatar
VernonBriz
Normal user
Posts: 1
Joined: 21 Mar 2019, 12:30

Re: Nextion display plugin

#469 Post by VernonBriz » 21 Mar 2019, 12:53

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
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.
Peace
Vernon
Last edited by VernonBriz on 06 Sep 2019, 12:43, edited 1 time in total.

waspie
Normal user
Posts: 119
Joined: 09 Feb 2017, 19:35

Re: Nextion display plugin

#470 Post by waspie » 03 Jun 2019, 03:25

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?

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

Re: Nextion display plugin

#471 Post by ThomasB » 03 Jun 2019, 16:59

is this a software/hardware serial issue - as in, if using software serial the ESP misses the transmission from the Nextion?
Top
It's a known issue with soft serial. The problem should not occur if you are using hardware serial with the Nextion Plugin.

- Thomas

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

Re: Nextion display plugin

#472 Post by Wiki » 03 Jun 2019, 22:25

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.

waspie
Normal user
Posts: 119
Joined: 09 Feb 2017, 19:35

Re: Nextion display plugin

#473 Post by waspie » 04 Jun 2019, 02:58

ThomasB wrote:
03 Jun 2019, 16:59
is this a software/hardware serial issue - as in, if using software serial the ESP misses the transmission from the Nextion?
Top
It's a known issue with soft serial. The problem should not occur if you are using hardware serial with the Nextion Plugin.

- Thomas
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...

frank
Normal user
Posts: 85
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Nextion display plugin

#474 Post by frank » 10 Aug 2019, 17:41

is there further development? The nextion works for me but better integration with domoticz wood be great

BertB
Normal user
Posts: 1033
Joined: 25 Apr 2015, 14:39

Re: Nextion display plugin

#475 Post by BertB » 04 Sep 2019, 08:26

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.

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

Re: Nextion display plugin

#476 Post by TD-er » 04 Sep 2019, 09:17

@BertB
What do you think is needed to get it to "the next level" ?

BertB
Normal user
Posts: 1033
Joined: 25 Apr 2015, 14:39

Re: Nextion display plugin

#477 Post by BertB » 04 Sep 2019, 23:35

I will think this over.

BertB
Normal user
Posts: 1033
Joined: 25 Apr 2015, 14:39

Re: Nextion display plugin

#478 Post by BertB » 05 Sep 2019, 19:23

TD-er wrote:
04 Sep 2019, 09:17
@BertB
What do you think is needed to get it to "the next level" ?
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.

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

Re: Nextion display plugin

#479 Post by TD-er » 05 Sep 2019, 19:50

BertB wrote:
05 Sep 2019, 19:23
[...]
Most important update would be the migration to the non-test status.
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 :)

BertB
Normal user
Posts: 1033
Joined: 25 Apr 2015, 14:39

Re: Nextion display plugin

#480 Post by BertB » 05 Sep 2019, 19:55

TD-er wrote:
05 Sep 2019, 19:50
BertB wrote:
05 Sep 2019, 19:23
[...]
Most important update would be the migration to the non-test status.
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 :)
I already guessed it wasn't that easy.
Well, I am a patient guy.

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

Re: Nextion display plugin

#481 Post by Wiki » 06 Sep 2019, 14:21

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.

Kodmen
Normal user
Posts: 1
Joined: 04 Jan 2020, 10:44

Re: Nextion display plugin

#482 Post by Kodmen » 04 Jan 2020, 14:51

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!

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

Re: Nextion display plugin

#483 Post by ThomasB » 04 Jan 2020, 19:35

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:

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
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:

Code: Select all

page0.j1.val=rssibar
This statement uses serial TXD to write the rssi value (0-100) to the attached Nextion screen.

- Thomas

alderaan
Normal user
Posts: 3
Joined: 27 Oct 2019, 17:30

Re: Nextion display plugin

#484 Post by alderaan » 19 May 2020, 23:43

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
Hi,

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.

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

Re: Nextion display plugin

#485 Post by ThomasB » 20 May 2020, 00:19

Anyone has already done this ?, i.e send a string data like a word from Nextion to Espeasy ?
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.

- Thomas

alderaan
Normal user
Posts: 3
Joined: 27 Oct 2019, 17:30

Re: Nextion display plugin

#486 Post by alderaan » 20 May 2020, 01:30

Ok thanks.
I hope they will update the Nextion to support it.

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

Re: Nextion display plugin

#487 Post by ThomasB » 20 May 2020, 02:46

I hope they will update the Nextion to support it.
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.

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

User avatar
Sasch600xt
Normal user
Posts: 134
Joined: 10 Sep 2018, 16:37

Re: Nextion display plugin

#488 Post by Sasch600xt » 08 Jun 2020, 17:30

ThomasB wrote:
20 May 2020, 02:46
And keep in mind that to change a text message in a Nextion touch display requires a SD card or direct USB connection.
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"

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

Re: Nextion display plugin

#489 Post by ThomasB » 08 Jun 2020, 22:14

are you talking about changing the text which is displayed in a textfield or a button at the nextion display ?
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).
by the way, will it be possible to send string messages to 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:

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]%"'
- Thomas

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 17 guests