Problème en lien avec AppDaemon pour NsPanel sous Tasmota et NsPanel Lovelace UI

Bonjour,

Actuellement en cours d’intégration, flashage, configuration d’un NsPanel + Tasmota + Lovelace UI, je rencontre quelques petites erreurs dans mon log d’AppDaemon.

N’ayant pas de compétences particulières en langage/code je cherche l’un d’entre vous qui en 1 coup d’oeil aurait des hyppothèses d’explorations pour la résolution de mon souci.

Log : AppDaemon

Log : AppDaemon
[23:52:51] INFO: Starting AppDaemon...
2024-09-22 23:53:00.666009 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2024-09-22 23:53:00.666676 INFO AppDaemon: Python version is 3.11.9
2024-09-22 23:53:00.667365 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml
2024-09-22 23:53:00.668040 INFO AppDaemon: Added log: AppDaemon
2024-09-22 23:53:00.668902 INFO AppDaemon: Added log: Error
2024-09-22 23:53:00.669587 INFO AppDaemon: Added log: Access
2024-09-22 23:53:00.670275 INFO AppDaemon: Added log: Diag
2024-09-22 23:53:01.215064 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2024-09-22 23:53:01.838848 INFO HASS: HASS Plugin Initializing
2024-09-22 23:53:01.839366 WARNING HASS: ha_url not found in HASS configuration - module not initialized
2024-09-22 23:53:01.840048 INFO HASS: HASS Plugin initialization complete
2024-09-22 23:53:01.841010 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin
2024-09-22 23:53:02.042265 INFO MQTT: MQTT Plugin Initializing
2024-09-22 23:53:02.042981 INFO MQTT: Using 'appdaemon/status' as Will Topic
2024-09-22 23:53:02.043616 INFO MQTT: Using 'appdaemon/status' as Birth Topic
2024-09-22 23:53:02.045388 INFO AppDaemon: Initializing HTTP
2024-09-22 23:53:02.046973 INFO AppDaemon: Using 'ws' for event stream
2024-09-22 23:53:02.056582 INFO AppDaemon: Starting API
2024-09-22 23:53:02.064443 INFO AppDaemon: Starting Admin Interface
2024-09-22 23:53:02.065566 INFO AppDaemon: Starting Dashboards
2024-09-22 23:53:02.102301 INFO HASS: Connected to Home Assistant 2024.9.2
2024-09-22 23:53:02.149043 INFO MQTT: Connected to Broker at URL 192.168.1.150:1883
2024-09-22 23:53:02.221290 INFO AppDaemon: Got initial state from namespace mqtt
2024-09-22 23:53:02.222365 INFO MQTT: MQTT Plugin initialization complete
2024-09-22 23:53:02.299136 INFO HASS: Evaluating startup conditions
2024-09-22 23:53:02.308700 INFO AppDaemon: App 'nspanel-1' added
2024-09-22 23:53:02.311468 INFO AppDaemon: Found 1 active apps
2024-09-22 23:53:02.312522 INFO AppDaemon: Found 0 inactive apps
2024-09-22 23:53:02.322682 INFO AppDaemon: Found 0 global libraries
2024-09-22 23:53:02.324068 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2024-09-22 23:53:02.327254 INFO AppDaemon: Running on port 5050
2024-09-22 23:53:02.400740 INFO HASS: Startup condition met: hass state=RUNNING
2024-09-22 23:53:02.402330 INFO HASS: All startup conditions met
2024-09-22 23:53:02.478144 INFO AppDaemon: Got initial state from namespace default
2024-09-22 23:53:04.339833 INFO AppDaemon: Scheduler running in realtime
2024-09-22 23:53:04.346811 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/ to module import path
2024-09-22 23:53:04.347994 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui to module import path
2024-09-22 23:53:04.349238 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend to module import path
2024-09-22 23:53:04.350466 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations to module import path
2024-09-22 23:53:04.351789 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/frontend to module import path
2024-09-22 23:53:04.353114 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/backend to module import path
2024-09-22 23:53:04.373006 INFO AppDaemon: Loading App Module: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py
2024-09-22 23:53:04.852931 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/controller.py - ignoring
2024-09-22 23:53:04.855489 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/updater.py - ignoring
2024-09-22 23:53:04.858277 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/helper.py - ignoring
2024-09-22 23:53:04.860634 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py - ignoring
2024-09-22 23:53:04.862927 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py - ignoring
2024-09-22 23:53:04.865287 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/icons.py - ignoring
2024-09-22 23:53:04.867607 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/localization.py - ignoring
2024-09-22 23:53:04.869952 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/theme.py - ignoring
2024-09-22 23:53:04.872187 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/config.py - ignoring
2024-09-22 23:53:04.874508 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/apis.py - ignoring
2024-09-22 23:53:04.876896 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py - ignoring
2024-09-22 23:53:04.878967 INFO AppDaemon: Loading app nspanel-1 using class NsPanelLovelaceUIManager from module nspanel-lovelace-ui
2024-09-22 23:53:04.884127 INFO AppDaemon: Calling initialize() for nspanel-1
2024-09-22 23:53:05.067720 INFO nspanel-1: Starting
2024-09-22 23:53:05.110564 INFO nspanel-1: Input config: {'panelRecvTopic': 'tele/NsPanel_Tasmota/RESULT', 'panelSendTopic': 'cmnd/NsPanel_Tasmota/CustomSend', 'model': 'eu', 'locale': 'fr_FR', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 10}, {'time': '23:00:00', 'value': 2}], 'screensaver': {'theme': {'date': [255, 255, 255], 'background': [0, 0, 0], 'time': [255, 255, 255]}, 'entities': [{'entity': 'weather.forecast_maison'}, {'entity': 'weather.forecast_maison', 'type': 0}, {'entity': 'weather.forecast_maison', 'type': 1}, {'entity': 'weather.forecast_maison', 'type': 2}]}, 'cards': [{'type': 'cardGrid', 'title': 'Menu Principal', 'key': 'menu_principal', 'entities': [{'entity': 'navigate.alarme', 'icon': 'mdi:shield-home', 'name': 'Alarme'}]}, {'type': 'cardAlarm', 'title': 'Alarme', 'key': 'alarme', 'entity': 'alarm_control_panel.systeme_d_alarme', 'supportedModes': ['arm_away', 'arm_home']}, {'type': 'cardEntities', 'title': 'Volets Roulant', 'entities': [{'entity': 'cover.volet_fenetre_cuisine'}, {'entity': 'cover.volet_salon_profalux'}, {'entity': 'cover.volet_sejour'}]}, {'type': 'cardEntities', 'title': 'Lumières', 'entities': [{'entity': 'light.lumiere_palier_lumiere', 'name': 'Palier'}, {'entity': 'light.lumiere_escalier', 'name': 'Applique'}, {'entity': 'light.lumiere_escalier_bas_lumiere', 'name': 'Sous Escalier'}, {'entity': 'light.lumiere_salon', 'name': 'Salon'}, {'entity': 'light.lumiere_sejour'}]}, {'type': 'cardGrid', 'title': 'Interrupteur', 'entities': [{'entity': 'switch.sonoff_100202f47d_1', 'name': 'Buanderie'}, {'entity': 'switch.sonoff_100202f47d_2', 'name': 'Salon'}, {'entity': 'switch.sonoff_100202f47d_3', 'name': 'Séjour'}, {'entity': 'switch.sonoff_100202f47d_4', 'name': 'Escalier'}]}]}
2024-09-22 23:53:05.115117 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/NsPanel_Tasmota/RESULT', 'panelSendTopic': 'cmnd/NsPanel_Tasmota/CustomSend', 'updateMode': 'auto-notify', 'model': 'eu', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 10}, {'time': '23:00:00', 'value': 2}], 'screenBrightness': 100, 'defaultBackgroundColor': 'ha-dark', 'featureExperimentalSliders': False, 'sleepTracking': None, 'sleepTrackingZones': ['not_home', 'off'], 'sleepOverride': None, 'locale': 'fr_FR', 'quiet': True, 'timeFormat': '%H:%M', 'dateFormatBabel': 'full', 'dateAdditionalTemplate': '', 'timeAdditionalTemplate': '', 'dateFormat': '%A, %d. %B %Y', 'cards': [{'type': 'cardGrid', 'title': 'Menu Principal', 'key': 'menu_principal', 'entities': [{'entity': 'navigate.alarme', 'icon': 'mdi:shield-home', 'name': 'Alarme'}]}, {'type': 'cardAlarm', 'title': 'Alarme', 'key': 'alarme', 'entity': 'alarm_control_panel.systeme_d_alarme', 'supportedModes': ['arm_away', 'arm_home']}, {'type': 'cardEntities', 'title': 'Volets Roulant', 'entities': [{'entity': 'cover.volet_fenetre_cuisine'}, {'entity': 'cover.volet_salon_profalux'}, {'entity': 'cover.volet_sejour'}]}, {'type': 'cardEntities', 'title': 'Lumières', 'entities': [{'entity': 'light.lumiere_palier_lumiere', 'name': 'Palier'}, {'entity': 'light.lumiere_escalier', 'name': 'Applique'}, {'entity': 'light.lumiere_escalier_bas_lumiere', 'name': 'Sous Escalier'}, {'entity': 'light.lumiere_salon', 'name': 'Salon'}, {'entity': 'light.lumiere_sejour'}]}, {'type': 'cardGrid', 'title': 'Interrupteur', 'entities': [{'entity': 'switch.sonoff_100202f47d_1', 'name': 'Buanderie'}, {'entity': 'switch.sonoff_100202f47d_2', 'name': 'Salon'}, {'entity': 'switch.sonoff_100202f47d_3', 'name': 'Séjour'}, {'entity': 'switch.sonoff_100202f47d_4', 'name': 'Escalier'}]}], 'screensaver': {'type': 'screensaver', 'entity': 'weather.example', 'weatherUnit': 'celsius', 'forecastSkip': 0, 'weatherOverrideForecast1': None, 'weatherOverrideForecast2': None, 'weatherOverrideForecast3': None, 'weatherOverrideForecast4': None, 'doubleTapToUnlock': False, 'alternativeLayout': False, 'defaultCard': None, 'key': 'screensaver', 'theme': {'date': [255, 255, 255], 'background': [0, 0, 0], 'time': [255, 255, 255]}, 'entities': [{'entity': 'weather.forecast_maison'}, {'entity': 'weather.forecast_maison', 'type': 0}, {'entity': 'weather.forecast_maison', 'type': 1}, {'entity': 'weather.forecast_maison', 'type': 2}]}, 'hiddenCards': []}
2024-09-22 23:53:05.148147 INFO nspanel-1: gtest123: ['navigate.alarme', 'alarm_control_panel.systeme_d_alarme', 'cover.volet_fenetre_cuisine', 'cover.volet_salon_profalux', 'cover.volet_sejour', 'light.lumiere_palier_lumiere', 'light.lumiere_escalier', 'light.lumiere_escalier_bas_lumiere', 'light.lumiere_salon', 'light.lumiere_sejour', 'switch.sonoff_100202f47d_1', 'switch.sonoff_100202f47d_2', 'switch.sonoff_100202f47d_3', 'switch.sonoff_100202f47d_4', 'weather.example', 'weather.forecast_maison', 'weather.forecast_maison', 'weather.forecast_maison', 'weather.forecast_maison']
2024-09-22 23:53:05.152585 INFO nspanel-1: Registering callbacks for the following items: ['alarm_control_panel.systeme_d_alarme', 'cover.volet_fenetre_cuisine', 'cover.volet_salon_profalux', 'cover.volet_sejour', 'light.lumiere_palier_lumiere', 'light.lumiere_escalier', 'light.lumiere_escalier_bas_lumiere', 'light.lumiere_salon', 'light.lumiere_sejour', 'switch.sonoff_100202f47d_1', 'switch.sonoff_100202f47d_2', 'switch.sonoff_100202f47d_3', 'switch.sonoff_100202f47d_4', 'weather.example', 'weather.forecast_maison', 'weather.forecast_maison', 'weather.forecast_maison', 'weather.forecast_maison']
2024-09-22 23:53:05.214867 INFO nspanel-1: Started (v4.3.3)
2024-09-22 23:53:05.218720 INFO AppDaemon: App initialization complete
2024-09-22 23:53:06.123204 INFO nspanel-1: MQTT callback for: {'topic': 'tele/NsPanel_Tasmota/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"9"}'}
2024-09-22 23:53:06.128681 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: 9 Panel Version: None
2024-09-22 23:53:06.149235 INFO nspanel-1: MQTT callback for: {'topic': 'tele/NsPanel_Tasmota/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,startup,53,eu"}'}
2024-09-22 23:53:06.153630 INFO nspanel-1: Received Message from Screen: event,startup,53,eu
2024-09-22 23:53:06.162427 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: None Panel Version: 53
2024-09-22 23:53:06.167195 INFO nspanel-1: Startup Event
2024-09-22 23:53:06.365763 WARNING nspanel-1: ------------------------------------------------------------
2024-09-22 23:53:06.366678 WARNING nspanel-1: Unexpected error in worker for App nspanel-1:
2024-09-22 23:53:06.367682 WARNING nspanel-1: Worker Ags: {'id': 'c5feb06e0d7249d6b4f4b147150e90ed', 'name': 'nspanel-1', 'objectid': '9b01eaeeae0e4b7d8df60f52ffcf4504', 'type': 'event', 'event': 'MQTT_MESSAGE', 'function': <bound method LuiMqttListener.mqtt_event_callback of <luibackend.mqtt.LuiMqttListener object at 0xffff971acb90>>, 'data': {'topic': 'tele/NsPanel_Tasmota/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,startup,53,eu"}'}, 'pin_app': True, 'pin_thread': 0, 'kwargs': {'topic': 'tele/NsPanel_Tasmota/RESULT', '__thread_id': 'thread-0'}}
2024-09-22 23:53:06.368556 WARNING nspanel-1: ------------------------------------------------------------
2024-09-22 23:53:06.375304 WARNING nspanel-1: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/threading.py", line 1095, in worker
    funcref(args["event"], data, self.AD.events.sanitize_event_kwargs(app, args["kwargs"]))
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py", line 34, in mqtt_event_callback
    self.customrecv_event_callback(event_name, data, kwargs)
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py", line 58, in customrecv_event_callback
    self._controller.startup()
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/controller.py", line 41, in startup
    self._pages_gen.render_card(self._current_card)
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py", line 821, in render_card
    self.update_screensaver_weather(theme)
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py", line 153, in update_screensaver_weather
    item_str += self.generate_entities_item(item, "cardEntities", mask=["type", "entityId"])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py", line 386, in generate_entities_item
    if type(item.stype) == int and len(entity.attributes.forecast) >= item.stype:
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AttrDict' object has no attribute 'forecast'

