Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.26k stars 234 forks source link

Unable to upload TFT after update to 4.3.1 #1970

Closed slangpetter closed 3 months ago

slangpetter commented 3 months ago

TFT Version

4.2.6

ESPHome Version

4.3.1

Blueprint Version

4.3.1

Panel Model

EU

What is the bug?

When I push the TFT upload button ith shows a moment the small window what says setting baudrate and after 10 seconds or so it reboots the NSpanel

Steps to Reproduce

Go to ESPhome integration go to device press TFT upload button

Your Panel's YAML

substitutions:
  # Settings - Editable values
  device_name: "nslekrum1"
  #friendly_name: "Living Room NSP"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "https://grinda.duckdns.org:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

# Customization area
##### My customization - Start #####

# Encrypt the communication between ESPHome and Home Assistant
api:
  encryption:
    key: "fpWCdXJ17hOQ1JhY32maisPG9I2bx90wDVq1TZMXWP8="
wifi:
  manual_ip:
    static_ip: 192.0.2.31
    gateway: 192.0.2.4
    subnet: 255.255.255.0

##### My customization - End #####

# Core and optional configurations
packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # Optional advanced and add-on configurations
      #- advanced/esphome/nspanel_esphome_advanced.yaml
      # - nspanel_esphome_addon_climate_cool.yaml
      #- nspanel_esphome_addon_climate_heat.yaml
      # - nspanel_esphome_addon_climate_dual.yaml
    refresh: 300s

esp32:
  framework:
    type: esp-idf

ESPHome Logs

INFO ESPHome 2024.3.0 INFO Reading configuration /config/esphome/nslekrum1.yaml... INFO Detected timezone 'Europe/Stockholm' INFO Starting log output from 192.0.2.31 using esphome API INFO Successfully connected to nslekrum1 @ 192.0.2.31 in 0.133s INFO Successful handshake with nslekrum1 @ 192.0.2.31 in 0.107s [18:16:21][I][app:102]: ESPHome version 2024.3.0 compiled on Mar 22 2024, 16:24:53

[18:16:21][C][wifi:408]: Local MAC: E4:65:B8:1D:21:BC [18:16:21][C][wifi:413]: SSID: [redacted] [18:16:21][C][wifi:416]: IP Address: 192.0.2.31 [18:16:21][C][wifi:420]: BSSID: [redacted]

[18:16:21][C][wifi:423]: Signal strength: -49 dB ▂▄▆█ [18:16:21][C][wifi:427]: Channel: 7 [18:16:21][C][wifi:428]: Subnet: 255.255.255.0 [18:16:21][C][wifi:429]: Gateway: 192.0.2.4 [18:16:21][C][wifi:430]: DNS1: 0.0.0.0 [18:16:21][C][wifi:431]: DNS2: 0.0.0.0

[18:16:21][C][logger:167]: Level: DEBUG [18:16:21][C][logger:169]: Log Baud Rate: 0 [18:16:21][C][logger:170]: Hardware UART: UART0 [18:16:21][C][uart.idf:139]: UART Bus 0: [18:16:21][C][uart.idf:140]: TX Pin: GPIO16 [18:16:21][C][uart.idf:141]: RX Pin: GPIO17 [18:16:21][C][uart.idf:143]: RX Buffer Size: 256 [18:16:21][C][uart.idf:145]: Baud Rate: 115200 baud [18:16:21][C][uart.idf:146]: Data Bits: 8 [18:16:21][C][uart.idf:147]: Parity: NONE [18:16:21][C][uart.idf:148]: Stop bits: 1 [18:16:21][C][ledc.output:164]: LEDC Output: [18:16:21][C][ledc.output:165]: Pin GPIO21 [18:16:21][C][ledc.output:166]: LEDC Channel: 0 [18:16:21][C][ledc.output:167]: PWM Frequency: 1000.0 Hz [18:16:21][C][ledc.output:168]: Bit depth: 16 [18:16:21][C][template.binary_sensor:028]: Template Binary Sensor 'Nextion display' [18:16:21][C][template.binary_sensor:028]: Device Class: 'connectivity' [18:16:21][C][template.number:050]: Template Number 'Display Brightness' [18:16:21][C][template.number:050]: Unit of Measurement: '%' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.number:050]: Template Number 'Display Brightness Dimdown' [18:16:21][C][template.number:050]: Unit of Measurement: '%' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.number:050]: Template Number 'Display Brightness Sleep' [18:16:21][C][template.number:050]: Unit of Measurement: '%' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.number:050]: Template Number 'Temperature Correction' [18:16:21][C][template.number:050]: Unit of Measurement: '°C' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.number:050]: Template Number 'Timeout Page'

[18:16:21][C][template.number:050]: Unit of Measurement: 's' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.number:050]: Template Number 'Timeout Dimming'

[18:16:21][C][template.number:050]: Unit of Measurement: 's' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.number:050]: Template Number 'Timeout Sleep'

[18:16:21][C][template.number:050]: Unit of Measurement: 's' [18:16:21][C][template.number:051]: Optimistic: YES [18:16:21][C][template.number:052]: Update Interval: 60.0s [18:16:21][C][template.select:065]: Template Select 'Baud rate'

[18:16:21][C][template.select:066]: Update Interval: 60.0s [18:16:21][C][template.select:069]: Optimistic: YES [18:16:21][C][template.select:070]: Initial Option: 115200 [18:16:21][C][template.select:071]: Restore Value: YES [18:16:21][C][template.select:065]: Template Select 'Wake-up page'

[18:16:21][C][template.select:066]: Update Interval: 60.0s [18:16:21][C][template.select:069]: Optimistic: YES [18:16:21][C][template.select:070]: Initial Option: home [18:16:21][C][template.select:071]: Restore Value: YES [18:16:21][C][template.select:065]: Template Select 'Update TFT display - Model'

[18:16:21][C][template.select:066]: Update Interval: 60.0s [18:16:21][C][template.select:069]: Optimistic: YES [18:16:21][C][template.select:070]: Initial Option: NSPanel EU [18:16:21][C][template.select:071]: Restore Value: YES [18:16:21][C][template.select:065]: Template Select 'Update TFT display - Baud rate'

[18:16:21][C][template.select:066]: Update Interval: 60.0s [18:16:21][C][template.select:069]: Optimistic: YES [18:16:21][C][template.select:070]: Initial Option: 921600 [18:16:21][C][template.select:071]: Restore Value: YES [18:16:21][C][switch.gpio:068]: GPIO Switch 'Nextion display - Power' [18:16:21][C][switch.gpio:091]: Restore Mode: always ON [18:16:21][C][switch.gpio:031]: Pin: GPIO4 [18:16:21][C][template.text_sensor:020]: Template Sensor 'Device Name'

[18:16:21][C][template.text_sensor:020]: Template Sensor 'Detailed Entity'

[18:16:21][C][template.text_sensor:020]: Template Sensor 'Notification Label' [18:16:21][C][template.text_sensor:020]: Template Sensor 'Notification Text' [18:16:21][C][template.sensor:022]: Template Sensor 'Blueprint' [18:16:21][C][template.sensor:022]: State Class: '' [18:16:21][C][template.sensor:022]: Unit of Measurement: '%' [18:16:21][C][template.sensor:022]: Accuracy Decimals: 1

