Esphome & nextion tft lcd

Maybe you should just try what we are suggesting instead of insisting on your old code?

I did exactly what was suggested (???)

No you keep adding your failing lambda. Remove that!
The display should not have output commands.

Sorry I do not get that. What lambda is failing?

do you mean this:?

I removed that but that did not do anything…

My problem now seems to be I cannot successfully send text to the sensor (with below config)

display:
  - platform: nextion
    id: main_lcd
    #lambda: |-
    #  it.set_wait_for_ack(false);
    #  it.set_component_text("t10", id(t10_text).state.c_str());

text_sensor:
  - platform: homeassistant
    id: t10_text
    entity_id: sensor.nextiont0_text
    on_value:
      then:
        - lambda: "id(nextionTextBox).set_state(id(t10_text).state, false, true);"
  - platform: nextion
    nextion_id: main_lcd
    id: nextionTextBox
    component_name: 5.t10 # where 5 is the pagenumber and t10 is the text box
[16:03:02][D][homeassistant.text_sensor:017]: 'sensor.nextiont0_text': Got state 'Hello, this is \r a message \r for you!'
[16:03:02][V][text_sensor:016]: 't10_text': Received new state Hello, this is \r a message \r for you!.
[16:03:03][D][text_sensor:067]: 't10_text': Sending state 'Hello, this is \r a message \r for you!'
[16:03:03][V][component:199]: Component api took a long time for an operation (0.18 s).
[16:03:03][V][component:200]: Components should block for at most 20-30ms.
[16:03:03][W][nextion:316]: Nextion reported invalid instruction!
[16:03:03][W][nextion:316]: Nextion reported invalid instruction!
[16:03:06][D][homeassistant.text_sensor:017]: 'sensor.nextiont0_text': Got state 'Hello, this is \r a message \r for you!'
[16:03:06][V][text_sensor:016]: 't10_text': Received new state Hello, this is \r a message \r for you!
[16:03:06][D][text_sensor:067]: 't10_text': Sending state Hello, this is \r a message \r for you!'
[16:03:06][V][component:199]: Component api took a long time for an operation (0.11 s).
[16:03:06][V][component:200]: Components should block for at most 20-30ms.
[16:03:06][W][nextion:316]: Nextion reported invalid instruction!

I guess I was wrong.
Is the texbox large enough?
Could it be the \r you are sending that is causing issues?

Yes, as it worked wel before untill something changed… ?

/r is line break

@sender since you mentioned on Discord that you got this working, could you update the thread here for posterity? Let everybody know what you did? :slight_smile:

Hello all, sorry I could not do this earlier. Other things going on.

This is my current (again) working config:

uart:
  rx_pin: D7
  tx_pin: D5
  baud_rate: 9600

display:
  - platform: nextion
    id: main_lcd

text_sensor:
  - platform: homeassistant
    id: t10_text
    entity_id: sensor.nextiont0_text
    on_value:
      then:
        - lambda: "id(nextionTextBox).set_state(id(t10_text).state, false, true);"
  - platform: nextion
    nextion_id: main_lcd
    id: nextionTextBox
    component_name: page5.t10 # where 5 is the pagename and t10 is the text box
1 Like

Hi,

I also have a problem with my Nextion display NX3224K024_011R together with the D1 mini (ESP8266) and hope that someone can help me.

I have more than a year ago using the instructions of @bruxy70 rebuilt the weather station and adapted for me. (GitHub - bruxy70/Home-Assistant-ESPHome-Weather-Station: Nextion display with ESP8266 microcontroller (Wemos D1 mini) showing Home Assistant temperature sensors and weather forecast)

I own 2 identical displays which worked great until a few months ago. With one of the ESP8266 I made an update from version 2022.5.0 to a newer version (in the meantime the newest version 2022.11.1). Since then, the updated display no longer works. No more values are displayed. The Nextion display does not show what the ESP8266 gets from HomeAssistant.

Unfortunately I can’t manage a downgrade. I have already tried everything possible. I can exclude the dispaly as a source of error, that works with the “old” ESP8266. I have also replacet the ESP8266 with another ESP8266, here I have the same problem. At the yaml I have also made some changes, unfortunately also without success.

Here is my log file:

