Nextion display plugin

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Nextion display plugin

#371 Post by BertB » 15 Aug 2018, 16:04

ThomasB wrote: 15 Aug 2018, 01:16 Typo? The BC517 is listed as a NPN Darlington, whereas it needs to be a PNP small signal type. - Thomas
ooooooooops
I use a BC327

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

Re: Nextion display plugin

#372 Post by ThomasB » 15 Aug 2018, 17:03

FYI, the Euro BC series transistors have a different pinout than American 2N or PN series parts. So don't follow the Nextion Wiki drawing when using the BC327.
https://www.flickr.com/photos/56014696@N08/15559869770

-Thomas

smartsoldier
New user
Posts: 6
Joined: 13 Aug 2018, 00:51

Re: Nextion display plugin

#373 Post by smartsoldier » 18 Aug 2018, 01:27

How do I get the Slider to output its value through "idx" or "value"?
I am using

Code: Select all

print "|s,i1,sOn" // Send idx 1 and value 1 to ESPEasy
printh 0a // Required print termination character
for simple on/off buttons.
I have

Code: Select all

cov h0.val,t1.txt,0
print t1.txt
setup right now, which displays the value of the slider (h0) in a text box (t1). It also prints that value as raw number (0, 5, 100) for example. How can I incorporate these two ideas?

Edit: On another note, I can't use the "Resend Values (below) at Interval:" to constantly update a clock on my main page with

Code: Select all

page0.t0.txt="%systm_hm_am%"
because it will also constantly send the latest idx/value and it makes my Home Automation system keep receiving that and it keeps activating the event (in this case toggle lighting).

Edit2: I had another idea about updating my clock. I am trying to do a simple http post at:

Code: Select all

http://192.168.1.158/control?cmd=NEXTION,page0.t0.txt="%systm_hm_am%"
but the log is giving me this:

Code: Select all

NEXTION075 : WRITE, Command is page0.t0.txt='
Why does it work fine in the "Nextion Command Statements (Optional)" section when I add it as a Line, but not when I do http?
Lol if I run the command from the Tools menu I get this:

Code: Select all

NEXTION075 : WRITE, Command is page0.t0.txt='%systm_hm_am%'

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

Re: Nextion display plugin

#374 Post by ThomasB » 18 Aug 2018, 05:32

How do I get the Slider to output its value through "idx" or "value"?
You must convert the Nextion touch move event's slider val to a text string. Like this (see Nextion commands summary for details):

Code: Select all

cov h0.val,t0.txt,0
To use this conversion you would add code to the Touch Move event that is like this example:

Code: Select all

print "|s,i"
cov h0.val,t0.txt,0
print t0.txt
print ",sOff"
printh 0a
I can't use the "Resend Values (below) at Interval:" to constantly update a clock on my main page with page0.t0.txt="%systm_hm_am%" because it will also constantly send the latest idx/value and it makes my Home Automation system keep receiving that and it keeps activating the event (in this case toggle lighting).
Put the page0.t0.txt="%systm_hm_am%" command in the Lines Statement area and select an interval. Disable Resend Values.
Or make a timer rule and send it from the rule file.
Why does it work fine in the "Nextion Command Statements (Optional)" section when I add it as a Line, but not when I do http?
http writes to Nextion plugin do not support ESPEasy system variables. Use Lines or rules if you need to work with the system variables.

- Thomas

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

Re: Nextion display plugin

#375 Post by BertB » 19 Aug 2018, 16:37

@ThomasB

Is there a more natural way to find your information page about Nextion?

Would it not be nicer to get to it through the supported sensors part?
I am more than willing to move my How to (under construction) to another part of the wiki.

BertB

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

Re: Nextion display plugin

#376 Post by ThomasB » 19 Aug 2018, 18:19

@BertB:
Sounds great to me. Which Wiki page needs the Nextion plugin link added to it?

- Thomas

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

Re: Nextion display plugin

#377 Post by BertB » 19 Aug 2018, 20:18

This is my page https://www.letscontrolit.com/wiki/inde ... IONDisplay

