The ESP Easy's Nextion Plugin is ideal for my project. Thank you for creating it!
Issue:
My project is nearly done but I have one nagging issue to resolve. The problem is that the ESP is randomly corrupting the data packet message received from the Nextion display. The good news is that only RxD data is affected; The TxD data sent by Easy ESP to the display is always perfect.
Project Description:
I'm using a NX3324T028 display with Easy ESP installed on a LoLin NodeMCU V3. Easy ESP receives button press commands from the Nextion display and then communicates them via MQTT to my OpenHabian home automation system. It's a simple touch screen app for my wife to let her know when the washer and/or dryer machine have finished. When the laundry is ready (as soon as the machine stops) she gets a voice alert courtesy of the Amazon Echo Dots in our home.
RxD Corruption Description:
The issue is that sometimes the |s data packet payload that is received by the ESP Easy contains random characters. The corruption randomly occurs to either the "idx" or "value" data.
Here are some examples of the corruption.
ESP Log entry of good RxD from Nextion's print "|s,i98,sOff":
Code: Select all
626580 : Nextion : send command: |s,i98,sOff
98.00
630852 : Nextion : send command: |s,i98,sOff
98.00
ESP Log entry of corrupted RxD from Nextion's print "|s,i98,sOff":
Code: Select all
628723 : Nextion : send command: |s,i98,sO¦–Ô98.00
629787 : Nextion : send command: |s,i98–®e™98.00
635212 : Nextion : send command: |s,i98,sO³–¨ø98.00
637356 : Nextion : send command: |s,iN±sOff…Ã0.00
Troubleshooting Info:
* I've flashed the NodeMCU with a self-compiled build of "20102 - Mega" (PLUGIN_BUILD_TESTING) and I also tried the pre-compiled ESP_Easy_mega-20180615_dev_ESP8266_4096.bin. Both experience the problem.
* For development/troubleshooting I'm using the Nextion editor's
Debug->User MCU Input emulation function rather than a real display.
* The serial baud rate is the default 9600. The 3.3V Serial Logic levels were verified by o-scope.
* All ESP Easy devices are disabled except the Nextion plug in.
* I have ensured that all communication between the Nextion and Easy ESP is only one |s data packet at a time with a minimum of 1 second interval between transmissions.
* I have tried using the |s and the equivalent |u packet formats, as follows:
Nextion data packet example using |s format
Code: Select all
print "|s,i10,sOff" // CMD: Turn Dryer Buzzer off
printh 0a // eol, Process Packet
Nextion data packet example using |u format
Code: Select all
print "|u,i10,n,s0" // CMD: Turn Dryer Buzzer off
printh 0a // eol, Process packet.
I've looked through the forum and cannot find any other reports of the issue. I would be grateful to receive some advice on solving it. No problem if more info is needed, just ask.
- Thomas
Edit: Flash with "20102 - Mega" (PLUGIN_BUILD_TESTING), same problem.