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 235 forks source link

No connection to HA is etablished `Bug` #1906

Closed ghostridernrw40 closed 3 months ago

ghostridernrw40 commented 3 months ago

TFT Version

4.3

ESPHome Version

4.2.6

Blueprint Version

4.3

Panel Model

EU

What is the bug?

Panel connection to HA is not etablished

Steps to Reproduce

  1. new Blueprint version
  2. update ESP-Home
  3. Load new TFT

grafik

20240313_135030 20240313_135022

grafik

Your Panel's YAML

substitutions:

###### CHANGE ME START ######

  device_name: "nsoffice" 
  wifi_ssid: !secret nspanel_wifi_ssid
  wifi_password: !secret nspanel_wifi_password
  nextion_update_url: !secret nspanel_update_url
  #nextion_update_url: "http://192.168.178.20:8123/local/nspanel_blank.tft" # URL to local tft File
  #nextion_update_url: https://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_eu.tft

##### CHANGE ME END #####

##### DO NOT CHANGE ANYTHING! #####

packages:
  ##### download esphome code from Github
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files: [nspanel_esphome.yaml]
    refresh: 300s

##### DO NOT CHANGE ANYTHING! #####

##### My customization - Start #####
# Framework esp-idf
esp32:
  framework:
    type: esp-idf

# Encrypt the communication between ESPHome and Home Assistant
api:
  encryption:
    key: !secret nspanel_api_encryption_key

# Custom web server credentials
web_server:
  auth:
    username: !secret nspanel_web_server_username
    password: !secret nspanel_web_server_password

# Use my global OTA password
ota:
  password: !secret nspanel_ota_password

switch:
  - id: !extend relay_1  # Or relay_2
    restore_mode: ALWAYS_ON
##### My customization - End #####

ESPHome Logs

INFO ESPHome 2024.2.2 INFO Reading configuration /config/esphome/nsoffice.yaml... INFO Detected timezone 'Europe/Berlin' INFO Starting log output from 192.168.178.153 using esphome API INFO Successfully connected to nsoffice @ 192.168.178.153 in 0.084s INFO Successful handshake with nsoffice @ 192.168.178.153 in 0.113s [14:01:08][I][app:102]: ESPHome version 2024.2.2 compiled on Mar 13 2024, 10:35:18

[14:01:08][C][wifi:409]: Local MAC: 3C:E9:0E:85:B6:34 [14:01:08][C][wifi:414]: SSID: [redacted] [14:01:08][C][wifi:415]: IP Address: 192.168.178.153 [14:01:08][C][wifi:417]: BSSID: [redacted]

[14:01:08][C][wifi:420]: Signal strength: -47 dB ▂▄▆█ [14:01:08][C][wifi:424]: Channel: 11 [14:01:08][C][wifi:425]: Subnet: 255.255.255.0 [14:01:08][C][wifi:426]: Gateway: 192.168.178.1 [14:01:08][C][wifi:427]: DNS1: 192.168.178.253 [14:01:08][C][wifi:428]: DNS2: 0.0.0.0

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

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

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

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

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

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

[14:01:09][C][template.select:066]: Update Interval: 60.0s [14:01:09][C][template.select:069]: Optimistic: YES [14:01:09][C][template.select:070]: Initial Option: Use nextion_update_url [14:01:09][C][template.select:071]: Restore Value: YES [14:01:09][C][template.select:065]: Template Select 'Update TFT display - Baud rate'

[14:01:09][C][template.select:066]: Update Interval: 60.0s [14:01:09][C][template.select:069]: Optimistic: YES [14:01:09][C][template.select:070]: Initial Option: 921600 [14:01:09][C][template.select:071]: Restore Value: YES [14:01:09][C][template.sensor:022]: Template Sensor 'Blueprint' [14:01:09][C][template.sensor:022]: State Class: '' [14:01:09][C][template.sensor:022]: Unit of Measurement: '%' [14:01:09][C][template.sensor:022]: Accuracy Decimals: 1

[14:01:09][C][template.sensor:023]: Update Interval: 60.0s [14:01:09][C][template.text_sensor:020]: Template Sensor 'Detailed Entity'

[14:01:09][C][template.text_sensor:020]: Template Sensor 'Current page'

[14:01:09][C][template.text_sensor:020]: Template Sensor 'Notification Label' [14:01:09][C][template.text_sensor:020]: Template Sensor 'Notification Text' [14:01:09][C][template.text_sensor:020]: Template Sensor 'Version Blueprint'

[14:01:09][C][template.text_sensor:020]: Template Sensor 'Version ESPHome'