If you search for the Nextion here https://www.letscontrolit.com/wiki/index.php/Devices and click the Nextion display, you get your pages.

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

Re: Nextion display plugin

#378 Post by ThomasB » 19 Aug 2018, 21:32

You asked about a more natural way to find information page about the Nextion plugin. How do other plugins do this?

BTW, there's a hot link built into the Nextion plugin. So access to Nextion's technical wiki is click-accessible from within the plugin.

- Thomas

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

Re: Nextion display plugin

#379 Post by BertB » 19 Aug 2018, 22:29

ThomasB wrote: 19 Aug 2018, 21:32 You asked about a more natural way to find information page about the Nextion plugin. How do other plugins do this?
If you go to https://www.letscontrolit.com/, then click ESP Easy and Wiki, then in the left column click ESP Easy and on the next page on 4 Supported Sensors/Actuators. and Again on Supported Sensors/Actuators, you get a whole list of supported devices.
BTW, there's a hot link built into the Nextion plugin. So access to Nextion's technical wiki is click-accessible from within the plugin.

- Thomas
Ah, nice. I did not know that. I was looking for that for quite some time.
I must say, your way is shorter :-)

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

Re: Nextion display plugin

#380 Post by ThomasB » 20 Aug 2018, 02:39

If you go to https://www.letscontrolit.com/, then click ESP Easy and Wiki, then in the left column click ESP Easy and on the next page on 4 Supported Sensors/Actuators. and Again on Supported Sensors/Actuators, you get a whole list of supported devices.
Navigating to the Nextion information isn't convenient, but it is functional. The criticism isn't unique to Nextion since all the plugins' wiki pages are found in the same way. Someone (not me) would need champion the creation of something better.

- Thomas

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

Re: Nextion display plugin

#381 Post by BertB » 04 Sep 2018, 18:14

ThomasB wrote: 13 Aug 2018, 21:38 @BertB: Try this:

Find the code shown below in Nextion.ino's PLUGIN_WRITE: section:

Code: Select all

            String log = F("NEXTION075 : WRITE, ");
            log += F("Command is ");
            log += (tmpString.c_str());
            addLog(LOG_LEVEL_INFO, log);

            success = true;                             // Set true only if plugin found a command to execute.
Change it to:

Code: Select all

            String log = F("NEXTION075 : WRITE, ");
            log += F("Command is ");
            log += (tmpString.c_str());
            addLog(LOG_LEVEL_INFO, log);
            SendStatus(event->Source, log);           // Send status to http or controller.

            success = true;                             // Set true only if plugin found a command to execute.
Your browser should now reply with a copy of the sent write action.

- Thomas
@TD-er, is it possible to add this modification to the plugin?

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

Re: Nextion display plugin

#382 Post by ThomasB » 04 Sep 2018, 20:08

@BertB
FYI, I revised the Nextion plugin with the PLUGIN_WRITE update you requested. I also reduced serial log traffic. But I haven't issued a pull request yet because there's ongoing improvements to fix ESPEasy's instability problems. I think it's best to wait for the developers (@TD-er) to make more progress before introducing any non-critical plugin changes.

I've been testing the new releases and ESPEasy is still not there yet. The memory leak issue appears to be fixed but dropped WiFi and persistent random reboots still occur.

- Thomas

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

Re: Nextion display plugin

#383 Post by BertB » 05 Sep 2018, 13:41

Okay, thanks

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: Nextion display plugin

#384 Post by quorle » 16 Sep 2018, 16:31

Hi guys, I'm new here in this forum and from Germany. Sorry for my bad English. Can I explain one step by step how to set ESPeasy to recognize the display via I2C?
Unfortunately, this does not work for me. Have the current Espeasy Mega flashed in the trial.

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

Re: Nextion display plugin

#385 Post by BertB » 16 Sep 2018, 17:37

quorle wrote: 16 Sep 2018, 16:31 Hi guys, I'm new here in this forum and from Germany. Sorry for my bad English. Can I explain one step by step how to set ESPeasy to recognize the display via I2C?
Unfortunately, this does not work for me. Have the current Espeasy Mega flashed in the trial.
Hi Quorle,