INFO Reading configuration /config/esphome/kitiboard.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing kitiboard (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- ESPAsyncTCP-esphome @ 1.2.3
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- ESPAsyncTCP-esphome @ 1.2.3
|   |-- Hash @ 1.0
|   |-- ESP8266WiFi @ 1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/kitiboard/.pioenvs/kitiboard/src/main.cpp.o
Linking /data/kitiboard/.pioenvs/kitiboard/firmware.elf
RAM:   [====      ]  44.8% (used 36668 bytes from 81920 bytes)
Flash: [=====     ]  52.1% (used 533001 bytes from 1023984 bytes)
Building /data/kitiboard/.pioenvs/kitiboard/firmware.bin
esp8266_copy_factory_bin(["/data/kitiboard/.pioenvs/kitiboard/firmware.bin"], ["/data/kitiboard/.pioenvs/kitiboard/firmware.elf"])
========================= [SUCCESS] Took 54.15 seconds =========================
INFO Successfully compiled program.
esptool.py v3.3.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 8c:ce:4e:e1:dd:c2
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x00083fff...
Flash params set to 0x0340
Compressed 537152 bytes to 372609...
Wrote 537152 bytes (372609 compressed) at 0x00000000 in 10.0 seconds (effective 429.6 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[20:31:01] \xe0\xe0  \xe0\xe0  \xe0 \x9c\xe4\x8c\x8fl \xfc\x83n\x9cl[I][logger:258]: Log initialized
[20:31:01][C][ota:469]: There have been 1 suspected unsuccessful boot attempts.
[20:31:01][I][app:029]: Running through setup()...
[20:31:01][C][uart.arduino_esp8266:059]: Setting up UART bus...
[20:31:01][C][wifi:037]: Setting up WiFi...
[20:31:01][C][wifi:038]:   Local MAC: 8C:CE:4E:E1:DD:C2
[20:31:01][D][wifi:386]: Starting scan...
[20:31:01][D][uart_debug:114]: >>> 62:6B:63:6D:64:3D:30:FF:FF:FF:73:6C:65:65:70:3D:30:FF:FF:FF:62:6B:63:6D:64:3D:30:FF:FF:FF:73:6C:65:65:70:3D:30:FF:FF:FF:72:65:73:74:FF:FF:FF
[20:31:01][D][uart_debug:114]: <<< F4:E8
[20:31:01][D][uart_debug:114]: >>> 62:6F:67:75:73:63:6F:6D:6D:61:6E:64:3D:30:FF:FF:FF:63:6F:6E:6E:65:63:74:FF:FF:FF
[20:31:02][W][nextion:072]: Nextion is not connected! 
[20:31:02][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00
[20:31:02][D][uart_debug:114]: >>> 62:6F:67:75:73:63:6F:6D:6D:61:6E:64:3D:30:FF:FF:FF:63:6F:6E:6E:65:63:74:FF:FF:FF
[20:31:02][I][nextion:078]: Nextion is connected
[20:31:02][C][nextion:117]: Nextion:
[20:31:02][C][nextion:118]:   Device Model:     NX3224K024_011R
[20:31:02][C][nextion:119]:   Firmware Version: 163
[20:31:02][C][nextion:120]:   Serial Number:    E468810217163726
[20:31:02][C][nextion:121]:   Flash Size:       16777216
[20:31:02][C][nextion:122]:   Wake On Touch:    True
[20:31:02][D][uart_debug:114]: <<< 63:6F:6D:6F:6B:20:31:2C:33:30:36:30:31:2D:30:2C:4E:58:33:32:32:34:4B:30:32:34:5F:30:31:31:52:2C:31:36:33:2C:36:31:34:38:39:2C:45:34:36:38:38:31:30:32:31:37:31:36:33:37:32:36:2C:31:36:37:37:37:32:31:36:FF:FF:FF
[20:31:07][D][wifi:401]: Found networks:
[20:31:07][I][wifi:444]: - 'freeocean' (38:10:D5:BC:4E:72) [redacted]▂▄▆█
[20:31:07][D][wifi:446]:     Channel: 1
[20:31:07][D][wifi:447]:     RSSI: -25 dB
[20:31:07][I][wifi:444]: - 'freeocean' (F0:B0:14:E0:59:6C) [redacted]▂▄▆█
[20:31:07][D][wifi:446]:     Channel: 6
[20:31:07][D][wifi:447]:     RSSI: -82 dB
[20:31:07][D][wifi:449]: - 'freeocean_gast'[redacted] (3A:10:D5:BC:4E:72) [redacted]▂▄▆█
[20:31:07][D][wifi:449]: - 'glocknet.wz'[redacted] (5C:49:79:FB:D0:03) [redacted]▂▄▆█
[20:31:07][D][wifi:449]: - 'freeocean_gast'[redacted] (F2:B0:14:E0:59:6C) [redacted]▂▄▆█
[20:31:07][D][wifi:449]: - 'JBL Bar 9.1_3986.l033'[redacted] (FA:8F:CA:5F:5F:EE) [redacted]▂▄▆█
[20:31:07][D][wifi:449]: - 'glocknet3.2'[redacted] (C0:25:06:33:B1:72) [redacted]▂▄▆█
[20:31:07][D][wifi:449]: - 'TP-Link_599A'[redacted] (B0:BE:76:88:59:9A) [redacted]▂▄▆█
[20:31:07][I][wifi:257]: WiFi Connecting to 'freeocean'...
[20:31:08][I][wifi:518]: WiFi Connected!
[20:31:08][C][wifi:362]:   Local MAC: 8C:CE:4E:E1:DD:C2
[20:31:08][C][wifi:363]:   SSID: 'freeocean'[redacted]
[20:31:08][C][wifi:364]:   IP Address: 192.168.178.118
[20:31:08][C][wifi:365]:   BSSID: 38:10:D5:BC:4E:72[redacted]
[20:31:08][C][wifi:367]:   Hostname: 'kitiboard'
[20:31:08][C][wifi:369]:   Signal strength: -32 dB ▂▄▆█
[20:31:08][C][wifi:373]:   Channel: 1
[20:31:08][C][wifi:374]:   Subnet: 255.255.255.0
[20:31:08][C][wifi:375]:   Gateway: 192.168.178.1
[20:31:08][C][wifi:376]:   DNS1: 192.168.178.1
[20:31:08][C][wifi:377]:   DNS2: 0.0.0.0
[20:31:08][D][wifi:527]: Disabling AP...
[20:31:08][C][ota:093]: Over-The-Air Updates:
[20:31:08][C][ota:094]:   Address: kitiboard.local:8266
[20:31:08][C][ota:097]:   Using Password.
[20:31:08][C][api:025]: Setting up Home Assistant API server...
[20:31:08][C][sntp:028]: Setting up SNTP...
[20:31:08][I][app:062]: setup() finished successfully!
[20:31:08][I][app:102]: ESPHome version 2022.11.1 compiled on Nov 21 2022, 20:30:06
[20:31:09][C][wifi:504]: WiFi:
[20:31:09][C][wifi:362]:   Local MAC: 8C:CE:4E:E1:DD:C2
[20:31:09][C][wifi:363]:   SSID: 'freeocean'[redacted]
[20:31:09][C][wifi:364]:   IP Address: 192.168.178.118
[20:31:09][C][wifi:365]:   BSSID: 38:10:D5:BC:4E:72[redacted]
[20:31:09][C][wifi:367]:   Hostname: 'kitiboard'
[20:31:09][C][wifi:369]:   Signal strength: -32 dB ▂▄▆█
[20:31:09][C][wifi:373]:   Channel: 1
[20:31:09][C][wifi:374]:   Subnet: 255.255.255.0
[20:31:09][C][wifi:375]:   Gateway: 192.168.178.1
[20:31:09][C][wifi:376]:   DNS1: 192.168.178.1
[20:31:09][C][wifi:377]:   DNS2: 0.0.0.0
[20:31:09][D][sntp:077]: Synchronized time: 2022-11-21 20:31:09
[20:31:09][C][logger:293]: Logger:
[20:31:09][C][logger:294]:   Level: DEBUG
[20:31:09][C][logger:295]:   Log Baud Rate: 115200
[20:31:09][C][logger:296]:   Hardware UART: UART0
[20:31:09][C][uart.arduino_esp8266:102]: UART Bus:
[20:31:09][C][uart.arduino_esp8266:103]:   TX Pin: GPIO4
[20:31:09][C][uart.arduino_esp8266:104]:   RX Pin: GPIO5
[20:31:09][C][uart.arduino_esp8266:106]:   RX Buffer Size: 256
[20:31:09][C][uart.arduino_esp8266:108]:   Baud Rate: 115200 baud
[20:31:09][C][uart.arduino_esp8266:109]:   Data Bits: 8
[20:31:09][C][uart.arduino_esp8266:110]:   Parity: NONE
[20:31:09][C][uart.arduino_esp8266:111]:   Stop bits: 1
[20:31:09][C][uart.arduino_esp8266:115]:   Using software serial
[20:31:09][C][nextion:117]: Nextion:
[20:31:09][C][nextion:118]:   Device Model:     NX3224K024_011R
[20:31:09][C][nextion:119]:   Firmware Version: 163
[20:31:09][C][nextion:120]:   Serial Number:    E468810217163726
[20:31:09][C][nextion:121]:   Flash Size:       16777216
[20:31:09][C][nextion:122]:   Wake On Touch:    True
[20:31:09][C][captive_portal:088]: Captive Portal:
[20:31:09][C][mdns:103]: mDNS:
[20:31:09][C][mdns:104]:   Hostname: kitiboard
[20:31:09][C][ota:093]: Over-The-Air Updates:
[20:31:09][C][ota:094]:   Address: kitiboard.local:8266
[20:31:09][C][ota:097]:   Using Password.
[20:31:09][C][api:138]: API Server:
[20:31:09][C][api:139]:   Address: kitiboard.local:6053
[20:31:09][C][api:141]:   Using noise encryption: YES
[20:31:09][C][sntp:053]: SNTP Time:
[20:31:09][C][sntp:054]:   Server 1: '0.pool.ntp.org'
[20:31:09][C][sntp:055]:   Server 2: '1.pool.ntp.org'
[20:31:09][C][sntp:056]:   Server 3: '2.pool.ntp.org'
[20:31:09][C][sntp:057]:   Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[20:31:09][C][homeassistant.binary_sensor:039]: Homeassistant Binary Sensor 'someone_home'
[20:31:09][C][homeassistant.binary_sensor:040]:   Entity ID: 'binary_sensor.someone_home'
[20:31:09][C][homeassistant.binary_sensor:039]: Homeassistant Binary Sensor 'night'
[20:31:09][C][homeassistant.binary_sensor:040]:   Entity ID: 'binary_sensor.night'
[20:31:09][C][homeassistant.binary_sensor:039]: Homeassistant Binary Sensor 'washer_rup'
[20:31:09][C][homeassistant.binary_sensor:040]:   Entity ID: 'binary_sensor.washer_rup'
[20:31:09][C][homeassistant.binary_sensor:039]: Homeassistant Binary Sensor 'dryer_rup'
[20:31:09][C][homeassistant.binary_sensor:040]:   Entity ID: 'binary_sensor.dryer_rup'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'temperature'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.hmip_wettersensor_temperature'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'min_temp'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.min_temp_next_24h'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'max_temp'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.max_temp_next_24h'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'ton_gray'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.next_waste_gray'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'ton_green'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.next_waste_green'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'ton_yellow'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.next_waste_yellow'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'weekday'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.weekday'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'house_power'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.senec_dash_house_power'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'solar_power'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.senec_dash_solar_generated_power'
[20:31:09][C][homeassistant.sensor:030]: Homeassistant Sensor 'solar_battery'
[20:31:09][C][homeassistant.sensor:030]:   State Class: ''
[20:31:09][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[20:31:09][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[20:31:09][C][homeassistant.sensor:031]:   Entity ID: 'sensor.senec_dash_battery_charge_percent'
[20:31:09][C][debug:049]: Debug component:
[20:31:09][D][debug:061]: ESPHome version 2022.11.1
[20:31:09][D][debug:065]: Free Heap Size: 28736 bytes
[20:31:09][D][debug:093]: Flash Chip: Size=4096kB Speed=40MHz Mode=DOUT
[20:31:09][D][debug:250]: Chip ID: 0x00E1DDC2
[20:31:09][D][debug:251]: SDK Version: 2.2.2-dev(38a443e)
[20:31:09][D][debug:252]: Core Version: 3.0.2
[20:31:09][D][debug:253]: Boot Version=6 Mode=1
[20:31:09][D][debug:254]: CPU Frequency: 80
[20:31:09][D][debug:255]: Flash Chip ID=0x001640D8
[20:31:09][D][debug:256]: Reset Reason: External System
[20:31:09][D][debug:257]: Reset Info: External System
[20:31:09][D][api:102]: Accepted 192.168.178.37
[20:31:10][D][api.connection:917]: Home Assistant 2022.11.4 (192.168.178.37): Connected successfully
[20:31:10][D][nextion:251]: Manually set nextion report ready
[20:31:10][D][uart_debug:114]: >>> 62:6B:63:6D:64:3D:33:FF:FF:FF:64:69:6D:3D:31:30:30:FF:FF:FF:70:61:67:65:20:30:FF:FF:FF:74:68:75:70:3D:31:FF:FF:FF
[20:31:10][D][uart_debug:114]: <<< 01:FF:FF:FF:01:FF:FF:FF:FD
[20:31:10][D][homeassistant.binary_sensor:026]: 'binary_sensor.someone_home': Got state ON
[20:31:10][D][binary_sensor:034]: 'someone_home': Sending initial state ON
[20:31:10][D][homeassistant.binary_sensor:026]: 'binary_sensor.night': Got state ON
[20:31:10][D][binary_sensor:034]: 'night': Sending initial state ON
[20:31:10][D][homeassistant.binary_sensor:026]: 'binary_sensor.washer_rup': Got state OFF
[20:31:10][D][binary_sensor:034]: 'washer_rup': Sending initial state OFF
[20:31:10][D][homeassistant.binary_sensor:026]: 'binary_sensor.dryer_rup': Got state OFF
[20:31:10][D][binary_sensor:034]: 'dryer_rup': Sending initial state OFF
[20:31:10][D][homeassistant.sensor:024]: 'sensor.hmip_wettersensor_temperature': Got state 6.20
[20:31:10][D][sensor:126]: 'temperature': Sending state 6.20000  with 1 decimals of accuracy
[20:31:10][D][homeassistant.sensor:024]: 'sensor.min_temp_next_24h': Got state 5.50
[20:31:10][D][sensor:126]: 'min_temp': Sending state 5.50000  with 1 decimals of accuracy
[20:31:10][D][homeassistant.sensor:024]: 'sensor.max_temp_next_24h': Got state 8.00
[20:31:10][D][sensor:126]: 'max_temp': Sending state 8.00000  with 1 decimals of accuracy
[20:31:11][D][uart_debug:114]: <<< 01:FF:FF:FF
[20:31:11][D][homeassistant.sensor:024]: 'sensor.next_waste_gray': Got state 1.00
[20:31:11][D][sensor:126]: 'ton_gray': Sending state 1.00000  with 1 decimals of accuracy
[20:31:11][D][homeassistant.sensor:024]: 'sensor.next_waste_green': Got state 10.00
[20:31:11][D][sensor:126]: 'ton_green': Sending state 10.00000  with 1 decimals of accuracy
[20:31:11][D][homeassistant.sensor:024]: 'sensor.next_waste_yellow': Got state 14.00
[20:31:11][D][sensor:126]: 'ton_yellow': Sending state 14.00000  with 1 decimals of accuracy
[20:31:11][D][homeassistant.sensor:024]: 'sensor.weekday': Got state 1.00
[20:31:11][D][sensor:126]: 'weekday': Sending state 1.00000  with 1 decimals of accuracy
[20:31:11][D][homeassistant.sensor:024]: 'sensor.senec_dash_house_power': Got state 0.40
[20:31:11][D][sensor:126]: 'house_power': Sending state 0.40000  with 1 decimals of accuracy
[20:31:11][D][homeassistant.sensor:024]: 'sensor.senec_dash_solar_generated_power': Got state 0.00
[20:31:11][D][sensor:126]: 'solar_power': Sending state 0.00000  with 1 decimals of accuracy
[20:31:11][D][homeassistant.sensor:024]: 'sensor.senec_dash_battery_charge_percent': Got state 0.00
[20:31:11][D][sensor:126]: 'solar_battery': Sending state 0.00000  with 1 decimals of accuracy
[20:36:01][I][ota:113]: Boot seems successful, resetting boot loop counter.
[20:37:04][D][homeassistant.sensor:024]: 'sensor.hmip_wettersensor_temperature': Got state 6.30
[20:37:04][D][sensor:126]: 'temperature': Sending state 6.30000  with 1 decimals of accuracy

Here is my yaml:

esphome:
  name: kitiboard

esp8266:
  board: esp01_1m

debug:

# Enable logging
logger:
  baud_rate: 115200

# Enable Home Assistant API
api:
  encryption:
    key: "xxx"
  password: xxx

ota:
  password: "xxx"
  #password: xxx

wifi:
  ssid: "freeocean"
  password: "xxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Kitiboard Fallback Hotspot"
    password: "xxx"

captive_portal:

uart:
  #id: uart_2
  #rx_pin: D1
  #tx_pin: D2
  tx_pin: GPIO4
  rx_pin: GPIO5
  baud_rate: 115200
  #baud_rate: 9600
  #baud_rate: 460800
  #parity: ODD
  debug: 

time:
  - platform: sntp
    id: sntp_time
    timezone: Europe/Berlin

sensor:
  - platform: homeassistant
    id: temperature
    entity_id: sensor.hmip_wettersensor_temperature
  - platform: homeassistant
    id: min_temp
    entity_id: sensor.min_temp_next_24h
  - platform: homeassistant
    id: max_temp
    entity_id: sensor.max_temp_next_24h
  - platform: homeassistant
    id: ton_gray
    entity_id: sensor.next_waste_gray
  - platform: homeassistant
    id: ton_green
    entity_id: sensor.next_waste_green
  - platform: homeassistant
    id: ton_yellow
    entity_id: sensor.next_waste_yellow
  - platform: homeassistant
    id: weekday
    entity_id: sensor.weekday
  - platform: homeassistant
    id: house_power
    entity_id: sensor.senec_dash_house_power
  - platform: homeassistant
    id: solar_power
    entity_id: sensor.senec_dash_solar_generated_power
  - platform: homeassistant
    id: solar_battery
    entity_id: sensor.senec_dash_battery_charge_percent

binary_sensor:
  - platform: homeassistant
    id: someone_home
    entity_id: binary_sensor.someone_home
  - platform: homeassistant
    id: night
    entity_id: binary_sensor.night
  - platform: homeassistant
    id: washer_rup
    entity_id: binary_sensor.washer_rup
  - platform: homeassistant
    id: dryer_rup
    entity_id: binary_sensor.dryer_rup

display:
  - platform: nextion
    id: kiti
    update_interval: 5s
    lambda: |-
      auto time = id(sntp_time).now();
      it.set_wait_for_ack(false);
      it.set_component_text_printf("hour","%02d",time.hour);
      it.set_component_text_printf("minute","%02d",time.minute);
      it.set_component_text_printf("datem","%02d",time.month);
      it.set_component_text_printf("dated","%02d",time.day_of_month);
      it.set_component_text_printf("mintemp","%.1f",id(min_temp).state);
      it.set_component_text_printf("maxtemp","%.1f",id(max_temp).state);
      it.set_component_text_printf("temp","%.1f",id(temperature).state);
      it.set_component_text_printf("pvhouse","%.1f",id(house_power).state);
      it.set_component_text_printf("pvsolar","%.1f",id(solar_power).state);
      it.set_component_text_printf("pvbattery","%.0f",id(solar_battery).state);
      if (id(ton_gray).state == 0) {
        it.set_component_text("grau", "Heute");
      } else if (id(ton_gray).state == 1) {
          it.set_component_text("grau", "Morgen");
      } else {
          it.set_component_text_printf("grau","%.0f Tage",id(ton_gray).state);
      }
      if (id(ton_green).state == 0) {
        it.set_component_text("papier", "Heute");
      } else if (id(ton_green).state == 1) {
          it.set_component_text("papier", "Morgen");
      } else {
          it.set_component_text_printf("papier","%.0f Tage",id(ton_green).state);
      }
      if (id(ton_yellow).state == 0) {
        it.set_component_text("gelb", "Heute");
      } else if (id(ton_yellow).state == 1) {
          it.set_component_text("gelb", "Morgen");
      } else {
          it.set_component_text_printf("gelb","%.0f Tage",id(ton_yellow).state);
      }
      if (id(washer_rup).state) {
          it.send_command_printf("tm1.en=1");
      } else {
         it.send_command_printf("tm1.en=0");
         it.send_command_printf("washer.pic=10");
      }
      if (id(dryer_rup).state) {
          it.send_command_printf("tm0.en=1");
      } else {
         it.send_command_printf("tm0.en=0");
         it.send_command_printf("dryer.pic=10");
      }
      if (id(weekday).state == 1) {
        it.set_component_text("dateday", "Montag");
      } else if (id(weekday).state == 2) {
          it.set_component_text("dateday", "Dienstag");
      } else if (id(weekday).state == 3) {
          it.set_component_text("dateday", "Mittwoch");
      } else if (id(weekday).state == 4) {
          it.set_component_text("dateday", "Donnerstag");
      } else if (id(weekday).state == 5) {
          it.set_component_text("dateday", "Freitag");
      } else if (id(weekday).state == 6) {
          it.set_component_text("dateday", "Samstag");
      } else if (id(weekday).state == 0) {
          it.set_component_text("dateday", "Sonntag");
      } else {
          it.set_component_text("dateday", "Feiertag");
      }

Here is the original yaml that still works with ESPHome version 2022.5.0 on the “old” display:

esphome:
  name: kitboard
  platform: ESP8266
  board: d1_mini_lite

wifi:
  ssid: "xxx"
  password: "xxx"

  ap:
    ssid: "Kitboard Fallback Hotspot"
    password: "xxx"

logger:
  baud_rate: 0

api:
  password: "xxx"

ota:
  password: "xxx"

uart:
  rx_pin: D1
  tx_pin: D2
  baud_rate: 115200

time:
  - platform: sntp
    id: sntp_time
    timezone: Europe/Berlin

sensor:
  - platform: homeassistant
    id: temperature
    entity_id: sensor.hmip_wettersensor_temperature
  - platform: homeassistant
    id: min_temp
    entity_id: sensor.min_temp_next_24h
  - platform: homeassistant
    id: max_temp
    entity_id: sensor.max_temp_next_24h
  - platform: homeassistant
    id: ton_gray
    entity_id: sensor.next_waste_gray
  - platform: homeassistant
    id: ton_green
    entity_id: sensor.next_waste_green
  - platform: homeassistant
    id: ton_yellow
    entity_id: sensor.next_waste_yellow
  - platform: homeassistant
    id: weekday
    entity_id: sensor.weekday
  - platform: homeassistant
    id: house_power
    entity_id: sensor.senec_dash_house_power
  - platform: homeassistant
    id: solar_power
    entity_id: sensor.senec_dash_solar_generated_power
  - platform: homeassistant
    id: solar_battery
    entity_id: sensor.senec_dash_battery_charge_percent

binary_sensor:
  - platform: homeassistant
    id: someone_home
    entity_id: binary_sensor.someone_home
  - platform: homeassistant
    id: night
    entity_id: binary_sensor.night
  - platform: homeassistant
    id: washer_rup
    entity_id: binary_sensor.washer_rup
  - platform: homeassistant
    id: dryer_rup
    entity_id: binary_sensor.dryer_rup

display:
  - platform: nextion
    id: kitb
    update_interval: 5s
    lambda: |-
      auto time = id(sntp_time).now();
      it.set_component_text_printf("hour","%02d",time.hour);
      it.set_component_text_printf("minute","%02d",time.minute);
      it.set_component_text_printf("datem","%02d",time.month);
      it.set_component_text_printf("dated","%02d",time.day_of_month);
      it.set_component_text_printf("mintemp","%.1f",id(min_temp).state);
      it.set_component_text_printf("maxtemp","%.1f",id(max_temp).state);
      it.set_component_text_printf("temp","%.1f",id(temperature).state);
      it.set_component_text_printf("pvhouse","%.1f",id(house_power).state);
      it.set_component_text_printf("pvsolar","%.1f",id(solar_power).state);
      it.set_component_text_printf("pvbattery","%.0f",id(solar_battery).state);
      if (id(ton_gray).state == 0) {
        it.set_component_text("grau", "Heute");
      } else if (id(ton_gray).state == 1) {
          it.set_component_text("grau", "Morgen");
      } else {
          it.set_component_text_printf("grau","%.0f Tage",id(ton_gray).state);
      }
      if (id(ton_green).state == 0) {
        it.set_component_text("papier", "Heute");
      } else if (id(ton_green).state == 1) {
          it.set_component_text("papier", "Morgen");
      } else {
          it.set_component_text_printf("papier","%.0f Tage",id(ton_green).state);
      }
      if (id(ton_yellow).state == 0) {
        it.set_component_text("gelb", "Heute");
      } else if (id(ton_yellow).state == 1) {
          it.set_component_text("gelb", "Morgen");
      } else {
          it.set_component_text_printf("gelb","%.0f Tage",id(ton_yellow).state);
      }
      if (id(washer_rup).state) {
          it.send_command_printf("tm1.en=1");
      } else {
         it.send_command_printf("tm1.en=0");
         it.send_command_printf("washer.pic=10");
      }
      if (id(dryer_rup).state) {
          it.send_command_printf("tm0.en=1");
      } else {
         it.send_command_printf("tm0.en=0");
         it.send_command_printf("dryer.pic=10");
      }
      if (id(weekday).state == 1) {
        it.set_component_text("dateday", "Montag");
      } else if (id(weekday).state == 2) {
          it.set_component_text("dateday", "Dienstag");
      } else if (id(weekday).state == 3) {
          it.set_component_text("dateday", "Mittwoch");
      } else if (id(weekday).state == 4) {
          it.set_component_text("dateday", "Donnerstag");
      } else if (id(weekday).state == 5) {
          it.set_component_text("dateday", "Freitag");
      } else if (id(weekday).state == 6) {
          it.set_component_text("dateday", "Samstag");
      } else if (id(weekday).state == 0) {
          it.set_component_text("dateday", "Sonntag");
      } else {
          it.set_component_text("dateday", "Feiertag");
      }

In the comment of @kbx81 I read something about a problem with the EPS8266, that only GPIO 1 & 3 have a serial ports. I have already tried here in the yaml to go over these pins, but then I get no connection to the Nextion dispaly established. Even if I set the baud rate to 9600 I don’t get a connection.

According to my opinion the log is error free. I don’t know what to do. My last idea, if no one here can help me either I upgrade to the ESP32. But maybe I am missing something?

Nextion reported variable name invalid!

Olá, para este erro eu resolvi enviando o nº da pagina.

lambda: |-
if (id(Saida4_EspHome3).state) {
it.send_command_printf(“page0.home3S4.pic=8”);
} else {
it.send_command_printf(“page0.home3S4.pic=9”);
}
if (id(Saida5_EspHome3).state) {
it.send_command_printf(“page1.home3S5.pic=8”);
} else {
it.send_command_printf(“page1.home3S5.pic=9”);
}

I’ve updates now to an ESP32. My dashboard work now! But I have now many lines with

Nextion reported variable name invalid!

I try with der page in front, but it don’t work for me.

Oh and for the error:

This command is deprecated

I’ve just deleted the line:
it.set_wait_for_ack(false);

For those that are interested and did not know this already.
How to overcome poor baud rate

I got my Nextion 2.8" working on esp32 and esp8266 but the comms was only 9600 which is just crashing if you want to upload a new TFT OTA. After some asking around (discord), I found out that one can pre-set the Nextion screen to use a higher baud-rate.

I managed to get this working by sending a empty (low data) tft, prepared with Nextion editor where I added bauds=115200 (not baud but bauds) in the Nextion Editor > Program.s tab.
I did use a ft232 to push the data to my screen
After that my wemos d1 could communicate with the Nextion at 115200 (I did not test with esp32)

Thanks to @kzkz for putting me in the right direction

2 Likes

Can someone help me? I need a button on my Nextion 3.5 that will run the call service to update the tft. I can’t figure it out . Thanks in advance.