[18:16:21][C][template.sensor:023]: Update Interval: 60.0s [18:16:21][C][switch.gpio:068]: GPIO Switch 'Relay 1' [18:16:21][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [18:16:21][C][switch.gpio:031]: Pin: GPIO22 [18:16:21][C][switch.gpio:068]: GPIO Switch 'Relay 2' [18:16:21][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [18:16:21][C][switch.gpio:031]: Pin: GPIO19 [18:16:22][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Left Button' [18:16:22][C][gpio.binary_sensor:016]: Pin: GPIO14 [18:16:22][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Right Button' [18:16:22][C][gpio.binary_sensor:016]: Pin: GPIO27 [18:16:22][C][template.switch:068]: Template Switch 'Notification unread' [18:16:22][C][template.switch:091]: Restore Mode: always OFF [18:16:22][C][template.switch:057]: Optimistic: YES [18:16:22][C][template.switch:068]: Template Switch 'Notification sound' [18:16:22][C][template.switch:091]: Restore Mode: restore defaults to OFF [18:16:22][C][template.switch:057]: Optimistic: YES

[18:16:22][C][nextion:129]: Device Model: NX4832F035_011C [18:16:22][C][nextion:130]: Firmware Version: 72 [18:16:22][C][nextion:131]: Serial Number: D9B334017B606E50 [18:16:22][C][nextion:132]: Flash Size: 16777216 [18:16:22][C][nextion:133]: Wake On Touch: YES [18:16:22][C][nextion:134]: Exit reparse: YES [18:16:22][C][nextion:145]: Start Up Page: 0 [18:16:22][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'

[18:16:22][C][restart.button:017]: Restart Button 'Restart' [18:16:22][C][adc:097]: ADC Sensor 'ntc_source' [18:16:22][C][adc:097]: Device Class: 'voltage' [18:16:22][C][adc:097]: State Class: 'measurement' [18:16:22][C][adc:097]: Unit of Measurement: 'V' [18:16:22][C][adc:097]: Accuracy Decimals: 2 [18:16:22][C][adc:107]: Pin: GPIO38 [18:16:22][C][adc:122]: Attenuation: 11db [18:16:22][C][adc:141]: Samples: 12 [18:16:22][C][adc:142]: Update Interval: 60.0s [18:16:22][C][resistance:010]: Resistance Sensor 'resistance_sensor' [18:16:22][C][resistance:010]: State Class: 'measurement' [18:16:22][C][resistance:010]: Unit of Measurement: 'Ω' [18:16:22][C][resistance:010]: Accuracy Decimals: 1

[18:16:22][C][resistance:011]: Configuration: DOWNSTREAM [18:16:22][C][resistance:012]: Resistor: 11200.00Ω [18:16:22][C][resistance:013]: Reference Voltage: 3.3V [18:16:22][C][ntc:014]: NTC Sensor 'Temperature' [18:16:22][C][ntc:014]: Device Class: 'temperature' [18:16:22][C][ntc:014]: State Class: 'measurement' [18:16:22][C][ntc:014]: Unit of Measurement: '°C' [18:16:22][C][ntc:014]: Accuracy Decimals: 1 [18:16:22][C][homeassistant.time:010]: Home Assistant Time:

[18:16:23][I][ota:117]: Boot seems successful, resetting boot loop counter. [18:16:23][D][esp32.preferences:114]: Saving 1 preferences to flash... [18:16:23][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed

[18:16:23][C][mdns:116]: Hostname: nslekrum1 [18:16:23][C][ota:096]: Over-The-Air Updates: [18:16:23][C][ota:097]: Address: 192.0.2.31:3232 [18:16:23][C][ota:100]: Using Password. [18:16:23][C][ota:103]: OTA version: 2. [18:16:23][C][api:139]: API Server: [18:16:23][C][api:140]: Address: 192.0.2.31:6053 [18:16:23][C][api:142]: Using noise encryption: YES [18:16:23][C][wifi_signal.sensor:009]: WiFi Signal 'RSSI' [18:16:23][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [18:16:23][C][wifi_signal.sensor:009]: State Class: 'measurement' [18:16:23][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [18:16:23][C][wifi_signal.sensor:009]: Accuracy Decimals: 0

[18:17:00][W][nextion:405]: Nextion reported variable name invalid! [18:17:00][W][nextion:405]: Nextion reported variable name invalid! [18:17:08][D][sensor:094]: 'RSSI': Sending state -52.00000 dBm with 0 decimals of accuracy [18:17:13][D][text_sensor:064]: 'Device Name': Sending state 'nslekrum1' [18:17:16][W][nextion:405]: Nextion reported variable name invalid! [18:17:16][W][nextion:405]: Nextion reported variable name invalid! [18:17:20][D][sensor:094]: 'ntc_source': Sending state 1.62600 V with 2 decimals of accuracy [18:17:20][D][resistance:039]: 'resistance_sensor' - Resistance 10878.9Ω [18:17:20][D][sensor:094]: 'resistance_sensor': Sending state 10878.85352 Ω with 1 decimals of accuracy [18:17:20][D][ntc:026]: 'Temperature' - Temperature: 23.1°C [18:17:20][D][sensor:094]: 'Temperature': Sending state 24.11627 °C with 1 decimals of accuracy [18:17:20][W][nextion:405]: Nextion reported variable name invalid! [18:17:28][D][button:010]: 'Update TFT display' Pressed. [18:17:28][D][script.nextion_status:110]: Nextion status: [18:17:28][D][script.nextion_status:111]: Is detected: YES [18:17:28][D][script.nextion_status:112]: Is setup: YES [18:17:28][D][script.nextion_status:113]: Queue size: 0 [18:17:28][D][addon_upload_tft.script.upload_tft:195]: Starting the upload script [18:17:28][D][addon_upload_tft.script.upload_tft:196]: Valid TFT: YES [18:17:28][D][addon_upload_tft.script.upload_tft:197]: Current baud rate: 115200 bps [18:17:28][D][addon_upload_tft.script.upload_tft:198]: Target upload baud rate: 115200 bps [18:17:28][D][addon_upload_tft.script.upload_tft:199]: Upload URL: https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/v4.3.1/hmi/nspanel_eu.tft [18:17:28][D][nextion:464]: Got new page: 0 [18:17:30][D][addon_upload_tft.script.open_upload_dialog:137]: Showing upload dialog page [18:17:30][D][nextion:464]: Got new page: 26 [18:17:30][D][text_sensor:064]: 'Current Page': Sending state 'confirm' [18:17:30][D][addon_upload_tft.script.report_upload_progress:161]: Set Nextion unavailable for blueprint calls [18:17:30][D][binary_sensor:036]: 'Nextion display': Sending state OFF [18:17:30][D][addon_upload_tft.script.report_upload_progress:161]: Stopping other scripts [18:17:30][D][binary_sensor:036]: 'Nextion display': Sending state ON [18:17:31][D][script.nextion_status:110]: Nextion status: [18:17:31][D][script.nextion_status:111]: Is detected: YES [18:17:31][D][script.nextion_status:112]: Is setup: YES [18:17:31][D][script.nextion_status:113]: Queue size: 0 [18:17:31][D][addon_upload_tft.script.report_upload_progress:161]: Setting baud rate [18:17:33][D][main:338]: Attempting to upload TFT [18:17:33][D][addon_upload_tft.script.report_upload_progress:161]: Attempt #1 at 115200 bps [18:17:34][D][addon_upload_tft.script.nextion_upload:121]: Waiting for empty UART and Nextion queues [18:17:36][D][addon_upload_tft.script.nextion_upload:129]: Starting TFT upload... [18:17:36][D][nextion.upload.idf:128]: Nextion TFT upload requested [18:17:36][D][nextion.upload.idf:129]: Exit reparse: NO [18:17:36][D][nextion.upload.idf:130]: URL: https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/v4.3.1/hmi/nspanel_eu.tft [18:17:36][D][nextion.upload.idf:151]: Baud rate: 115200 [18:17:36][D][esp-idf:000]: E (254214) esp-tls: couldn't get hostname for :raw.githubusercontent.com: getaddrinfo() returns 202, addrinfo=0x0

[18:17:36][D][esp-idf:000]: E (254216) esp-tls: Failed to open new connection

[18:17:36][D][esp-idf:000]: E (254218) TRANSPORT_BASE: Failed to open a new connection

[18:17:36][D][esp-idf:000]: E (254220) HTTP_CLIENT: Connection failed, sock < 0

[18:17:36][E][nextion.upload.idf:191]: HTTP request failed: ESP_ERR_HTTP_CONNECT [18:17:36][D][nextion.upload.idf:317]: Nextion TFT upload finished: HTTP request failed [18:17:36][E][nextion.upload.idf:332]: Nextion TFT upload failed [18:17:36][D][addon_upload_tft.script.nextion_upload:131]: TFT upload: HTTP request failed [18:17:36][D][addon_upload_tft.script.report_upload_progress:161]: Attempt #1 at 115200 bps returned: HTTP request failed WARNING nslekrum1 @ 192.0.2.31: Connection error occurred: [Errno 104] Connection reset by peer INFO Processing unexpected disconnect from ESPHome API for nslekrum1 @ 192.0.2.31 WARNING Disconnected from API INFO Successfully connected to nslekrum1 @ 192.0.2.31 in 0.008s INFO Successful handshake with nslekrum1 @ 192.0.2.31 in 0.112s [18:18:07][D][api:102]: Accepted 192.0.2.10 [18:18:08][W][component:232]: Component api took a long time for an operation (57 ms). [18:18:08][W][component:233]: Components should block for at most 30 ms. [18:18:08][D][api.connection:1159]: Home Assistant 2024.3.2 (192.0.2.10): Connected successfully [18:18:08][D][time:049]: Synchronized time: 2024-03-22 18:18:08 [18:18:08][D][main:118]: System clock synchronized

[18:18:10][D][script.boot_progress:1831]: Progress: 45% [18:18:10][W][nextion:405]: Nextion reported variable name invalid! [18:18:10][W][nextion:405]: Nextion reported variable name invalid! [18:18:12][D][text_sensor:064]: 'Device Name': Sending state 'nslekrum1'

[18:18:15][D][script.boot_progress:1827]: Progress: Completed [18:18:15][W][nextion:405]: Nextion reported variable name invalid! [18:18:15][W][nextion:405]: Nextion reported variable name invalid! [18:18:16][D][script.page_boot:2168]: Jump to wake-up page: home [18:18:16][D][sensor:094]: 'Display Current brightness': Sending state 50.00000 % with 0 decimals of accuracy [18:18:17][D][nextion:464]: Got new page: 0 [18:18:17][D][sensor:094]: 'ntc_source': Sending state 1.62600 V with 2 decimals of accuracy [18:18:17][D][resistance:039]: 'resistance_sensor' - Resistance 10878.9Ω [18:18:17][D][sensor:094]: 'resistance_sensor': Sending state 10878.85352 Ω with 1 decimals of accuracy [18:18:17][D][ntc:026]: 'Temperature' - Temperature: 23.1°C [18:18:17][D][sensor:094]: 'Temperature': Sending state 24.11627 °C with 1 decimals of accuracy [18:18:17][W][nextion:405]: Nextion reported variable name invalid! [18:18:21][D][sensor:094]: 'Display Current brightness': Sending state 50.00000 % with 0 decimals of accuracy [18:18:45][D][sensor:094]: 'RSSI': Sending state -49.00000 dBm with 0 decimals of accuracy

[18:18:53][D][script.check_versions:1866]: ESPHome: 4.3.1 [18:18:53][D][script.check_versions:1867]: TFT: 4.2.6 [18:18:53][E][script.check_versions:1869]: TFT version mismatch!

[18:18:53][E][script.check_versions:1872]: Blueprint version mismatch! [18:19:00][W][nextion:405]: Nextion reported variable name invalid! [18:19:00][W][nextion:405]: Nextion reported variable name invalid!

Home Assistant Logs

No response

slangpetter commented 3 months ago

Added dns1 & dns2. That seems to have solved my problem. Now the TFT is loading.