Not sure what you mean with I2C. The display only has a plain old fashion serial interface,

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: Nextion display plugin

#386 Post by quorle » 17 Sep 2018, 16:49

I meant the bus with I2C. That's why I always thought I could search the display on the I2C. But it all seems to be more difficult than expected. Especially if you have no idea how to program an ESP8266 yourself and write programs.

sasso
Normal user
Posts: 10
Joined: 16 Mar 2017, 21:48

Re: Nextion display plugin

#387 Post by sasso » 17 Sep 2018, 21:50

You don't need to do anytnihng, select the device plugin (nextion on the TEST or DEV build), select RX & TX, in the fields of the plugin send commands to display. you can use also rules or HTTP commands but the last two options do not work currently.

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: Nextion display plugin

#388 Post by quorle » 18 Sep 2018, 17:37

Ok, I'll try that once in a while. But will there be an official plugin selection in ESP Mega in stable? What is not working on the last two options (http)?

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

Re: Nextion display plugin

#389 Post by BertB » 19 Sep 2018, 20:56


agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#390 Post by agribaldi » 03 Oct 2018, 11:24

Hi,
I tried to follow the instructions.
i use espeasy Release mega-20181002+nextion+domotikz.
i tried 2 protocol domotikz http and domotikz mqtt.
as a result, I can only turn off the switch.
2018-10-03 02:59:41.762 MQTT: Topic: domoticz/in, Message: {"idx":5,"RSSI":6,"nvalue":0,"svalue":"3;1"}
2018-10-03 02:59:54.263 MQTT: Topic: domoticz/in, Message: {"idx":5,"RSSI":6,"nvalue":0,"svalue":"3;0"}

tell me what I am doing wrong

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

Re: Nextion display plugin

#391 Post by ThomasB » 03 Oct 2018, 18:49

Update @BertB:
The ESP Easy core stability fixes are still being addressed by the developers. Rather than continue to hold back the Nextion update, I made a pull request for it.
https://github.com/letscontrolit/ESPEasy/pull/1846

@agribaldi:
This topic is for the Nextion Color Touch Display. Please create a new topic for your domotikz MQTT questions. However, if you are having problems using the Nextion Plugin then please state more details about the problem.

- Thomas

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#392 Post by agribaldi » 03 Oct 2018, 22:35

I could not install your latest update.
Arduino Ide gives a lot of mistakes.
I am newbie :)
I have domoticz with button (swith type on/off- IDX3) and temperature sensor bme280-idx1.
i have nextion touch display :)
I thought it would be nice to control the button from the display and get this temperature sensor.
I started with a simple, button control.
read forums and found this manual https://www.letscontrolit.com/wiki/index.php/Nextion
in nextion editor I created 2 buttons (print "|s,i3,sOn" printh 0a - print "|s,i3,sOff" printh 0a)
when you press a button on/off on the display, I see in the log domoticz Incoming connection from esp8266+nextion but nothing happens.

so I tried the mqtt domoticz , and in the log domoticz I saw (MQTT: Topic: domoticz/in, Message: {"idx":5,"RSSI":5,"nvalue":0,"svalue":"3;1")

when I send from raspberry pi 3 (mosquitto_pub -h 192.170.1.100 -t "domoticz/in" -m '{ "idx" : 3, "nvalue" : 1}' ) log domoticz MQTT: Topic: domoticz/in, Message: { "idx" : 3, "nvalue" : 1} working.

sorry for my english
tried to explain as he could

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

Re: Nextion display plugin

#393 Post by ThomasB » 04 Oct 2018, 02:47

I could not install your latest update. Arduino Ide gives a lot of mistakes.
I suggest that you wait for the updated plugin to appear in the nightly builds. I don't know when this will happen, so check often.
I have domoticz with button (swith type on/off- IDX3) and temperature sensor bme280-idx1.
i have nextion touch display :)
I don't have any experience with domoticz. But BertB is using it, so maybe he will drop by and provide advice.

