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

`Bug` Device reboots everytime waking up panel #1976

Closed Matthijs33 closed 3 months ago

Matthijs33 commented 3 months ago

TFT Version

4.3.1

ESPHome Version

2024.3.0

Blueprint Version

4.3.1

Panel Model

EU

What is the bug?

Hi everyone,

I would like to report a bug for version 4.3.1.

After upgrading the panel to the latest version, I see several errors in the ESPHOME error log and the panel now crashes every time it comes out of sleep mode.

Steps to Reproduce

  1. Wait until screen goes in to sleep
  2. Touch screen
  3. From here the device will show the blue screen and shows the versions 3x 4.3.1

Your Panel's YAML

esphome:
  comment: Sonoff NSPanel

substitutions:
  device_name: "nsp1" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://10.0.15.253:8123/local/nspanel_eu.tft"

sensor:
  ##### Uptime Sensors #####
  - name: ${device_name} Uptime seconds
    id: uptime_sec
    platform: uptime
    internal: true

  - name: ${device_name} Device uptime
    id: device_timestamp
    platform: template
    lambda: 'return (id(time_provider).now().timestamp - id(uptime_sec).state);'
    internal: false
    device_class: timestamp
    entity_category: diagnostic
    accuracy_decimals: 0
    update_interval: never

time:
  - id: !extend time_provider
    platform: sntp
    timezone: Europe/Amsterdam
    update_interval: 60min
    servers:
      - 10.0.0.253
    on_time_sync:
      then:
        - component.update: device_timestamp

wifi:
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${device_name} Fallback Hotspot"
    password: "DUMMYPASSWORD"
#  power_save_mode: LIGHT
  use_address: 10.0.0.231
  manual_ip:
    static_ip: 10.0.0.231
    gateway: 10.0.0.254
    subnet: 255.255.255.0
    dns1: 10.0.0.253

captive_portal:

packages:
  esp_core: !include packages/advanced/esphome/nspanel_esphome_core.yaml
  esp_tft: !include packages/advanced/esphome/nspanel_esphome_addon_upload_tft.yaml

esp32:
  framework:
    type: esp-idf

ESPHome Logs


[13:41:00][D][nextion:446]: Got touch event:
[13:41:00][D][nextion:447]:   page_id:      9
[13:41:00][D][nextion:448]:   component_id: 0
[13:41:00][D][nextion:449]:   event type:   PRESS
[13:41:00][D][nextion:446]: Got touch event:
[13:41:00][D][nextion:447]:   page_id:      9
[13:41:00][D][nextion:448]:   component_id: 0
[13:41:00][D][nextion:449]:   event type:   RELEASE
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][text_sensor:064]: 'Current Page': Sending state 'boot'
[13:41:00][D][script.page_changed:2206]: New page: boot
[13:41:00][D][text_sensor:064]: 'Detailed Entity': Sending state ''
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][main:2069]: Page boot called
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 50%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 55%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 60%
[13:41:00][D][main:2084]: Wait for Wi-Fi
[13:41:00][D][main:2095]: Wi-Fi connected
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 65%
[13:41:00][D][script:077]: Script 'set_brightness' restarting (mode: restart)
[13:41:00][D][main:2100]: Wait for API
[13:41:00][D][main:2111]: API connected
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 70%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 75%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 80%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 85%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 90%
[13:41:00][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:00][D][script.boot_progress:1831]: Progress: 95%
[13:41:00][D][nextion_textsensor:014]: Processed text_sensor "current_page" state "boot"
[13:41:00][W][component:232]: Component display took a long time for an operation (138 ms).
[13:41:00][W][component:233]: Components should block for at most 30 ms.
[13:41:01][D][sensor:094]: 'Blueprint': Sending state 100.00000 % with 1 decimals of accuracy
[13:41:01][W][component:232]: Component api took a long time for an operation (68 ms).
[13:41:01][W][component:233]: Components should block for at most 30 ms.
[13:41:01][W][nextion:435]: Nextion reported Serial Buffer overflow!
[13:41:01][E][nextion:550]: ERROR: Received numeric return but next in queue "backlight_brightness" is not a valid sensor type 0
[13:41:01][E][nextion:550]: ERROR: Received numeric return but next in queue "backlight_brightness" is not a valid sensor type 0
[13:41:01][D][sensor:094]: 'Blueprint': Sending state 100.00000 % with 1 decimals of accuracy
[13:41:01][D][sensor:094]: 'Blueprint': Sending state 100.00000 % with 1 decimals of accuracy
[13:41:01][D][sensor:094]: 'Blueprint': Sending state 100.00000 % with 1 decimals of accuracy
[13:41:01][D][script.check_versions:1865]: Versions:
[13:41:01][D][script.check_versions:1866]:   ESPHome:   4.3.1
[13:41:01][D][script.check_versions:1867]:   TFT:       4.3.1
[13:41:01][D][script.check_versions:1870]:   Blueprint: 4.3.1
[13:41:01][D][sensor:094]: 'Blueprint': Sending state 100.00000 % with 1 decimals of accuracy
[13:41:05][E][nextion:550]: ERROR: Received numeric return but next in queue "set_component_text" is not a valid sensor type 0
[13:41:05][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:05][D][script.boot_progress:1827]: Progress: Completed
[13:41:06][D][script.page_boot:2168]: Jump to wake-up page: home
[13:41:06][E][nextion:550]: ERROR: Received numeric return but next in queue "set_component_text" is not a valid sensor type 0
[13:41:06][D][text_sensor:064]: 'Current Page': Sending state 'home'
[13:41:06][D][script.page_changed:2206]: New page: home
[13:41:06][D][text_sensor:064]: 'Detailed Entity': Sending state ''
[13:41:06][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[13:41:06][D][script.timer_dim:2841]: Waking up on page: home
[13:41:06][D][script:077]: Script 'set_brightness' restarting (mode: restart)
[13:41:06][D][nextion_textsensor:014]: Processed text_sensor "current_page" state "home"
[13:41:07][E][nextion:550]: ERROR: Received numeric return but next in queue "set_component_text" is not a valid sensor type 0
[13:41:11][E][nextion:550]: ERROR: Received numeric return but next in queue "set_component_font_color" is not a valid sensor type 0
/

Home Assistant Logs

No response

edwardtfn commented 3 months ago

Please try cleaning the build files and then flashing the device again (wirelessly).

Clean-up build files

Go to your ESPHome Dashboard, click the 3-dot menu related to your device and then "Clean Build Files":

image

edwardtfn commented 3 months ago

Could be related to:

Matthijs33 commented 3 months ago

Sorry, forgot to mention i already did cleaning up the build files. I have an second panel which having exact same behaviour.

Sounds exactly the same issue as in #1947

edwardtfn commented 3 months ago

Ok, I see you have something different when compared to #1947, as you are copying the files to your local filesystem and using it from there.

First, for my curiosity, is there a reason for that instead of using the remote files?

Please try copying the content of the folder components to your local file system and add this to your panel's yaml:

external_components:
  - source:
      type: local
      path: packages/components  # Please adjust the folder accordingly
    components:
      - nspanel_ha_blueprint

Then try to flash it again.

edwardtfn commented 3 months ago

Fixed in dev.