Blackymas / NSPanel_HA_Blueprint

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

`Bug` The sensor "Current Page" is unavailable. #2026

Closed MichalAug closed 2 months ago

MichalAug commented 2 months ago

TFT Version

4.3.2

ESPHome Version

3.4.1 (2024.3.1)

Blueprint Version

4.3.2

Panel Model

EU

What is the bug?

Hi Guys. This situation makes me cry. I have been a Blackymas user for a long time, but this time I can't figure out what's going on. I got issue in HA:

The automation "NSPanel Configuration - tvroom" (automation.nspanel_configuration_tvroom) has an action that calls an unknown service: esphome.nspaneltvroom_component_text. This error prevents the automation from working properly. Maybe this service is no longer available, or maybe it was a typo. To fix this error, edit the automation and remove the activity that calls this service. Click COMMIT below to confirm that you have fixed this automation.

And:

NSPanel sensor unavailable The sensor "Current Page" (sensor.nspaneltvroom_current_page) is unavailable. Panel: Nspaneltvroom (nspaneltvroom) Blueprint version: 4.3.2 Sensor's expected entity_id: sensor.nspaneltvroom_current_page How to fix this: Go to the device page Find the sensor "Current page" under the "Sensors" area (it might be in the "sensors not shown" group) Enable the sensor Wait a bit until the sensor starts providing a value (it shouldn't take more than half minute) Go to Developer Tools and click the button "Automations" to reload your automations

(but there is no sensor available)

In ESPHome nspanel log I have such entries: [20:42:59][W][nextion:317]: Nextion reported invalid instruction! [20:45:01][W][nextion:396]: Nextion reported variable name invalid! [20:45:01][W][nextion:396]: Nextion reported variable name invalid! [20:45:01][W][nextion:396]: Nextion reported variable name invalid! [20:45:01][W][nextion:396]: Nextion reported variable name invalid! [20:45:01][W][nextion:396]: Nextion reported variable name invalid! [20:45:01][W][nextion:396]: Nextion reported variable name invalid! [20:49:36][W][nextion:317]: Nextion reported invalid instruction! [20:49:36][E][nextion:260]: Nextion queue is empty!

I've tried to remove every autiomations, esp devices, HA restart, nothing helps. Sometimes NSPanel shows the ESPHome version, sometimes it doesn't, sometimes it shows the IP, sometimes it doesn't. It worked once, but after the reset it doesn't work again. When I reset with the button, the screen brightness settings appear, but after reboot the initialization screen returns.

Zrzut ekranu 2024-04-08 223826 Zrzut ekranu 2024-04-08 225014 Zrzut ekranu 2024-04-08 225028 Zrzut ekranu 2024-04-08 225038 IMG_20240408_225304 IMG_20240408_225316

Steps to Reproduce

No response

Your Panel's YAML

substitutions:
  # Settings - Editable values
  device_name: "nspaneltvroom"
  friendly_name: "NSPanel TV Room"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "http://192.168.2.100:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

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

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

ESPHome Logs

No response

Home Assistant Logs

No response

MichalAug commented 2 months ago

I tried to uncomment: - esphome/nspanel_esphome_advanced.yaml I added DNS names for all NSPanels. One panel started working. It shows the wrong time (-2h). I will add correct timezone to yaml.

edwardtfn commented 2 months ago

Please try this and let me know the result:

substitutions:
  # Settings - Editable values
  device_name: "nspaneltvroom"
  friendly_name: "NSPanel TV Room"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "http://192.168.2.100:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

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

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

esp32:
  framework:
    type: arduino
edwardtfn commented 2 months ago

Unless you have recently flashed your panel with the new framework and using a serial cable, you are probably with Arduino framework, therefore seeing the old version:

Also, the support for Friendly Name was introduced recently, so there is a possibility that your panel is getting a new name now. If the problem persists after enforcing the framework (the change I've proposed above), I will suggest the following:

Reconnect the Panel's device to Home Assistant:

  1. Go to Settings --> Devices & Services --> ESPHome
  2. Delete the device
  3. Restart Home Assistant host
  4. Go back to Settings --> Devices & Services
  5. Click Add integration
  6. Select ESPHome
  7. Enter your panel's hostname or IP address.
MichalAug commented 2 months ago

Please try this and let me know the result:

substitutions:
  # Settings - Editable values
  device_name: "nspaneltvroom"
  friendly_name: "NSPanel TV Room"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "http://192.168.2.100:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

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

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

esp32:
  framework:
    type: arduino

Thank you, it looks like it's working. :)