- Thomas

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

Re: Nextion display plugin

#394 Post by ThomasB » 04 Oct 2018, 07:09

@agribaldi: Today's nightly build includes the revised plugin.

Also, BertB recently updated his Nextion wiki and it has domoticz examples.
https://www.letscontrolit.com/wiki/inde ... IONDisplay

-Thomas

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#395 Post by agribaldi » 04 Oct 2018, 15:34

everything worked. :)
my carelessness, I did not use "Rules"
http and mqtt now work correctly.

Today I will try to send temperature data from Domotikz--Nextion
and I will look for feedback from Domoticz-Nextion
but it turns out that when you change the value of domotikz value on the display does not change.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#396 Post by grovkillen » 04 Oct 2018, 17:10

You might want to go for MQTT import.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#397 Post by agribaldi » 04 Oct 2018, 17:56

do not tell where to look how to make it?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#398 Post by grovkillen » 04 Oct 2018, 17:59

If you publish the value to a given MQTT topic you can have the plug-in MQTT import to get that value into a task and from there you can use rules to publish it to the nextion display.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#399 Post by agribaldi » 04 Oct 2018, 19:38

I have 2 entries domoticz/out (lam swith and bme280)
domoticz/out {
"Battery" : 255,
"RSSI" : 12,
"description" : "",
"dtype" : "Light/Switch",
"id" : "00014053",
"idx" : 3,
"name" : "Lamp",
"nvalue" : 0,
"stype" : "Switch",
"svalue1" : "0",
"switchType" : "On/Off",
"unit" : 1


domoticz/out {
"Battery" : 255,
"RSSI" : 8,
"description" : "",
"dtype" : "Temp + Humidity + Baro",
"id" : "82001",
"idx" : 1,
"name" : "BME280",
"nvalue" : 0,
"stype" : "THB1 - BTHR918, BTHGN129",
"svalue1" : "25.5",
"svalue2" : "22.5",
"svalue3" : "2",
"svalue4" : "760",
"svalue5" : "0",
"unit" : 1
}

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#400 Post by grovkillen » 04 Oct 2018, 19:58

You need a float only topic for the MQTT import to listen to. It cannot parse JSON.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#401 Post by agribaldi » 04 Oct 2018, 20:04

I do not get you.
need to use node red?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#402 Post by grovkillen » 04 Oct 2018, 20:07

Well if Domoticz is not allowing you to publish to a MQTT topic with only a single value then node red is your best choice I guess.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#403 Post by agribaldi » 04 Oct 2018, 20:10

I understood.

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#404 Post by agribaldi » 05 Oct 2018, 14:39

it was possible to transfer temperature data using node red.
now trying to make feedback with the switch nextion display , something is not working yet.

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#405 Post by agribaldi » 05 Oct 2018, 14:47

2018-10-05 15_46_34-ESP_Easy.jpg
2018-10-05 15_46_34-ESP_Easy.jpg (29.85 KiB) Viewed 169782 times
Attachments
2018-10-05 15_46_08-ESP_Easy.jpg
2018-10-05 15_46_08-ESP_Easy.jpg (31.38 KiB) Viewed 169782 times
2018-10-05 15_45_31-ESP_Easy.jpg
2018-10-05 15_45_31-ESP_Easy.jpg (57.44 KiB) Viewed 169782 times

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#406 Post by agribaldi » 05 Oct 2018, 16:55

Can I change the state of the button on the display with this rule?

on STH#Sw-Lamp do
if [STH#Sw-Lamp] = 1
Publish Nextion#page0.bt0.pic=0
if [STH#Sw-Lamp] = 0
Publish Nextion#page0.bt0.pic=1
endif
endon

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#407 Post by grovkillen » 05 Oct 2018, 17:29

Publish command is used for MQTT publishing. It got nothing to do with nextion commands. I think nextion is the command you're looking for?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

agribaldi
Normal user
Posts: 12
Joined: 02 Oct 2018, 17:17

Re: Nextion display plugin

#408 Post by agribaldi » 05 Oct 2018, 19:00

here is almost a working version
only sometimes on or off works the second time.

on STH#Sw-Lamp do
if [STH#Sw-Lamp] = 0
Nextion,page0.bt0.val=0
endon
on STH#Sw-Lamp do
if [STH#Sw-Lamp] = 1
Nextion,page0.bt0.val=1
endon

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

Re: Nextion display plugin

#409 Post by ThomasB » 05 Oct 2018, 19:11

Assuming your page0.bt0.val variable is working correctly, then try this rule code:

Code: Select all

on STH#Sw-Lamp do
 if [STH#Sw-Lamp]=0
  Nextion,page0.bt0.val=0
 endif
 if [STH#Sw-Lamp]=1
  Nextion,page0.bt0.val=1
 endif
endon
- Thomas

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#410 Post by grovkillen » 05 Oct 2018, 19:13

agribaldi wrote: 05 Oct 2018, 19:00 here is almost a working version
only sometimes on or off works the second time.

on STH#Sw-Lamp do
if [STH#Sw-Lamp] = 0
Nextion,page0.bt0.val=0
endon
on STH#Sw-Lamp do
if [STH#Sw-Lamp] = 1
Nextion,page0.bt0.val=1
endon

Code: Select all

on STH#Sw-Lamp do
if [STH#Sw-Lamp] = 0
Nextion,page0.bt0.val=0
else
Nextion,page0.bt0.val=1
endif
endon
You never closed the if chunk with a "endif" and since it's a simple if/else you can make it like I suggest above.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Bryt
New user
Posts: 1
Joined: 22 Feb 2018, 20:22

Re: Nextion display plugin

#411 Post by Bryt » 11 Oct 2018, 15:11

Hi! Im trying to read out value from an counter n domoticz to send to a textbox in nextion but i cant get it to work.
I can read out sensors and send but not counters.
I have used the luascript Ierlandfan posted earlier her
but cant get it to work.
Domoticz log says LUA: Counter = 75.015
I would be very grateful for help, here is the script

Code: Select all

-- we need this function to send the quotes around the values
function url_encode(str)
  if (str) then
    str = string.gsub (str, "\n", "\r\n")
    str = string.gsub (str, "([^%w %-%_%.%~])",
        function (c) return string.format ("%%%02X", string.byte(c)) end)
    str = string.gsub (str, " ", "+")
  end
  return str
end
 
countervalueintext = otherdevices_svalues['Counter'] --this values can be for example 88.5 or 1433.2, just like temperature can be 2.3 or -4.4)
countervalueinquotes = '"' ..countervalueintext.. '"' --First part of the magic

commandArray = {}
print('Counter = '..countervalueintext) --This shows up in Domoticz log
counter =tonumber(countervalueintext) -- If you want to compare numeric values, see example later on

if (devicechanged['Counter'])then --If value changes of device SolarEnergyLive 

os.execute('curl -s "http://192.168.x.x/control?cmd=NEXTION,page2.t7.txt=' .. url_encode(countervaluesinquotes) .. '"') --sending value to textbox in quotes
print('Sending data to Nextion') --This shows up in Domoticz log
return commandarray --execute the commands
end --To close the If

Wiki
Normal user
Posts: 413
Joined: 23 Apr 2018, 17:55
Location: Germany

Re: Nextion display plugin

#412 Post by Wiki » 24 Oct 2018, 18:46

Hi,

meanwhile I think, I am stupid. I scrolled through the whole thread. My Nextion is connected to a Wemos D1, blue cable=> D7, yellow cable => D5. Serial port disabled.
Configuration of the Nextion in ESPEasy:
extion1.jpg
extion1.jpg (48.58 KiB) Viewed 169071 times
extion2.jpg
extion2.jpg (34.11 KiB) Viewed 169071 times
In Nextion, I have a textfield named "WZt", when I am tying to send esp_ip/control?cmd=NEXTION,page0.WZt.txt="hallo" nothing happens.

Code: Select all

pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $

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

Re: Nextion display plugin

#413 Post by ThomasB » 24 Oct 2018, 22:35

In Nextion, I have a textfield named "WZt", when I am tying to send esp_ip/control?cmd=NEXTION,page0.WZt.txt="hallo" nothing happens.
1. When you issue your http command from a web browser, does the browser show a response that looks like this?

Code: Select all

NEXTION075 : WRITE = page0.WZt.txt="hallo"
2. Your Line 1 Nextion Command Statement is configured to write "24.5" to the Nextion WZt text field every 10 seconds. Do you see this value on the Nextion Display?

- Thomas

Wiki
Normal user
Posts: 413
Joined: 23 Apr 2018, 17:55
Location: Germany

Re: Nextion display plugin

#414 Post by Wiki » 25 Oct 2018, 01:06

Yes, the browser shows me exactly the response that you've posted. Sorry, I should have added this info to my post.

And no, the "24.5" doesn't appear on the Nextion. Thats why I tried to send whatever to the node connected to the Nextion using the http control command.

Code: Select all

pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $

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

Re: Nextion display plugin

#415 Post by ThomasB » 25 Oct 2018, 03:54

Yes, the browser shows me exactly the response that you've posted.
That confirms the Nextion plugin is active.

Code: Select all

And no, the "24.5" doesn't appear on the Nextion. 
1. Check the ESP's serial wiring for problems.
BTW, don't forget the Nextion's black (ground) wire needs to be connected to Wemos ground. Nextion requires 5.0V (not 3.3V).

2. Check your Nextion software that you created. Maybe there is an error in your code.

- Thomas

Wiki
Normal user
Posts: 413
Joined: 23 Apr 2018, 17:55
Location: Germany

Re: Nextion display plugin

#416 Post by Wiki » 25 Oct 2018, 16:35

......and yes, I AM stupid.

Wiring OK, Plugin OK, Nextion OK. But now I've learned, that I should have checked the source of the Nextin for typos. If I want to send to "WZt" but the field was named by me "WWt" it could not work.

Never mind, sorry and thanks for your thoughts and tipps, and thanks for the plugin. Works absolutely perfect now.

Code: Select all

pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $

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

Re: Nextion display plugin

#417 Post by ThomasB » 25 Oct 2018, 16:40

Works absolutely perfect now.
Glad to hear you got it working.
- Thomas

Wiki
Normal user
Posts: 413
Joined: 23 Apr 2018, 17:55
Location: Germany

Re: Nextion display plugin

#418 Post by Wiki » 29 Oct 2018, 17:40

Hi,

Thanks a lot for the efforts you have had with the plugin. The WAF (women's acceptance factor) raised up to 100%.

Short question: using the original RX/TX hard serial on the Wemos D1 mini (GPIO3/1) works 100% reliable (opposite to the soft serial) - you described this some pages earlier. But if I'm configuring the speed higher than 9600 I get no connection to the Nextion. Normal behaviour?

Code: Select all

pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Nextion display plugin

#419 Post by grovkillen » 29 Oct 2018, 17:44

Wiki wrote: 29 Oct 2018, 17:40 Hi,

Thanks a lot for the efforts you have had with the plugin. The WAF (women's acceptance factor) raised up to 100%.

Short question: using the original RX/TX hard serial on the Wemos D1 mini (GPIO3/1) works 100% reliable (opposite to the soft serial) - you described this some pages earlier. But if I'm configuring the speed higher than 9600 I get no connection to the Nextion. Normal behaviour?
Up to 115200 is supported as far as I know but if the plugin is programmed for 9600 I guess setting it to something else will make the communication miss.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

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

Re: Nextion display plugin

#420 Post by ThomasB » 29 Oct 2018, 18:44

The Nextion display module defaults to 9600 baud. It does NOT automatically detect other baud rates.

So if you select anything other than 9600 in the plugin you will also need to change the baud setting in the display module. Nextion's Baud command syntax is found here:
https://nextion.itead.cc/resources/docu ... ction-set/
https://www.itead.cc/wiki/Nextion_Instruction_Set

- Thomas

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 44 guests