2024-09-22 23:53:06.376224 WARNING nspanel-1: ------------------------------------------------------------
2024-09-22 23:53:06.397200 INFO nspanel-1: MQTT callback for: {'topic': 'tele/NsPanel_Tasmota/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"9"}'}
2024-09-22 23:53:06.401582 INFO nspanel-1: Update Pre-Check sucessful Tasmota Driver Version: 9 Panel Version: 53
2024-09-22 23:53:07.124326 INFO nspanel-1: MQTT callback for: {'topic': 'tele/NsPanel_Tasmota/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,renderCurrentPage"}'}
2024-09-22 23:53:07.128730 INFO nspanel-1: Received Message from Screen: event,renderCurrentPage

Pour rendre l’ensemble plus complet voici quelques documents supplémentaires…

addon_configs/a0d7b954_appdaemon/appdaemon.yaml
---
secrets: /homeassistant/secrets.yaml
appdaemon:
  latitude: 52.0
  longitude: 4.0
  elevation: 2
  time_zone: Europe/Paris
  app_dir: /homeassistant/appdaemon/apps/ # !!! This is really important for AppDaemon HA Addon >= 15
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: 192.168.XXX.XXX # Cette  partie semble fonctionner ;)
      #client_host: 192.168.75.30
      client_port: 1883
      client_user: "mqtt-freebox"
      client_password: "MyPasswordFreeboxUser"
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:
homeassistant/appdaemon/apps/apps.yaml

nspanel-1:
module: nspanel-lovelace-ui
class: NsPanelLovelaceUIManager
config:
panelRecvTopic: « tele/NsPanel_Tasmota/RESULT »
panelSendTopic: « cmnd/NsPanel_Tasmota/CustomSend »
model: eu
locale: « fr_FR »

Gestion de la luminosité de l’écran

sleepTimeout: 20
sleepBrightness:
  - time: "7:00:00"
    value: 10
  - time: "23:00:00"
    value: 2

Personnalisation du ScreenSaver ci-dessous.

screensaver:
  theme:
    date: [255,255,255]
    background: [0,0,0]
    time : [255,255,255]
  entities:
    - entity: weather.forecast_maison
    - entity: weather.forecast_maison
      type: 0
    - entity: weather.forecast_maison
      type: 1
    - entity: weather.forecast_maison
      type: 2


# screensaver:
#   type: screensaver2
#   entities:
#   - entity: weather.forecast_maison
#   - entity: sensor.nspanel_analog_temperature1
#   - entity: delete
#   - entity: delete
#   - entity: weather.forecast_maison
#     type: 1
#   - entity: weather.forecast_maison
#     type: 2
#   - entity: weather.forecast_maison
#     type: 3
#   - entity: alarm_control_panel.systeme_d_alarme
#     icon: mdi:shield-home
#   - entity: switch.ac
#     icon: mdi:home-thermometer
#     defaultCard: navigate.menu_principal

Les cartes sont à intégrer ci-dessous au ‹ 4ème niveau ›.

cards:

  #Carte Home

  - type: cardGrid
    title: Menu Principal
    key: menu_principal
    entities:
    - entity: navigate.alarme
      icon: mdi:shield-home
      name: Alarme

    #Carte Alarme
  - type: cardAlarm
    title: Alarme
    key: alarme
    entity: alarm_control_panel.systeme_d_alarme
    supportedModes: ['arm_away','arm_home']
    

  #Carte 1
  - type: cardEntities
    title: Volets Roulant
    entities:
    - entity: cover.volet_fenetre_cuisine
    - entity: cover.volet_salon_profalux
    - entity: cover.volet_sejour

  #Carte 2
  - type: cardEntities
    title: Lumières  
    entities:
    - entity: light.lumiere_palier_lumiere
      name: Palier
    - entity: light.lumiere_escalier
      name: Applique
    - entity: light.lumiere_escalier_bas_lumiere
      name: Sous Escalier
    - entity: light.lumiere_salon
      name: Salon
    - entity: light.lumiere_sejour

  #Carte 3
  - type: cardGrid
    title: Interrupteur
    entities:
    - entity: switch.sonoff_100202f47d_1
      name: Buanderie
    - entity: switch.sonoff_100202f47d_2
      name: Salon
    - entity: switch.sonoff_100202f47d_3
      name: Séjour
    - entity: switch.sonoff_100202f47d_4
      name: Escalier

  #Carte 4
homeassistant/configuration.yaml

AppDeamon

template:

  • trigger:
    • platform: time_pattern
      hours: /1
    • platform: homeassistant
      event: start
      action:
    • service: weather.get_forecasts
      data:
      type: daily
      target:
      entity_id: weather.forecast_maison # change to your weather entity
      response_variable: daily
      sensor:
    • name: Weather Forecast Daily
      unique_id: weather_forecast_daily
      state: « {{ states(‹ weather.forecast_maison ›) }} » # # change to your weather entity in this line
      attributes:
      temperature: « {{ state_attr(‹ weather.forecast_maison ›, ‹ temperature ›) }} » # change to your weather entity
      temperature_unit: « {{ state_attr(‹ weather.forecast_maison ›, ‹ temperature_unit ›) }} » # change to your weather entity
      forecast: « {{ daily[‹ weather.forecast_maison ›].forecast }} » # change to your weather entity

Je crois que ces erreurs m’empêchent d’afficher correctement des entitées sur le NsPanel, notamment la météo sur le screensaver.

  • Merci par avance pour celles et ceux qui prendront le temps de me lire.
  • Un plus grand merci a celles et ceux qui y réfléchiront.
  • Big Up à celles et ceux qui trouveront des hypothèses pertinentes.
  • Je ferai la « Ola » pour celle ou celui qui trouvera la solution :hugs: