Nspanel (tasmota) - awaiting content

Ponownie przychodzę z problemem. Tym razem pokonał mnie NSPanel (ver.EU) z wgraną tasmotą. Mianowicie co bym nie robił mam “Awaiting content”. Całość instalowana na HA bare-metal.
Może ktoś zauważy gdzie jest błąd.
Konfiguracja Tasmoty:

Zawartość /addon_configs/a0d7b954_appdaemon/apps/apps.yaml:

---
Pawel1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/Pawel1/RESULT"
    panelSendTopic: "cmnd/Pawel1/CustomSend"
    model: eu

Zawartość /addon_configs/a0d7b954_appdaemon/appdaemon.yaml:

---
appdaemon:
  latitude: 51
  longitude: 3
  elevation: 2
  time_zone: Europe/Amsterdam
#  app_dir: /homeassistant/appdaemon/apps/
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: 192.168.1.222   
      client_port: 1883
      #client_user: "homeassistant"
      client_user: "komar"
      client_password: "MegaDlugieh@ssl0"
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

Oczywiście ‘komar’ jest zdefiniowany jako użytkownik, w trybie zaawansowanym:

Logi AppDaemona:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------

 Add-on: AppDaemon
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.16.5
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.3  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.4.4
 Home Assistant Supervisor: 2024.05.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/
Collecting babel
  Downloading Babel-2.15.0-py3-none-any.whl.metadata (1.5 kB)
