Nextion display plugin

Moderators: BertB, rtenklooster, Voyager, Stuntteam, Martinus

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 257 times

TD-er
Normal user
Posts: 940
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: 966
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

ThomasB
Normal user
Posts: 87
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

ThomasB
Normal user
Posts: 87
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 157 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
Normal 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.

ThomasB
Normal user
Posts: 87
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: 966
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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest