NSPanel Nextion - Tasmota - MQTT - ESP32 - custom HMI
Here my Solution for the EU NSPanel (and other Nextions) with tasmota and data through MQTT to a selfmade HMI
hint.. ;-) - works with ALL Nextion https://nextion.tech/ displays!
- Custom Berry-Script (https://github.com/eokgnah/NSPanel-Nextion/blob/main/testnextion.be)
- Example MQTT (down below)
- Example HMI (https://github.com/eokgnah/NSPanel-Nextion/blob/main/testnextion.HMI)
- Nextion Editor (https://nextion.tech/nextion-editor/)
ESP32 | Nextion | |
---|---|---|
5V | -------- | +5v (red) |
GND | -------- | GND (black) |
IO16 (RX2) | -------- | TX (yellow) |
IO17 (TX2) | -------- | RX (blue) |
Baseinstall for ESP32:
https://templates.blakadder.com/sonoff_NSPanel.html
CheatSheet:
https://nextion.tech/instruction-set/
Examples:
mosquitto_pub -h your.mqtt.server -u your.user -P your.pass -t "testnextion/cmnd/Nextion" -m "dim=1"
mosquitto_pub -h your.mqtt.server -u your.user -P your.pass -t "testnextion/cmnd/Nextion" -m "dim=100"
mosquitto_pub -h your.mqtt.server -u your.user -P your.pass -t "testnextion/cmnd/Nextion" -m "main.t0.txt="bla""
mosquitto_pub -h your.mqtt.server -u your.user -P your.pass -t "testnextion/cmnd/Nextion" -m "main.g0.txt="blubb""
mosquitto_pub -h your.mqtt.server -u your.user -P your.pass -t "testnextion/cmnd/Nextion" -m "picq 135,85,30,30,1"
mosquitto_pub -h your.mqtt.server -u your.user -P your.pass -t "testnextion/cmnd/Nextion" -m "picq 135,85,30,30,0"
TIME = automaticly generated by the .be with ESP32 Time
DATE = automaticly generated by the .be with ESP32 Date
b0 = example button with feedback to the ESP32/Mqtt when pressed
t0 = example text field
g0 = example ticker field
Just make your own custom TFT with the Nextion Editor and change the buttons/texts/ticker/... as you like.
;-)