Downloading Babel-2.15.0-py3-none-any.whl (9.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.6/9.6 MB 26.6 MB/s eta 0:00:00
Installing collected packages: babel
Successfully installed babel-2.15.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
[14:05:05] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
2024-05-16 14:05:07.282872 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2024-05-16 14:05:07.282983 INFO AppDaemon: Python version is 3.11.9
2024-05-16 14:05:07.283070 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml
2024-05-16 14:05:07.283144 INFO AppDaemon: Added log: AppDaemon
2024-05-16 14:05:07.283214 INFO AppDaemon: Added log: Error
2024-05-16 14:05:07.283271 INFO AppDaemon: Added log: Access
2024-05-16 14:05:07.283328 INFO AppDaemon: Added log: Diag
2024-05-16 14:05:07.397840 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2024-05-16 14:05:07.517349 INFO HASS: HASS Plugin Initializing
2024-05-16 14:05:07.517445 WARNING HASS: ha_url not found in HASS configuration - module not initialized
2024-05-16 14:05:07.517522 INFO HASS: HASS Plugin initialization complete
2024-05-16 14:05:07.517638 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin
2024-05-16 14:05:07.565473 INFO MQTT: MQTT Plugin Initializing
2024-05-16 14:05:07.565596 INFO MQTT: Using 'appdaemon/status' as Will Topic
2024-05-16 14:05:07.565665 INFO MQTT: Using 'appdaemon/status' as Birth Topic
2024-05-16 14:05:07.565898 INFO AppDaemon: Initializing HTTP
2024-05-16 14:05:07.566050 INFO AppDaemon: Using 'ws' for event stream
2024-05-16 14:05:07.568143 INFO AppDaemon: Starting API
2024-05-16 14:05:07.569579 INFO AppDaemon: Starting Admin Interface
2024-05-16 14:05:07.569726 INFO AppDaemon: Starting Dashboards
2024-05-16 14:05:07.576693 INFO HASS: Connected to Home Assistant 2024.4.4
2024-05-16 14:05:07.585745 INFO AppDaemon: App 'Pawel1' added
2024-05-16 14:05:07.586270 INFO AppDaemon: Found 1 active apps
2024-05-16 14:05:07.586390 INFO AppDaemon: Found 0 inactive apps
2024-05-16 14:05:07.586479 INFO AppDaemon: Found 0 global libraries
2024-05-16 14:05:07.586575 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2024-05-16 14:05:07.586939 INFO AppDaemon: Running on port 5050
2024-05-16 14:05:07.600592 INFO HASS: Evaluating startup conditions
2024-05-16 14:05:07.605660 INFO HASS: Startup condition met: hass state=RUNNING
2024-05-16 14:05:07.605796 INFO HASS: All startup conditions met
2024-05-16 14:05:07.611452 INFO AppDaemon: Got initial state from namespace default
2024-05-16 14:05:07.922334 INFO MQTT: Connected to Broker at URL 192.168.1.222:1883
2024-05-16 14:05:08.579827 INFO AppDaemon: Got initial state from namespace mqtt
2024-05-16 14:05:08.580280 INFO MQTT: MQTT Plugin initialization complete
2024-05-16 14:05:09.589196 INFO AppDaemon: Scheduler running in realtime
2024-05-16 14:05:09.590354 INFO AppDaemon: Adding /config/apps to module import path
2024-05-16 14:05:09.591011 WARNING AppDaemon: No app description found for: /config/apps/hello.py - ignoring
2024-05-16 14:05:09.591374 INFO AppDaemon: App initialization complete

Logi Mosquitto brokera:

s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
[14:04:49] INFO: Starting NGINX for authentication handling...
s6-rc: info: service legacy-services successfully started
[14:04:49] INFO: Starting mosquitto MQTT broker...
2024-05-16 14:04:49: Warning: Mosquitto should not be run as root/administrator.
2024-05-16 14:04:49: mosquitto version 2.0.18 starting
2024-05-16 14:04:49: Config loaded from /etc/mosquitto/mosquitto.conf.
2024-05-16 14:04:49: Loading plugin: /usr/share/mosquitto/go-auth.so
2024-05-16 14:04:49:  ├── Username/password checking enabled.
2024-05-16 14:04:49:  ├── TLS-PSK checking enabled.
2024-05-16 14:04:49:  └── Extended authentication not enabled.
2024-05-16 14:04:49: Opening ipv4 listen socket on port 1883.
2024-05-16 14:04:49: Opening ipv6 listen socket on port 1883.
2024-05-16 14:04:49: Opening websockets listen socket on port 1884.
2024-05-16 14:04:49: mosquitto version 2.0.18 running
2024-05-16 14:04:50: New connection from 127.0.0.1:38166 on port 1883.
2024-05-16 14:04:50: Client <unknown> disconnected due to protocol error.
[14:04:50] INFO: Successfully send discovery information to Home Assistant.
[14:04:50] INFO: Successfully send service information to the Supervisor.
2024-05-16 14:04:56: New connection from 172.30.32.1:51275 on port 1883.
2024-05-16 14:04:56: New client connected from 172.30.32.1:51275 as 00jiJJebbBQwNHcg5R9iFq (p2, c1, k60, u'homeassistant').
2024-05-16 14:05:03: New connection from 172.30.33.2:38832 on port 1883.
2024-05-16 14:05:03: New client connected from 172.30.33.2:38832 as mqttjs_26168a2f (p2, c1, k60, u'addons').
2024-05-16 14:05:07: New connection from 172.30.32.1:45638 on port 1883.
2024-05-16 14:05:07: New client connected from 172.30.32.1:45638 as appdaemon (p2, c1, k60, u'komar').
2024-05-16 14:05:09: New connection from 192.168.1.127:60193 on port 1883.
2024-05-16 14:05:09: Client DVES_C72010 disconnected, not authorised.
2024-05-16 14:07:10: New connection from 192.168.1.127:60194 on port 1883.
2024-05-16 14:07:10: Client DVES_C72010 disconnected, not authorised.
2024-05-16 14:07:28: New connection from 172.30.32.2:45354 on port 1883.
2024-05-16 14:07:28: Client <unknown> closed its connection.
2024-05-16 14:09:11: New connection from 192.168.1.127:60195 on port 1883.
2024-05-16 14:09:11: Client DVES_C72010 disconnected, not authorised.	`

Pomysły?

Wpisz login i hasło takie jak się logujesz do HA i sprawdź czy działa.

appdaemon.yaml

secrets: /homeassistant/secrets.yaml
appdaemon:  
  latitude: *************
  longitude: **********
  elevation: 2
  time_zone: Europe/Berlin  
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: 192.168.1.220
      client_port: 1883
      client_user: "****"
      client_password: "**********************"
      client_topics: NONE  
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

apps.yaml

nspanel-1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/nspanel/RESULT"
    panelSendTopic: "cmnd/nspanel/CustomSend"
    model: eu
    locale: "pl_PL"
    updateMode: "auto-notify"
    sleepTimeout: 20
    sleepBrightness:
      - time: "7:00:00"
        value: 10
      - time: "21:01:00"
        value: 4      
    screensaver: 
        entities:
          - entity: weather.home_daily
          - entity: weather.home_hourly
          - entity: sensor.openweathermap_forecast_pressure
          - entity: sensor.weatherbit_forecast_day_1
          - entity: sensor.weatherbit_forecast_day_2
        theme:
            autoWeather: true
    cards:
      - type: cardGrid
        title: Przyciski
        entities:
          - entity: sensor.nspanell_analog_temperature1
          - entity: sensor.airly_pm2_5
            name: PM2,5
          - entity: script.spotify_ladypank
            icon: mdi:spotify
            color: [0, 255, 0]
          - entity: switch.swiatloprzytelewizorze
            name: Swiatlo Telewizor
            color:
                "on": [255,255,0]
                "off": [80,80,80]
            icon: sofa-single
          - entity: light.downlight_z_komputer
            name: Swiatło Komputer
            icon: 
                "on": "ceiling-light-multiple"
                "off": "ceiling-light-multiple"
            color:
                "on": [255,255,0]
                "off": [80,80,80]
          - entity: switch.kuchnia_ledy_local
            name: Kuchnia
            icon: mdi:lightbulb-fluorescent-tube-outline
            
            
      - type: cardEntities
        title: Test Entities Card
        entities:
          - entity: cover.tasmota_cover_1
          - entity: sensor.pogoda_balkon_temperature
          - entity: sensor.pogoda_balkon_humidity
          - entity: binary_sensor.burze_dzis_net_ostrzezenie_burza      
            
      - type: cardPower
        title: Power Test
        entities:
          - entity: sensor.ogolnie_power
            icon: mdi:home
          
          - entity: sensor.ogolnie_energy
            icon: mdi:car
            speed: -20
          
          - entity: sensor.kuchnia_energy
            icon: mdi:battery
            speed: 20
          
          - entity: sensor.lazienka_energy
            icon: mdi:solar-panel
            color: [255, 255, 0]
            speed: 30
          - entity: sensor.ogolnie_voltage
            speed: -40
            icon: mdi:help

Adres IP 192.168.1.222 jest na pewno poprawny ?

Tasmota:

Naprawiłem. Aczkolwiek dużo roboty i kilka godzin życia poszło się bujać,
Po kolei:

  1. Przywróciłem kopię zapasową, bez skonfigurowanych MQTT, Appdaemona i Z2M. O dziwo niektóre elementy musiałem kasować w eksploratorze plików np. katalog appdaemon.

  2. Przeprowadziłem ponowną instalację z customowymi userami tj.

  • W użytkownikach dodałem nowego usera (tryb zaawanswany)., którego użyłem do konfiguracji na integracji MQTT

  • W brokerze zdefiniowałem własnych uzytkowników, dla każdego dodatku osobno np. inny dla Z2M, inny dla appdaemon
    Dzięki temu łatwo mogę odszukać, z którym dodatkiem/integracją jest problem.

  1. Po tych zabiegach zaczął się pojawiać błąd w Appdaemon " Unable to find module nspanel -1" Pomimo, że w appdaemon.yaml próbowałem używać wpisu “app_dir: /homeassistant/appdaemon/apps” (u góry jest wyhaszowany) to się okazuje, że nie działał tak jak powinien. Rozwiązaniem było skopiowanie całego katalogu nspanel-lovelace-ui (nie przeniesienie!) z \homeassistant\appdaemon\apps do \addon_configs\a0d7b954_appdaemon\apps.

Tak każda aktualizacja Appdaemona lokuje pliki w starym miejscu :slight_smile:

Nie napisalem, że to idealne rozwiązanie, więc sarkazm zbędny. Ale jeśli nic innego nie działa, w tym zdeiniowanie ścieżki w app_dir to za bardzo nie ma wyjścia.
Jak wiadomo HA potrafi być problematyczny i czasem trzeba iśc na ustępstwa (dlatego nie ma wdrożeń w środowiskach produkcyjnych- przynajmniej nie powinno). Opisanie rozwiązania nie ma na celu zachęcania do kopiowania w każdym przypadku tego katalogu, a jedynie pomoc osobym które się zderzą też z takim problemem.

Źle mnie zrozumiałeś to nie był żaden sarkazm tylko stwierdzenie że aktualizacja appdaemon umieszcza pliki w złej lokalizacji, sam się na tym przejechałem jak zrobiłem aktualizacje a appdaemon przestał działać. Łatwo jest to stwierdzić bo po aktualizacji na nowo tworzony jest katalog appdaemon w starej lokalizacji.