Blackymas / NSPanel_HA_Blueprint

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

Loses server connection #1478

Open Pumpedplop opened 8 months ago

Pumpedplop commented 8 months ago

Sometimes the NSPanel just randomly loses the connection to home assistant. Currently using HA version: Core 2023.11.3, Supervisor 2023.12.0, OS 11.1 and frontend 20231030.2.

alias: NSPanel01 Configuration description: "" use_blueprint: path: Blackymas/nspanel_blueprint.yaml input: nspanel_name: 3d462136afa84b3f3691ff06a2a0e2b5 home_custom_button01_icon: "" home_custom_button02_icon: "" entity01: light.grotetafel entity01_icon: mdi:chandelier entity02: light.spotslivingtuin entity05: light.keukenspots entity03: light.spotslivingkast entity04: light.indirschuifraam entity02_name: spots tuin entity03_name: spots kast entity06: light.indirkeuken entity07: light.keukenindir entity07_name: Keuken werkblad entity08: script.poort entity08_icon: "" entity08_confirm: true entity07_confirm: false language: nl weather_entity: weather.no relay_1_local_fallback: true left_button_entity: light.grotetafel relay_2_local_fallback: true right_button_entity: light.keukenspots left_button_name: grote tafel right_button_name: keuken spots right_button_hold_select: Custom Action left_button_hold_select: Custom Action show_while_loading: true qrcode_enabled: true qrcode_label: Wifi qrcode_value: WIFI:S:alstmaardatis 2.0;T:WPA;P:NO;H:false; chip07_icon: "" chip_font_size: "7" delay: 100 right_button_hold_custom_action:

ESPHome logs (kept open to see what goes wrong): WARNING nspanel01 @ 192.168.1.178: Connection error occurred: nspanel01 @ 192.168.1.178: EOF received INFO Processing unexpected disconnect from ESPHome API for nspanel01 @ 192.168.1.178 WARNING Disconnected from API WARNING Can't connect to ESPHome API for nspanel01 @ 192.168.1.178: Timeout while connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.178', port=6053))] (TimeoutAPIError) INFO Trying to connect to nspanel01 @ 192.168.1.178 in the background

edwardtfn commented 8 months ago

Which version of the Blueprint are you running?

Pumpedplop commented 8 months ago

Currently using blueprint version 4.1.4

edwardtfn commented 8 months ago

Please add this to your ESPHome yaml, install it and let me know if you see any improvement.

wifi:
  power_save_mode: NONE

You can add it at the very end of the file.

Pumpedplop commented 8 months ago

Sadly did not work, Error: [21:11:58][W][api.connection:129]: Home Assistant 2023.12.3 (192.168.1.5) didn't respond to ping request in time. Disconnecting... WARNING nspanel01 @ 192.168.1.178: Connection error occurred: nspanel01 @ 192.168.1.178: EOF received INFO Processing unexpected disconnect from ESPHome API for nspanel01 @ 192.168.1.178 WARNING Disconnected from API

New ESPHome config:

substitutions:
  ###### CHANGE ME START ######
  device_name: "nspanel01" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
  nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"

  ##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

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

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 1s

esp32:
  framework:
    type: esp-idf

##### My customization - Start #####
##### My customization - End #####
wifi: 
  power_save_mode: NONE   
Pumpedplop commented 8 months ago

I have been running a ping command to the display, and it just randomly stops returning the pings. uptime was exactly 44:55

edwardtfn commented 8 months ago

Please add the advanced package, as that will create an rssi sensor:

substitutions:
  ###### CHANGE ME START ######
  device_name: "nspanel01" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
  nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"

  ##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

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

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s

esp32:
  framework:
    type: esp-idf

##### My customization - Start #####
wifi: 
  power_save_mode: NONE   
##### My customization - End #####

Please let me know which values are shown on that sensor (you will see on your device's page).

Pumpedplop commented 8 months ago

The RSSI sensor says -52dBm. It also randomly reboots, I don't know if this is intended behaviour when the display loses server connection.

edwardtfn commented 8 months ago

The RSSI sensor says -52dBm.

That is not bad.

It also randomly reboots, I don't know if this is intended behaviour when the display loses server connection.

By default, ESPHome will reboot when it is 15s without connection. We changed that on v4.1 disabling this functionality, so if you were using an older version, that could be the case, but not with the one you are using (based on the yaml above).

You can try adding the debug component to see if you get any useful information:

substitutions:
  ###### CHANGE ME START ######
  device_name: "nspanel01" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
  nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"

  ##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

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

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s

esp32:
  framework:
    type: esp-idf

##### My customization - Start #####
wifi: 
  power_save_mode: NONE

debug:
  update_interval: 5s

text_sensor:
  - platform: debug
    device:
      name: "Device Info"
    reset_reason:
      name: "Reset Reason"

sensor:
  - platform: debug
    free:
      name: "Heap Free"
    block:
      name: "Heap Max Block"
    loop_time:
      name: "Loop Time"
##### My customization - End #####
edwardtfn commented 8 months ago

@Pumpedplop, have you tried the sensors on debug mode? Anything from that?

Pumpedplop commented 8 months ago

2023-12-30_100058 It doesn't appear the something useful was returned.

edwardtfn commented 8 months ago

What about the "Reset reason" sensor?

edwardtfn commented 8 months ago

Hey @Pumpedplop, any update to this?

Pumpedplop commented 8 months ago

Sorry for the delay.

The Reset reason, is either Power On Reset, or Software Reset CPU