Nextion display plugin

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: Nextion display plugin

#351 Post by CHK_BLN » 08 Aug 2018, 07:11

Hi
my first controller is an OpenHAB MQTT.
So far that's right. I can also switch a GPIO via MQTT.

What must the command for the Nextion Modul look like?

PIC.PNG
PIC.PNG (32.1 KiB) Viewed 157126 times

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

Re: Nextion display plugin

#352 Post by TD-er » 08 Aug 2018, 19:18

ThomasB wrote: 07 Aug 2018, 23:24
Maybe I should start reading/updating the wiki too.
@TD-er: Sure, you can do that in your spare time. :)

- Thomas
That's a great idea. :)

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

Re: Nextion display plugin

#353 Post by BertB » 09 Aug 2018, 21:09

+1

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: Nextion display plugin

#354 Post by CHK_BLN » 09 Aug 2018, 21:31

Thanks for support and help

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

Re: Nextion display plugin

#355 Post by ThomasB » 11 Aug 2018, 18:35

@CHK_BLN: The Nextion plugin has few users. So I don't expect you will get the exact answer to your MQTT command question.

The Wiki information for command usage is here: https://www.letscontrolit.com/wiki/inde ... _Reference

When I follow the wiki information the MQTT command statement for your installation would probably be something like this:

Code: Select all

ESP_Easy69/cmd NEXTION,page0.t2.txt="Hello World"
Like you, my Home Automation system is OpenHab2. My installation sends commands to ESPEasy's Nextion using HTTP; I don't use MQTT to send commands to Nextion so I cannot confirm if my suggested MQTT statement works. No doubt you will need to experiment to find the winning solution.

- Thomas

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

Re: Nextion display plugin

#356 Post by ThomasB » 12 Aug 2018, 02:28

@CHK_BLK:

I used the "MQTTlens" chrome browser plugin and tested sending MQTT commands to Nextion. It works as expected.

My ESPEasy Nextion device is called ESPEZ_Laundry. The text field on page 0 has attribute g1. The screenshot below shows how I setup the two fields (Publish & Message) and sent "Hello World" to the Nextion screen.

- Thomas

mqtt.jpg
mqtt.jpg (83.11 KiB) Viewed 157026 times

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: Nextion display plugin

#357 Post by CHK_BLN » 12 Aug 2018, 22:18

Hello Thomas,
as you describe it works.

Thanks for your effort

Christof

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

Re: Nextion display plugin

#358 Post by smartsoldier » 13 Aug 2018, 01:38

I am attempting to use ESPEasy (mega-20180809 version) which has Display - Nextion [TESTING] as a device. I'm using soft serial and GPIO-0 and GPIO-2 (D3 and D4 on my NodeMCU). I am unable to communicate with the display. I cannot send txt updates and I cannot receive presses from the screen. A wiki post a few pages ago mentioned needing a pull-up on the RX (or maybe it was TX). Anyway, I don't have that option in my device setup even though other people seem to. I was able to communicate between these devices with other non-ESPEasy software so I don't think my hardware is the issue.

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

Re: Nextion display plugin

#359 Post by ThomasB » 13 Aug 2018, 02:15

@smartsoldier: GPIO-2 is the LED drive pin. Assign that pin to the WiFi Status (Hardware tab) and use another pin for Nextion.

The sensor "Pullup" check box found on earlier versions of the Nextion Plugin was a placebo. It didn't do anything, so it has been removed.

BTW, I don't recommend soft serial. There's plenty of discussion/explanation on the possible serial data corruption that may occur. The latest Plugin has introduced hardware serial to eliminate the problem.

- Thomas

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

Re: Nextion display plugin

#360 Post by BertB » 13 Aug 2018, 18:25

I use

Code: Select all

 http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vLight.val=1
kind of commands to control my ESP.
For some reason it works out ok in the ESP, but I get an error in Domoticz.

I vaguely remember it used to work fine in the past.

EDIT
When I do this:

Code: Select all

http://xxx.xxx.xxx.xxx/control?cmd=GPIO,13,0
in the browser I get

Code: Select all

log	"GPIO 13 Set to 0"
plugin	1
pin	13
mode	"output"
state	0
And with domoticz I get no error

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

Re: Nextion display plugin

#361 Post by ThomasB » 13 Aug 2018, 20:21

@BertB: Unlike GPIO, Nextion does not reply to HTTP writes. So you won't see a status response to your Nextion commands sent by the browser.

I suggest you retest with the browser and send commands that update some text fields (so you can verify HTTP writes to the display). If browser access is able to change text fields then the plugin is running Ok.

- Thomas

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

Re: Nextion display plugin

#362 Post by BertB » 13 Aug 2018, 21:08

ThomasB wrote: 13 Aug 2018, 20:21 @BertB: Unlike GPIO, Nextion does not reply to HTTP writes. So you won't see a status response to your Nextion commands sent by the browser.

I suggest you retest with the browser and send commands that update some text fields (so you can verify HTTP writes to the display). If browser access is able to change text fields then the plugin is running Ok.

- Thomas
I see. Well the HTTP call writes to the screen, so it is running ok.
Is it possible to build the HTTP reply in the Nextion plugin? I rely on HTTP calls to send updates to the display.

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