[14:01:09][C][switch.gpio:068]: GPIO Switch 'Relay 1' [14:01:09][C][switch.gpio:091]: Restore Mode: always ON [14:01:09][C][switch.gpio:031]: Pin: GPIO22 [14:01:09][C][switch.gpio:068]: GPIO Switch 'Relay 2' [14:01:09][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [14:01:09][C][switch.gpio:031]: Pin: GPIO19 [14:01:09][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Left Button' [14:01:09][C][gpio.binary_sensor:016]: Pin: GPIO14 [14:01:09][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Right Button' [14:01:09][C][gpio.binary_sensor:016]: Pin: GPIO27 [14:01:09][C][switch.gpio:068]: GPIO Switch 'Nextion display - Power' [14:01:09][C][switch.gpio:091]: Restore Mode: always ON [14:01:09][C][switch.gpio:031]: Pin: GPIO4 [14:01:10][C][template.switch:068]: Template Switch 'Notification sound' [14:01:10][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:01:10][C][template.switch:057]: Optimistic: YES [14:01:10][C][template.switch:068]: Template Switch 'Relay 1 Local' [14:01:10][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:01:10][C][template.switch:057]: Optimistic: YES [14:01:10][C][template.switch:068]: Template Switch 'Relay 2 Local' [14:01:10][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:01:10][C][template.switch:057]: Optimistic: YES [14:01:10][C][template.switch:068]: Template Switch 'Notification unread' [14:01:10][C][template.switch:091]: Restore Mode: always OFF [14:01:10][C][template.switch:057]: Optimistic: YES

[14:01:10][C][nextion:129]: Device Model: NX4832F035_011C [14:01:10][C][nextion:130]: Firmware Version: 72 [14:01:10][C][nextion:131]: Serial Number: 49B034011DA56037 [14:01:10][C][nextion:132]: Flash Size: 16777216 [14:01:10][C][nextion:133]: Wake On Touch: YES [14:01:10][C][nextion:134]: Exit reparse: YES [14:01:10][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'

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

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

[14:01:10][C][status:034]: Status Binary Sensor 'Status' [14:01:10][C][status:034]: Device Class: 'connectivity' [14:01:11][C][web_server:168]: Web Server: [14:01:11][C][web_server:169]: Address: nsoffice.local:80

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

[14:01:23][I][addon_upload_tft.script.report_settings:137]: TFT URL: http://192.168.178.20:8123/local/nspanel_eu.tft

[14:01:23][I][addon_upload_tft.script.report_settings:139]: nextion_update_url: http://192.168.178.20:8123/local/nspanel_eu.tft [14:01:23][I][addon_upload_tft.script.report_settings:140]: nextion_update_base_url: https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/ [14:01:23][I][addon_upload_tft.script.report_settings:141]: TFT upload baud rate: 921600 bps [14:01:30][I][script.watchdog:3219]: Wi-Fi: Excellent (-47 dBm) [14:01:30][I][script.watchdog:3238]: API: Connected

[14:01:30][W][script.watchdog:3261]: Init steps: 0 (0.0%) [14:01:30][W][script.watchdog:3262]: State: Pending [14:01:30][I][script.watchdog:3263]: Requesting blueprint settings

[14:01:30][I][script.watchdog:3274]: Version: 4.2.6 [14:01:30][I][script.watchdog:3285]: Heap: 134588 bytes (45%) [14:01:30][I][script.watchdog:3287]: Framework: ESP-IDF

[14:01:30][I][script.watchdog:3291]: Baud rate: 115200 bps [14:01:30][I][script.watchdog:3292]: Queue size: 8

[14:01:30][I][script.watchdog:3297]: Queue size: 2 [14:01:30][I][script.watchdog:3299]: Is setup: True [14:01:30][I][script.watchdog:3306]: Init: True [14:01:30][I][script.watchdog:3312]: TFT: 4.3.0 [14:01:30][I][addon_upload_tft.script.watchdog:409]: Add-on Upload TFT: [14:01:30][I][addon_upload_tft.script.watchdog:410]: File model: Use nextion_update_url [14:01:30][I][addon_upload_tft.script.watchdog:411]: Valid TFT: YES [14:01:30][W][nextion:405]: Nextion reported variable name invalid! [14:01:30][W][nextion:405]: Nextion reported variable name invalid! [14:01:36][D][text_sensor:064]: 'Version ESPHome': Sending state '4.2.6' [14:01:36][D][text_sensor.version_esphome:1783]: ESPHome version: 4.2.6

Home Assistant Logs

No response

valerix85 commented 3 months ago

@ghostridernrw40 in the display image you can see that the ESPHome version is old, please try to clean the build files and install it again.

lloydbayley commented 3 months ago

To upgrade the new framework, you'll have to flash the panel via serial. Otherwise, trying it via OTA will result in this behavior. This is what I had when I was testing things out and trying it via OTA to see what would/wouldn't happen.

If you can't/don't want to immediately flash it, you can use the old framework temporarily with these lines in your devices YAML.

esp32:
  framework:
    type: arduino

More here: https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.0

edwardtfn commented 3 months ago

I fully agree with the suggestions from @lloydbayley, but I don't think that is the case here, as it shows esp-idf in the boot page. Cleaning the build files as suggested by @valerix85 might be the fix here. So, I would follow both suggestions. 😉

ghostridernrw40 commented 3 months ago

Cleaning build files multiple times worked for me. Thx

lloydbayley commented 3 months ago

Fair-enough, I wasn't aware if the panel had been flashed with serial and didn't spot the framework on the boot screen. Sorry.