Re: Nextion display plugin

#363 Post by ThomasB » 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

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

Re: Nextion display plugin

#364 Post by BertB » 13 Aug 2018, 22:49

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
Yep, that did it.
Thanks

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

Re: Nextion display plugin

#365 Post by BertB » 13 Aug 2018, 23:04

I managed to develop an easy way to update elements in the NEXTION, with HTTP messages send by domoticz.
It uses a small dzVents (LUA) script and the attributes of the devices in domoticz.

This can be handy if you want to sync with domoticz after a reset of Nextion.

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

Re: Nextion display plugin

#366 Post by smartsoldier » 14 Aug 2018, 22:47

ThomasB wrote: 13 Aug 2018, 02:15 @smartsoldier: GPIO-2 is the LED drive pin. Assign that pin to the WiFi Status (Hardware tab) and use another pin for Nextion.

The sensor "Pullup" check box found on earlier versions of the Nextion Plugin was a placebo. It didn't do anything, so it has been removed.

BTW, I don't recommend soft serial. There's plenty of discussion/explanation on the possible serial data corruption that may occur. The latest Plugin has introduced hardware serial to eliminate the problem.

- Thomas
I have taken your advice and switched up my TX/RX pins to 13 and 15 (D7/D8 on my NodeMCU) so I can use hardware serial. I disabled Serial Log File in Tools and now I can communicate just fine!! I didn't get the PNP Transistor yet, so I assume if I attempt to restart the NodeMCU ESPEasy will fail on boot. Would someone be able to link me to a place to buy this transistor? I googled and there is a million different kinds...

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

Re: Nextion display plugin

#367 Post by BertB » 14 Aug 2018, 23:15

smartsoldier wrote: 14 Aug 2018, 22:47
I have taken your advice and switched up my TX/RX pins to 13 and 15 (D7/D8 on my NodeMCU) so I can use hardware serial. I disabled Serial Log File in Tools and now I can communicate just fine!! I didn't get the PNP Transistor yet, so I assume if I attempt to restart the NodeMCU ESPEasy will fail on boot. Would someone be able to link me to a place to buy this transistor? I googled and there is a million different kinds...
Any small signal pnp transistor will do. I used a BC517 which I bought at Conrad or Farnell or any local Radio Shack type of store.

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

Re: Nextion display plugin

#368 Post by smartsoldier » 15 Aug 2018, 00:39

Thanks for the advice again. You rock. Mind if I keep it coming?
I am testing the communication between Home Assistant and ESPEasy/Nextion. I am using ESPEasy MQTT Import to pull in some simple sensors, but then how do I post those values to my Nextion? Do I need to do some rule that will send the imported MQTT values through http to my Nextion (http://192.168.1.XXX/control?cmd=NEXTIO ... ure#Value1%)? I tried to use the Lines in the actual Nextion Device tab, but the %BedroomTemperature#Value1% isn't pulling the actual value, its just displaying that entire string.

Edit: Side note, I setup my NTP north america pool and set my longitude and latitude but I'm still getting a system time that is 4 hours ahead of my time. Can I adjust that somehow?

Edit2: I tried this rule

Code: Select all

on BedroomTemperature#Value1 do SendToHTTP http://192.168.1.158/control?cmd=NEXTION,page0.n0.val=13 endon
but it didn't work. That is supposed to update an element on my panel to 13 every time that MQTT topic is received. I'm watching the log and it is being received exactly as I have it written.

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

Re: Nextion display plugin

#369 Post by ThomasB » 15 Aug 2018, 01:16

I used a BC517 which I bought at Conrad or Farnell or any local Radio Shack type of store.
Typo? The BC517 is listed as a NPN Darlington, whereas it needs to be a PNP small signal type. The two transistors mentioned in the Nextion Wiki are popular parts found in USA electronic shops. Plus sold by an endless number of suppliers on eBay and Amazon. Typical online price is about 0.15 USD each and often sold by the Chinese vendors in a bag of 50 pcs for $1.00.
I tried to use the Lines in the actual Nextion Device tab, but the %BedroomTemperature#Value1% isn't pulling the actual value, its just displaying that entire string.
Your "Lines" command statement would look something like this:

Code: Select all

page0.n0.val=[BedroomTemperature#Value1]
Your rules statement would look something like this:

Code: Select all

NEXTION,page0.n0.val=[BedroomTemperature#Value1]
The http would be similar to this:

Code: Select all

http://192.168.1.xxx/control?cmd=NEXTION,page0.n0.val=68
I setup my NTP north america pool and set my longitude and latitude but I'm still getting a system time that is 4 hours ahead of my time. Can I adjust that somehow?
Tools->Advanced->Timezone Offset (UTC +): -240

- Thomas

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

Re: Nextion display plugin

#370 Post by TD-er » 15 Aug 2018, 11:58

smartsoldier wrote: 15 Aug 2018, 00:39 [...]
Edit: Side note, I setup my NTP north america pool and set my longitude and latitude but I'm still getting a system time that is 4 hours ahead of my time. Can I adjust that somehow?
[...]
Lat/Lon coordinates are only used to compute sunrise/sunset.

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

Post Reply

Who is online

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