joBr99 / nspanel-lovelace-ui

Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota.
GNU General Public License v3.0
858 stars 188 forks source link

How-to Upgrade to AppDaemon 15 #1029

Closed joBr99 closed 8 months ago

joBr99 commented 8 months ago

This is a summary of the action you have to do after you've upgraded from AppDaemon 14 to 15.

You config files have been moved from /config/appdaemon to /addon_configs/a0d7b954_appdaemon

See this if you need assistance to access the new folder: https://docs.nspanel.pky.eu/configure_mqtt/#note-for-appdeamon-addon-version-15

There is one important change that you have to do to your appdaemon.yaml, which is also mentioned in the release notes of the new version.

  1. Change this in your appdaemon.yaml:

from: secrets: /config/secrets.yaml to: secrets: /homeassistant/secrets.yaml

This should already fix appdaemon, but do not stop here; next steps are required to get updates though hacs.

  1. add this line in your appdaemon.yaml to configure your apps directory back to the old directory (below the appdaemon: key)
  app_dir: /homeassistant/appdaemon/apps/
  1. move your apps.yaml from /addon_configs/a0d7b954_appdaemon/apps to the old location within /homeassistant/appdaemon/apps/

  2. redownload the nspanel-lovelace-ui app from HACS

  3. optional cleanup; delete the apps folder in the addon's directory /addon_configs/a0d7b954_appdaemon/apps

See #1028 if you are interested in more Details around this mess.

Jelloitsalive12 commented 8 months ago

@joBr99 Are they any recommended steps if we are starting from AppDaemon 14 (I did a restore this morning to a backup this morning when I got in trouble because the clock time stopped).

joBr99 commented 8 months ago

wdym? The steps above should be everything you need to do the update.

Jelloitsalive12 commented 8 months ago

OK, I wasn't sure if there would be something I could do pre-emptively to configure the directories/yaml so that it worked when upgrading to 15. I am assuming after redownloading nspanel-lovelace-ui the custom configs we have will still work.

joBr99 commented 8 months ago

Your apps.yaml&appdaemon.yaml won't be touched by redownloading the app from HACS.

However the update from AppDaemon moves all files to a different directory, see my link to the docs on how to access the new folder.

Dattel commented 8 months ago

app_dir: /homeassistant/appdaemon/apps/

regarding these setting: so if i update on nspanel exists two times on my system

/addon_configs/a0d7b954_appdaemon/apps/nspanel-lovelace-ui and /homeassistant/appdaemon/apps/nspanel-lovelace-ui

i assume, that's only on the upgraded systems the case and i can safely delete /addon_configs/a0d7b954_appdaemon/apps/nspanel-lovelace-ui?

joBr99 commented 8 months ago

yes, the appdaemon upgrade moves the folder to /addon_configs/a0d7b954_appdaemon/apps/nspanel-lovelace-ui, if you changed the app_dir you can safely delete the folder

Dattel commented 8 months ago

sadly no... if i copy it back to addon_configs, it starts correct

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.15.2
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 12 (bookworm)  (amd64 / qemux86-64)
 Home Assistant Core: 2023.11.2
 Home Assistant Supervisor: 2023.11.3
-----------------------------------------------------------
 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
Log level is set to INFO
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.13.1-py3-none-any.whl (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 1.1 MB/s eta 0:00:00
Installing collected packages: babel
Successfully installed babel-2.13.1
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
[21:28:26] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
2023-11-15 21:28:28.892689 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2023-11-15 21:28:28.892820 INFO AppDaemon: Python version is 3.11.6
2023-11-15 21:28:28.892902 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml
2023-11-15 21:28:28.892979 INFO AppDaemon: Added log: AppDaemon
2023-11-15 21:28:28.893060 INFO AppDaemon: Added log: Error
2023-11-15 21:28:28.893142 INFO AppDaemon: Added log: Access
2023-11-15 21:28:28.893215 INFO AppDaemon: Added log: Diag
2023-11-15 21:28:29.010474 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-11-15 21:28:29.126952 INFO HASS: HASS Plugin Initializing
2023-11-15 21:28:29.127094 WARNING HASS: ha_url not found in HASS configuration - module not initialized
2023-11-15 21:28:29.127218 INFO HASS: HASS Plugin initialization complete
2023-11-15 21:28:29.127401 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin
2023-11-15 21:28:29.173773 INFO MQTT: MQTT Plugin Initializing
2023-11-15 21:28:29.173921 INFO MQTT: Using 'appdaemon/status' as Will Topic
2023-11-15 21:28:29.174030 INFO MQTT: Using 'appdaemon/status' as Birth Topic
2023-11-15 21:28:29.174427 INFO AppDaemon: Initializing HTTP
2023-11-15 21:28:29.174774 INFO AppDaemon: Using 'ws' for event stream
2023-11-15 21:28:29.176838 INFO AppDaemon: Starting API
2023-11-15 21:28:29.178074 INFO AppDaemon: Starting Admin Interface
2023-11-15 21:28:29.178354 INFO AppDaemon: Starting Dashboards
2023-11-15 21:28:29.187240 INFO HASS: Connected to Home Assistant 2023.11.2
2023-11-15 21:28:29.207871 INFO MQTT: Connected to Broker at URL core-mosquitto.local.hass.io:1883
2023-11-15 21:28:29.225726 INFO AppDaemon: Got initial state from namespace mqtt
2023-11-15 21:28:29.226046 INFO MQTT: MQTT Plugin initialization complete
2023-11-15 21:28:29.297099 INFO HASS: Evaluating startup conditions
2023-11-15 21:28:29.307875 INFO HASS: Startup condition met: hass state=RUNNING
2023-11-15 21:28:29.308093 INFO HASS: All startup conditions met
2023-11-15 21:28:29.317460 INFO AppDaemon: App 'hello_world' added
2023-11-15 21:28:29.318272 INFO AppDaemon: App 'nspanel' added
2023-11-15 21:28:29.319609 INFO AppDaemon: App 'nspanel-test' added
2023-11-15 21:28:29.320244 INFO AppDaemon: Found 3 active apps
2023-11-15 21:28:29.320455 INFO AppDaemon: Found 0 inactive apps
2023-11-15 21:28:29.320621 INFO AppDaemon: Found 0 global libraries
2023-11-15 21:28:29.320802 INFO AppDaemon: Starting Apps with 3 workers and 3 pins
2023-11-15 21:28:29.321951 INFO AppDaemon: Running on port 5050
2023-11-15 21:28:29.328541 INFO AppDaemon: Got initial state from namespace default
2023-11-15 21:28:31.331338 INFO AppDaemon: Scheduler running in realtime
2023-11-15 21:28:31.332998 INFO AppDaemon: Adding /config/apps to module import path
2023-11-15 21:28:31.334054 INFO AppDaemon: Loading App Module: /config/apps/hello.py
2023-11-15 21:28:31.354689 INFO AppDaemon: Loading app hello_world using class HelloWorld from module hello
2023-11-15 21:28:31.355973 INFO AppDaemon: Calling initialize() for hello_world
2023-11-15 21:28:31.400536 INFO hello_world: Hello from AppDaemon
2023-11-15 21:28:31.401302 INFO hello_world: You are now ready to run Apps!
2023-11-15 21:28:31.402326 INFO AppDaemon: App initialization complete
Dattel commented 8 months ago

so here my appdaemon.yaml

secrets: /homeassistant/secrets.yaml
app_dir: /homeassistant/appdaemon/apps/
appdaemon:
  latitude: 52.379189
  longitude: 4.899431
  elevation: 2
  time_zone: Europe/Berlin
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: core-mosquitto.local.hass.io
      client_port: 1883
      client_user: "*******"
      client_password: "*****"
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

In my last post you can see, that the hello_world app gots running - > because it is still exists in addon_configs/........ there is no trace of starting nspanel from the appdaemon/apps/nspanel-lovelace-ui

joBr99 commented 8 months ago

It needs to be like this:

secrets: /homeassistant/secrets.yaml
appdaemon:
  app_dir: /homeassistant/appdaemon/apps/

However I'm currently trying to figure out how I convince appdaemon to load my apps.yaml ...

Dattel commented 8 months ago

thanks... is working Sorry for asking.. you already described the correct position in your documentation earlier..

Jelloitsalive12 commented 8 months ago

So now I have a weird problem. I restored to my previous backup of 14.0, then reupgraded to 15.2. As expected AppDaemon is not running again, but now, without making the changes to my appdaemon yaml (at least that I can tell), I still see logs in AppDaemon and my NSPanel seems to be working. image Any suggestion what I might have done to get into this weird state? Even after restart behavior is as described.

joBr99 commented 8 months ago

idk what you did, but without the appdaemon add-on running it's not going to do anything

Jelloitsalive12 commented 8 months ago

I see all of the following in the logs despite the main page info dialog saying Add-On is stopped.

`2023-11-15 21:59:07.768537 INFO HASS: Connected to Home Assistant 2023.11.2
2023-11-15 21:59:08.720188 INFO HASS: Evaluating startup conditions
2023-11-15 21:59:08.732126 INFO HASS: Startup condition met: hass state=RUNNING
2023-11-15 21:59:08.732343 INFO HASS: All startup conditions met
2023-11-15 21:59:08.792639 INFO AppDaemon: Processing restart for HASS
2023-11-15 21:59:08.792962 INFO AppDaemon: Terminating nspanel-1
2023-11-15 21:59:08.796440 INFO AppDaemon: Reloading Module: /config/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py
2023-11-15 21:59:08.798354 INFO AppDaemon: Loading app nspanel-1 using class NsPanelLovelaceUIManager from module nspanel-lovelace-ui
2023-11-15 21:59:08.799961 INFO AppDaemon: Calling initialize() for nspanel-1
2023-11-15 21:59:08.801110 INFO nspanel-1: Starting
2023-11-15 21:59:08.802806 INFO nspanel-1: Input config: {'panelRecvTopic': 'tele/tasmota_your_mqtt_topic/RESULT', 'panelSendTopic': 'cmnd/tasmota_your_mqtt_topic/CustomSend', 'model': 'us-p', 'dateFormatBabel': 'long', 'timeFormat': '%I:%M   ?%p', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 10}, {'time': '23:00:00', 'value': 10}], 'screensaver': {'entity': 'weather.openweathermap', 'weatherUnit': 'fahrenheit'}, 'cards': [{'type': 'cardGrid', 'title': 'Lights', 'entities': [{'entity': 'light.living_room_blue_1', 'name': 'Living Room', 'icon': 'mdi:globe-light'}, {'entity': 'light.kitchen_lights_group', 'name': 'Kitchen', 'icon': 'mdi:lightbulb-group'}, {'entity': 'light.deck_lights', 'name': 'Deck Lights', 'icon': 'light-recessed'}, {'entity': 'light.living_room_floor_lamp', 'name': 'Floor Lamp', 'icon': 'floor-lamp'}, {'entity': 'light.kelvin_s_bedroom_lights', 'name': 'Kelvin Room', 'icon': 'light-recessed'}, {'entity': 'light.kelvin_s_changing_light', 'name': 'Work Light', 'icon': 'light-recessed'}]}, {'type': 'cardGrid', 'title': "Kelvin's Room", 'entities': [{'entity': 'light.kelvin_s_bedroom_lights', 'name': 'Kelvin Room', 'icon': 'light-recessed'}, {'entity': 'light.kelvin_s_changing_light', 'name': 'Work Light', 'icon': 'light-recessed'}, {'entity': 'light.kelvin_christmas_lights', 'name': 'Xmas Lights', 'icon': 'mdi:string-lights'}, {'entity': 'switch.kitchen_router_outlet', 'name': 'Xmas Tree', 'icon': 'mdi:pine-tree'}, {'entity': 'light.desk_light_on_home_zigbee_light_hub', 'name': 'Desk Light', 'icon': 'mdi:desk-lamp'}, {'entity': 'input_button.play_go_to_sleep_playlist', 'name': 'Go To Sleep', 'icon': 'mdi:sleep'}]}]}
2023-11-15 21:59:08.803700 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/tasmota_your_mqtt_topic/RESULT', 'panelSendTopic': 'cmnd/tasmota_your_mqtt_topic/CustomSend', 'updateMode': 'auto-notify', 'model': 'us-p', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 10}, {'time': '23:00:00', 'value': 10}], 'screenBrightness': 100, 'defaultBackgroundColor': 'ha-dark', 'featureExperimentalSliders': False, 'sleepTracking': None, 'sleepTrackingZones': ['not_home', 'off'], 'sleepOverride': None, 'locale': 'en_US', 'timeFormat': '%I:%M   ?%p', 'dateFormatBabel': 'long', 'dateAdditionalTemplate': '', 'timeAdditionalTemplate': '', 'dateFormat': '%A, %d. %B %Y', 'cards': [{'type': 'cardGrid', 'title': 'Lights', 'entities': [{'entity': 'light.living_room_blue_1', 'name': 'Living Room', 'icon': 'mdi:globe-light'}, {'entity': 'light.kitchen_lights_group', 'name': 'Kitchen', 'icon': 'mdi:lightbulb-group'}, {'entity': 'light.deck_lights', 'name': 'Deck Lights', 'icon': 'light-recessed'}, {'entity': 'light.living_room_floor_lamp', 'name': 'Floor Lamp', 'icon': 'floor-lamp'}, {'entity': 'light.kelvin_s_bedroom_lights', 'name': 'Kelvin Room', 'icon': 'light-recessed'}, {'entity': 'light.kelvin_s_changing_light', 'name': 'Work Light', 'icon': 'light-recessed'}]}, {'type': 'cardGrid', 'title': "Kelvin's Room", 'entities': [{'entity': 'light.kelvin_s_bedroom_lights', 'name': 'Kelvin Room', 'icon': 'light-recessed'}, {'entity': 'light.kelvin_s_changing_light', 'name': 'Work Light', 'icon': 'light-recessed'}, {'entity': 'light.kelvin_christmas_lights', 'name': 'Xmas Lights', 'icon': 'mdi:string-lights'}, {'entity': 'switch.kitchen_router_outlet', 'name': 'Xmas Tree', 'icon': 'mdi:pine-tree'}, {'entity': 'light.desk_light_on_home_zigbee_light_hub', 'name': 'Desk Light', 'icon': 'mdi:desk-lamp'}, {'entity': 'input_button.play_go_to_sleep_playlist', 'name': 'Go To Sleep', 'icon': 'mdi:sleep'}]}], 'screensaver': {'type': 'screensaver', 'entity': 'weather.openweathermap', 'weatherUnit': 'fahrenheit', 'forecastSkip': 0, 'weatherOverrideForecast1': None, 'weatherOverrideForecast2': None, 'weatherOverrideForecast3': None, 'weatherOverrideForecast4': None, 'doubleTapToUnlock': False, 'alternativeLayout': False, 'defaultCard': None, 'key': 'screensaver'}, 'hiddenCards': []}
2023-11-15 21:59:08.806843 INFO nspanel-1: Sending MQTT Message: pageType~pageStartup
2023-11-15 21:59:08.814106 INFO nspanel-1: gtest123: ['light.living_room_blue_1', 'light.kitchen_lights_group', 'light.deck_lights', 'light.living_room_floor_lamp', 'light.kelvin_s_bedroom_lights', 'light.kelvin_s_changing_light', 'light.kelvin_s_bedroom_lights', 'light.kelvin_s_changing_light', 'light.kelvin_christmas_lights', 'switch.kitchen_router_outlet', 'light.desk_light_on_home_zigbee_light_hub', 'input_button.play_go_to_sleep_playlist', 'weather.openweathermap']
2023-11-15 21:59:08.815062 INFO nspanel-1: Registering callbacks for the following items: ['light.living_room_blue_1', 'light.kitchen_lights_group', 'light.deck_lights', 'light.living_room_floor_lamp', 'light.kelvin_s_bedroom_lights', 'light.kelvin_s_changing_light', 'light.kelvin_s_bedroom_lights', 'light.kelvin_s_changing_light', 'light.kelvin_christmas_lights', 'switch.kitchen_router_outlet', 'light.desk_light_on_home_zigbee_light_hub', 'input_button.play_go_to_sleep_playlist', 'weather.openweathermap']
2023-11-15 21:59:08.825965 INFO MQTT: Topic tele/tasmota_your_mqtt_topic/RESULT already subscribed to
2023-11-15 21:59:08.827438 INFO nspanel-1: Started (v4.3.1)
2023-11-15 21:59:08.902713 INFO nspanel-1: MQTT callback for: {'topic': 'tele/tasmota_your_mqtt_topic/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"8"}'}
2023-11-15 21:59:08.904308 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: 8 Panel Version: None
2023-11-15 21:59:10.710522 INFO nspanel-1: MQTT callback for: {'topic': 'tele/tasmota_your_mqtt_topic/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,startup,53,us-p"}'}
2023-11-15 21:59:10.715044 INFO nspanel-1: Received Message from Screen: event,startup,53,us-p
2023-11-15 21:59:10.722087 INFO nspanel-1: Sending MQTT Message: X
2023-11-15 21:59:10.727801 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: None Panel Version: 53
2023-11-15 21:59:10.731354 INFO nspanel-1: Startup Event
2023-11-15 21:59:10.740220 INFO nspanel-1: Sending MQTT Message: time~12:59   ?PM~
2023-11-15 21:59:10.747462 INFO nspanel-1: Sending MQTT Message: date~November 15, 2023
2023-11-15 21:59:10.749938 INFO nspanel-1: Sending MQTT Message: dimmode~10~100~6371~~0
2023-11-15 21:59:10.752429 INFO nspanel-1: Sending MQTT Message: pageType~screensaver
2023-11-15 21:59:10.754837 INFO nspanel-1: Sending MQTT Message: timeout~20
2023-11-15 21:59:10.792578 INFO nspanel-1: Sending MQTT Message: weatherUpdate~~~���~25375~OpenWeatherMap~62��F~~~���~25375~Wed~62��F~~~���~25375~Wed~62��F~~~���~25375~Wed~62��F~~~���~25375~Wed~63��F
2023-11-15 21:59:10.795404 INFO nspanel-1: Sending MQTT Message: statusUpdate~~~~~~
2023-11-15 21:59:10.993480 INFO nspanel-1: MQTT callback for: {'topic': 'tele/tasmota_your_mqtt_topic/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"8"}'}
2023-11-15 21:59:10.996749 INFO nspanel-1: Update Pre-Check sucessful Tasmota Driver Version: 8 Panel Version: 53`
baerenmarke90 commented 8 months ago

So I followed your instructions. The module will be loaded but then, these error messages come up. Any ideas? My NS-Panel is waiting for content. Tasmota and MQTT (configured inside Tasmota) work.

2023-11-15 22:06:49.367061 INFO HASS: All startup conditions met 2023-11-15 22:06:49.454540 INFO AppDaemon: Got initial state from namespace default 2023-11-15 22:06:51.251337 INFO AppDaemon: Scheduler running in realtime 2023-11-15 22:06:51.254569 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/ to module import path 2023-11-15 22:06:51.255477 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui to module import path 2023-11-15 22:06:51.256102 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend to module import path 2023-11-15 22:06:51.259154 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations to module import path 2023-11-15 22:06:51.259961 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/frontend to module import path 2023-11-15 22:06:51.260558 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/backend to module import path 2023-11-15 22:06:51.271650 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/apis.py - ignoring 2023-11-15 22:06:51.272952 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py - ignoring 2023-11-15 22:06:51.273991 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/theme.py - ignoring 2023-11-15 22:06:51.275148 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/localization.py - ignoring 2023-11-15 22:06:51.276092 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/helper.py - ignoring 2023-11-15 22:06:51.276954 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/controller.py - ignoring 2023-11-15 22:06:51.277761 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py - ignoring 2023-11-15 22:06:51.278580 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/icons.py - ignoring 2023-11-15 22:06:51.279662 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/config.py - ignoring 2023-11-15 22:06:51.280917 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py - ignoring 2023-11-15 22:06:51.282177 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/updater.py - ignoring 2023-11-15 22:06:51.283264 INFO AppDaemon: App initialization complete

baerenmarke90 commented 8 months ago

So I followed your instructions. The module will be loaded but then, these error messages come up. Any ideas? My NS-Panel is waiting for content. Tasmota and MQTT (configured inside Tasmota) work.

okay, never mind. I copy the apps.yml from the appdaemon addon into the old /homeassistant/appdaemon/apps folder, restarted everything and now it works :)

karlc28 commented 8 months ago

so i followed all the steps above i have appdaemon running and my nspanel seemed to have refreshed and when i touch the screen my normal screen comes on but if i try to tap or swipe to the next screen it goes blank/black screen with the backlight on and is unresposive untill it dims and goes back to the normal screen again

any ideas

joBr99 commented 8 months ago

please provide the logs from appdaemon during this issue

Jelloitsalive12 commented 8 months ago

idk what you did, but without the appdaemon add-on running it's not going to do anything

I have gone as far as removing appdaemon, and reinstalling after a reboot. I performed all of the changes described above in steps 1-4 in top post, but my AppDaemon still shows as not running. That said, I can't tell from logs/NSPanel functionality. Everything appears to be working, but would like confirmation that AppDaemon is in fact running.

karlc28 commented 8 months ago
2023-11-15 21:51:46.127276 WARNING AppDaemon: ------------------------------------------------------------
2023-11-15 21:51:47.129815 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/pages.py
2023-11-15 21:51:47.130236 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py
2023-11-15 21:51:47.130659 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/localization.py
2023-11-15 21:51:47.131014 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/theme.py
2023-11-15 21:51:47.131386 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/helper.py
2023-11-15 21:51:47.131768 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/icons.py
2023-11-15 21:51:47.132158 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/apis.py
2023-11-15 21:51:47.132734 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/config.py
2023-11-15 21:51:47.133193 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/updater.py
2023-11-15 21:51:47.133715 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/mqtt.py
2023-11-15 21:51:47.134214 INFO AppDaemon: Removing module /config/apps/nspanel-lovelace-ui/luibackend/controller.py
2023-11-15 21:52:00.328310 INFO nspanel-1: Sending MQTT Message: time~21:52~
2023-11-15 21:53:00.328783 INFO nspanel-1: Sending MQTT Message: time~21:53~
2023-11-15 21:54:00.332381 INFO nspanel-1: Sending MQTT Message: time~21:54~
2023-11-15 21:54:57.412757 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,bExit,1"}'}
2023-11-15 21:54:57.414370 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,bExit,1
2023-11-15 21:54:57.416234 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: bExit; value: 1 
2023-11-15 21:54:57.426135 INFO nspanel-1: Sending MQTT Message: pageType~cardGrid
2023-11-15 21:54:57.430167 INFO nspanel-1: Sending MQTT Message: timeout~20
2023-11-15 21:54:57.436609 WARNING nspanel-1: ------------------------------------------------------------
2023-11-15 21:54:57.436950 WARNING nspanel-1: Unexpected error in worker for App nspanel-1:
2023-11-15 21:54:57.437294 WARNING nspanel-1: Worker Ags: {'id': 'c5113f84cb344fd8a01a5a29f7d88051', 'name': 'nspanel-1', 'objectid': '1bd4b165cc5e41b9861fceffb11b021f', 'type': 'event', 'event': 'MQTT_MESSAGE', 'function': <bound method LuiMqttListener.mqtt_event_callback of <luibackend.mqtt.LuiMqttListener object at 0x7f5b1068e250>>, 'data': {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,bExit,1"}'}, 'pin_app': True, 'pin_thread': 0, 'kwargs': {'topic': 'tele/nspanel/RESULT', '__thread_id': 'thread-0'}}
2023-11-15 21:54:57.437598 WARNING nspanel-1: ------------------------------------------------------------
2023-11-15 21:54:57.440108 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 "/config/apps/nspanel-lovelace-ui/luibackend/mqtt.py", line 57, in mqtt_event_callback
  File "/config/apps/nspanel-lovelace-ui/luibackend/controller.py", line 234, in button_press
  File "/config/apps/nspanel-lovelace-ui/luibackend/pages.py", line 739, in render_card
  File "/config/apps/nspanel-lovelace-ui/luibackend/pages.py", line 428, in generate_entities_page
  File "/config/apps/nspanel-lovelace-ui/luibackend/pages.py", line 253, in generate_entities_item
  File "/config/apps/nspanel-lovelace-ui/luibackend/pages.py", line 102, in get_entity_color
  File "/config/apps/nspanel-lovelace-ui/luibackend/helper.py", line 34, in rgb_brightness
  File "/config/apps/nspanel-lovelace-ui/luibackend/helper.py", line 9, in scale
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

2023-11-15 21:54:57.440428 WARNING nspanel-1: ------------------------------------------------------------
2023-11-15 21:54:59.415070 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,,button"}'}
2023-11-15 21:54:59.417028 INFO nspanel-1: Received Message from Screen: event,buttonPress2,,button
2023-11-15 21:54:59.419039 INFO nspanel-1: Button Press Event; entity_id: ; button_type: button; value: None 
2023-11-15 21:55:00.321914 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,,button"}'}
2023-11-15 21:55:00.323585 INFO nspanel-1: Received Message from Screen: event,buttonPress2,,button
2023-11-15 21:55:00.325625 INFO nspanel-1: Button Press Event; entity_id: ; button_type: button; value: None 
2023-11-15 21:55:00.342191 INFO nspanel-1: Sending MQTT Message: time~21:55~
2023-11-15 21:55:00.416623 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,,button"}'}
2023-11-15 21:55:00.418741 INFO nspanel-1: Received Message from Screen: event,buttonPress2,,button
2023-11-15 21:55:00.420554 INFO nspanel-1: Button Press Event; entity_id: ; button_type: button; value: None 
2023-11-15 21:55:19.675111 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,sleepReached,cardGrid"}'}
2023-11-15 21:55:19.678516 INFO nspanel-1: Received Message from Screen: event,sleepReached,cardGrid
2023-11-15 21:55:19.680574 INFO nspanel-1: Button Press Event; entity_id: cardGrid; button_type: sleepReached; value: None 
2023-11-15 21:55:19.683323 INFO nspanel-1: Sending MQTT Message: pageType~screensaver
2023-11-15 21:55:19.690231 INFO nspanel-1: Sending MQTT Message: timeout~20
2023-11-15 21:55:19.720860 INFO nspanel-1: Sending MQTT Message: weatherUpdate~~~���~38060~Forecast Home~5.2��C~~~���~65504~Wed~5.2��C~~~���~31728~Thu~8.9��C~~~���~38066~Fri~8.1��C~~~���~38066~Sat~13.8��C
2023-11-15 21:55:19.725047 INFO nspanel-1: Sending MQTT Message: statusUpdate~~~~~~
2023-11-15 21:55:30.359852 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:55:35.370757 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:55:40.378900 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:55:45.386326 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:55:50.394009 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:55:55.408405 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:56:00.317695 WARNING nspanel-1: Attempt to call Home Assistant while disconnected: render_template
2023-11-15 21:56:00.320331 INFO nspanel-1: Sending MQTT Message: time~21:56~None
2023-11-15 21:56:03.258620 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:56:08.307598 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:56:13.317519 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2023-11-15 21:56:20.550779 INFO HASS: Connected to Home Assistant 2023.11.2
2023-11-15 21:56:21.075081 INFO HASS: Evaluating startup conditions
2023-11-15 21:56:21.241297 INFO HASS: Startup condition met: hass state=RUNNING
2023-11-15 21:56:21.241740 INFO HASS: All startup conditions met
2023-11-15 21:56:21.316556 INFO AppDaemon: Processing restart for HASS
2023-11-15 21:56:21.317077 INFO AppDaemon: Terminating nspanel-1
2023-11-15 21:56:21.318586 INFO AppDaemon: Loading app nspanel-1 using class NsPanelLovelaceUIManager from module nspanel-lovelace-ui
2023-11-15 21:56:21.319110 WARNING AppDaemon: Unable to find module module nspanel-lovelace-ui - 'nspanel-1' is not loaded
2023-11-15 21:56:21.320042 INFO AppDaemon: Calling initialize() for nspanel-1
2023-11-15 21:56:21.323899 INFO nspanel-1: Starting
2023-11-15 21:56:21.326974 INFO nspanel-1: Input config: {'panelRecvTopic': 'tele/nspanel/RESULT', 'panelSendTopic': 'cmnd/nspanel/CustomSend', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 4}, {'time': '20:00:00', 'value': 0}], 'locale': 'en_US', 'screensaver': {'entity': 'weather.home'}, 'cards': [{'type': 'cardGrid', 'entities': [{'entity': 'light.f_r_2'}, {'entity': 'light.f_r_4'}, {'entity': 'light.f_r_6'}, {'entity': 'light.f_r_1'}, {'entity': 'light.f_r_3'}, {'entity': 'light.f_r_5'}], 'title': 'Living Room'}, {'type': 'cardGrid', 'entities': [{'entity': 'light.big_light'}, {'entity': 'switch.christmas'}], 'title': 'Living Room'}, {'type': 'cardThermo', 'title': 'Heating', 'entity': 'climate.living_room'}]}
2023-11-15 21:56:21.329102 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/nspanel/RESULT', 'panelSendTopic': 'cmnd/nspanel/CustomSend', 'updateMode': 'auto-notify', 'model': 'eu', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 4}, {'time': '20:00:00', 'value': 0}], 'screenBrightness': 100, 'defaultBackgroundColor': 'ha-dark', 'featureExperimentalSliders': False, 'sleepTracking': None, 'sleepTrackingZones': ['not_home', 'off'], 'sleepOverride': None, 'locale': 'en_US', 'timeFormat': '%H:%M', 'dateFormatBabel': 'full', 'dateAdditionalTemplate': '', 'timeAdditionalTemplate': '', 'dateFormat': '%A, %d. %B %Y', 'cards': [{'type': 'cardGrid', 'entities': [{'entity': 'light.f_r_2'}, {'entity': 'light.f_r_4'}, {'entity': 'light.f_r_6'}, {'entity': 'light.f_r_1'}, {'entity': 'light.f_r_3'}, {'entity': 'light.f_r_5'}], 'title': 'Living Room'}, {'type': 'cardGrid', 'entities': [{'entity': 'light.big_light'}, {'entity': 'switch.christmas'}], 'title': 'Living Room'}, {'type': 'cardThermo', 'title': 'Heating', 'entity': 'climate.living_room'}], 'screensaver': {'type': 'screensaver', 'entity': 'weather.home', 'weatherUnit': 'celsius', 'forecastSkip': 0, 'weatherOverrideForecast1': None, 'weatherOverrideForecast2': None, 'weatherOverrideForecast3': None, 'weatherOverrideForecast4': None, 'doubleTapToUnlock': False, 'alternativeLayout': False, 'defaultCard': None, 'key': 'screensaver'}, 'hiddenCards': []}
2023-11-15 21:56:21.334148 INFO nspanel-1: Sending MQTT Message: pageType~pageStartup
2023-11-15 21:56:21.348168 INFO nspanel-1: gtest123: ['light.f_r_2', 'light.f_r_4', 'light.f_r_6', 'light.f_r_1', 'light.f_r_3', 'light.f_r_5', 'light.big_light', 'switch.christmas', 'climate.living_room', 'weather.home']
2023-11-15 21:56:21.351146 INFO nspanel-1: Registering callbacks for the following items: ['light.f_r_2', 'light.f_r_4', 'light.f_r_6', 'light.f_r_1', 'light.f_r_3', 'light.f_r_5', 'light.big_light', 'switch.christmas', 'climate.living_room', 'weather.home']
2023-11-15 21:56:21.367915 WARNING MQTT: There was an error while subscribing to topic tele/nspanel/RESULT, 'str' object has no attribute 'append'
2023-11-15 21:56:21.373689 INFO nspanel-1: Started (v4.3.1)
2023-11-15 21:56:21.805337 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"8"}'}
2023-11-15 21:56:21.808014 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: 8 Panel Version: None
2023-11-15 21:56:22.052045 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,startup,53,eu"}'}
2023-11-15 21:56:22.053709 INFO nspanel-1: Received Message from Screen: event,startup,53,eu
2023-11-15 21:56:22.055736 INFO nspanel-1: Sending MQTT Message: X
2023-11-15 21:56:22.059438 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: None Panel Version: 53
2023-11-15 21:56:22.061557 INFO nspanel-1: Startup Event
2023-11-15 21:56:22.082425 INFO nspanel-1: Sending MQTT Message: time~21:56~
2023-11-15 21:56:22.106120 INFO nspanel-1: Sending MQTT Message: date~Wednesday, 15. November 2023
2023-11-15 21:56:22.112233 INFO nspanel-1: Sending MQTT Message: dimmode~0~100~6371~~0
2023-11-15 21:56:22.118135 INFO nspanel-1: Sending MQTT Message: pageType~screensaver
2023-11-15 21:56:22.123903 INFO nspanel-1: Sending MQTT Message: timeout~20
2023-11-15 21:56:22.162809 INFO nspanel-1: Sending MQTT Message: weatherUpdate~~~���~38060~Forecast Home~5.2��C~~~���~65504~Wed~5.2��C~~~���~31728~Thu~8.9��C~~~���~38066~Fri~8.1��C~~~���~38066~Sat~13.8��C
2023-11-15 21:56:22.169023 INFO nspanel-1: Sending MQTT Message: statusUpdate~~~~~~
2023-11-15 21:56:22.182507 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"8"}'}
2023-11-15 21:56:22.184534 INFO nspanel-1: Update Pre-Check sucessful Tasmota Driver Version: 8 Panel Version: 53
2023-11-15 21:57:00.357046 INFO nspanel-1: Sending MQTT Message: time~21:57~
joBr99 commented 8 months ago

@karlc28 Hard to tell like this, there is something wrong with your connection to home assistant. Please open a Waiting for Content Issue with your configs and the startuplog from appdaemon.

joBr99 commented 8 months ago

@Jelloitsalive12 it has to run somewhere - you cloud check the docker containers running on the terminal or try to reboot hour Homeassistant OS (Advanced Options in the Restart Dialog - Reboot System)

karlc28 commented 8 months ago

@karlc28 Hard to tell like this, there is something wrong with your connection to home assistant. Please open a Waiting for Content Issue with your configs and the startuplog from appdaemon.

which configs would you need

joBr99 commented 8 months ago

It's explained in the issue template, but basically apps.yaml and appdaemon.yaml - just open a new issue with that template.

karlc28 commented 8 months ago

It's explained in the issue template, but basically apps.yaml and appdaemon.yaml - just open a new issue with that template.

Thank you just to make it easier to see this is what I'm seeing https://github.com/joBr99/nspanel-lovelace-ui/assets/92265354/f724a71e-1430-4eab-9661-437ab63689a0

joBr99 commented 8 months ago

Cannot help you like this, please open that issue and fill out the requested information.

You Backend is dead - if you restart tasmota it's going to show the Waiting for content screen

Jelloitsalive12 commented 8 months ago

@Jelloitsalive12 it has to run somewhere - you cloud check the docker containers running on the terminal or try to reboot hour Homeassistant OS (Advanced Options in the Restart Dialog - Reboot System)

Thank you for the reminder about full reboot vs restarts I'd been doing! That was it, seems to be working as expected again.

aussiebum71 commented 8 months ago

so i followed all the steps above i have appdaemon running and my nspanel seemed to have refreshed and when i touch the screen my normal screen comes on but if i try to tap or swipe to the next screen it goes blank/black screen with the backlight on and is unresposive untill it dims and goes back to the normal screen again

any ideas

I'm having the same issue, I will this evening do some further investigation and provide some diagnostic logs. I don't think it's an AppDaemon 15 release issue. It started after the update of the Core and or the Supervisor to 2023.11.x

joBr99 commented 8 months ago

@aussiebum71 Make sure to be on the latest version of nspanel-lovelace-ui there was a fix for 2023.11

finipini commented 8 months ago

Sorry for (maybe) spamming this but i never updated to the version 0.15.0 or 0.15.1 , the ones with issues , i update directly to 0.15.2 and edit the secrets line and had no issues. I did notested that some addons ( like Appdaemon) moves outside config ( now homeassistant) folder.

My question is: i still have to relocate Appdaemon to the previous location ? With that will be no issues in the future with some update from home assistant? I see that addons still have files in both directories but i guess that they Will erase the old files Somewhere in the future.

joBr99 commented 8 months ago

Yes, if you do not move your apps folder back to the old location you are not able to do any updates though HACS.

rossi75 commented 8 months ago

There is one important change that you have to do to your appdaemon.yaml, which is also mentioned in the release notes of the new version.

for those who are struggling the same way as me for all the directories, only to mention that this appdaemon.yaml is in /addon_configs/a0d7b954_appdaemon/. I accessed this via the "terminal & ssh" HACS-add-on.

I am asking myself, why there may occour those issues where you need a manual intervention into the files. I would assume that if there is a change in any way, the appdaemon add-on checks this for itself and corrects it if neccessary.........?

Leichtbaumichel commented 8 months ago

sorry for the maybe stupid question, but I cant get the panel working after installing Appdaemon 15.2. I have read all the tipps and followed all the steps, but I can't find the bug. Here is the log of appdaemon:

[22:14:31] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
2023-11-17 22:14:33.546983 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2023-11-17 22:14:33.547137 INFO AppDaemon: Python version is 3.11.6
2023-11-17 22:14:33.547233 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml
2023-11-17 22:14:33.547328 INFO AppDaemon: Added log: AppDaemon
2023-11-17 22:14:33.547428 INFO AppDaemon: Added log: Error
2023-11-17 22:14:33.547515 INFO AppDaemon: Added log: Access
2023-11-17 22:14:33.547607 INFO AppDaemon: Added log: Diag
2023-11-17 22:14:33.657237 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-11-17 22:14:33.773488 INFO HASS: HASS Plugin Initializing
2023-11-17 22:14:33.773603 WARNING HASS: ha_url not found in HASS configuration - module not initialized
2023-11-17 22:14:33.773713 INFO HASS: HASS Plugin initialization complete
2023-11-17 22:14:33.773975 INFO AppDaemon: Initializing HTTP
2023-11-17 22:14:33.774193 INFO AppDaemon: Using 'ws' for event stream
2023-11-17 22:14:33.776236 INFO AppDaemon: Starting API
2023-11-17 22:14:33.777611 INFO AppDaemon: Starting Admin Interface
2023-11-17 22:14:33.777803 INFO AppDaemon: Starting Dashboards
2023-11-17 22:14:33.785930 INFO HASS: Connected to Home Assistant 2023.11.2
2023-11-17 22:14:33.798494 INFO AppDaemon: App 'nspanel-1' added
2023-11-17 22:14:33.799131 INFO AppDaemon: Found 1 active apps
2023-11-17 22:14:33.799341 INFO AppDaemon: Found 0 inactive apps
2023-11-17 22:14:33.799546 INFO AppDaemon: Found 0 global libraries
2023-11-17 22:14:33.799722 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2023-11-17 22:14:33.800353 INFO AppDaemon: Running on port 5050
2023-11-17 22:14:33.822380 INFO HASS: Evaluating startup conditions
2023-11-17 22:14:33.827850 INFO HASS: Startup condition met: hass state=RUNNING
2023-11-17 22:14:33.828025 INFO HASS: All startup conditions met
2023-11-17 22:14:33.857748 INFO AppDaemon: Got initial state from namespace default
2023-11-17 22:14:35.806492 INFO AppDaemon: Scheduler running in realtime
2023-11-17 22:14:35.809883 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/ to module import path
2023-11-17 22:14:35.810081 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui to module import path
2023-11-17 22:14:35.810277 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend to module import path
2023-11-17 22:14:35.810455 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations to module import path
2023-11-17 22:14:35.810647 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/backend to module import path
2023-11-17 22:14:35.810841 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/frontend to module import path
2023-11-17 22:14:35.815317 INFO AppDaemon: Loading App Module: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py
2023-11-17 22:14:35.908091 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/localization.py - ignoring
2023-11-17 22:14:35.908622 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/config.py - ignoring
2023-11-17 22:14:35.909035 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py - ignoring
2023-11-17 22:14:35.909435 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/theme.py - ignoring
2023-11-17 22:14:35.909781 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/controller.py - ignoring
2023-11-17 22:14:35.910120 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/updater.py - ignoring
2023-11-17 22:14:35.910496 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py - ignoring
2023-11-17 22:14:35.910833 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py - ignoring
2023-11-17 22:14:35.911172 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/apis.py - ignoring
2023-11-17 22:14:35.911502 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/icons.py - ignoring
2023-11-17 22:14:35.911823 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/nspanel-lovelace-ui/luibackend/helper.py - ignoring
2023-11-17 22:14:35.912118 INFO AppDaemon: Loading app nspanel-1 using class NsPanelLovelaceUIManager from module nspanel-lovelace-ui
2023-11-17 22:14:35.913016 INFO AppDaemon: Calling initialize() for nspanel-1
2023-11-17 22:14:35.942239 INFO nspanel-1: Starting
2023-11-17 22:14:35.942695 WARNING AppDaemon: Unknown Plugin Configuration in get_plugin_api()
2023-11-17 22:14:35.943737 INFO nspanel-1: Input config: {'panelRecvTopic': 'tele/tasmota_Panel/RESULT', 'panelSendTopic': 'cmnd/tasmota_Panel/CustomSend', 'model': 'eu', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 10}, {'time': '23:00:00', 'value': 0}], 'locale': 'de_DE', 'screensaver': {'entity': None}, 'cards': [{'type': 'cardEntities', 'entities': [{'entity': 'switch.example_item'}, {'entity': 'light.example_item'}], 'title': 'Example 1'}, {'type': 'cardGrid', 'entities': [{'entity': 'switch.example_item'}, {'entity': 'light.example_item'}], 'title': 'Example 2'}]}
2023-11-17 22:14:35.944788 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/tasmota_Panel/RESULT', 'panelSendTopic': 'cmnd/tasmota_Panel/CustomSend', 'updateMode': 'auto-notify', 'model': 'eu', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '7:00:00', 'value': 10}, {'time': '23:00:00', 'value': 0}], 'screenBrightness': 100, 'defaultBackgroundColor': 'ha-dark', 'featureExperimentalSliders': False, 'sleepTracking': None, 'sleepTrackingZones': ['not_home', 'off'], 
'sleepOverride': None, 'locale': 'de_DE', 'timeFormat': '%H:%M', 'dateFormatBabel': 'full', 'dateAdditionalTemplate': '', 'timeAdditionalTemplate': '', 'dateFormat': '%A, %d. %B %Y', 'cards': [{'type': 'cardEntities', 'entities': [{'entity': 'switch.example_item'}, {'entity': 'light.example_item'}], 'title': 'Example 1'}, {'type': 'cardGrid', 'entities': [{'entity': 'switch.example_item'}, {'entity': 'light.example_item'}], 'title': 'Example 2'}], 'screensaver': {'type': 'screensaver', 'entity': None, 'weatherUnit': 'celsius', 'forecastSkip': 0, 'weatherOverrideForecast1': None, 'weatherOverrideForecast2': None, 'weatherOverrideForecast3': None, 'weatherOverrideForecast4': None, 'doubleTapToUnlock': False, 'alternativeLayout': False, 'defaultCard': None, 'key': 'screensaver'}, 'hiddenCards': []}
2023-11-17 22:14:35.945584 WARNING nspanel-1: ------------------------------------------------------------
2023-11-17 22:14:35.945745 WARNING nspanel-1: Unexpected error running initialize() for nspanel-1
2023-11-17 22:14:35.945859 WARNING nspanel-1: ------------------------------------------------------------
2023-11-17 22:14:35.947071 WARNING nspanel-1: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app
    await utils.run_in_executor(self, init)
  File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor
    response = future.result()
               ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/homeassistant/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py", line 25, in initialize
    apis.mqtt_api.mqtt_publish(topic_send.replace("CustomSend", "GetDriverVersion"), "x")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'mqtt_publish'

2023-11-17 22:14:35.947216 WARNING nspanel-1: ------------------------------------------------------------
2023-11-17 22:14:35.947668 INFO AppDaemon: App initialization complete

This is my appdaemon.yaml

secrets: /homeassistant/secrets.yaml
appdaemon:
app_dir: /homeassistant/appdaemon/apps/
  latitude: 52.379189
  longitude: 4.899431
  elevation: 2
  time_zone: Europe/Berlin
  plugins:
    HASS:
      type: hass
  MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: core-mosquitto.local.hass.io
      client_port: 1883
      client_user: "XYZ"
      client_password: !secret panel
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:
joBr99 commented 8 months ago

The identation of MQTT is wrong it needs to be on the same level as HASS

Leichtbaumichel commented 8 months ago

Thank you for your qucíck reply (this was a beginners mistake). Now I have abother error...

[23:02:52] INFO: Starting AppDaemon... Unexpected error loading config file: /config/appdaemon.yaml mapping values are not allowed here in "", line 4, column 11: latitude: 52.379189

joBr99 commented 8 months ago

same problem, try this:

secrets: /homeassistant/secrets.yaml
appdaemon:
app_dir: /homeassistant/appdaemon/apps/
latitude: 52.379189
longitude: 4.899431
elevation: 2
time_zone: Europe/Berlin
plugins:
  HASS:
      type: hass
  MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: core-mosquitto.local.hass.io
      client_port: 1883
      client_user: "XYZ"
      client_password: !secret panel
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:
Leichtbaumichel commented 8 months ago

not my day... next error:

[23:11:50] INFO: Starting AppDaemon... s6-rc: info: service legacy-services successfully started Traceback (most recent call last): File "/usr/bin/appdaemon", line 8, in sys.exit(main()) ^^^^^^ File "/usr/lib/python3.11/site-packages/appdaemon/main.py", line 417, in main admain.main() File "/usr/lib/python3.11/site-packages/appdaemon/main.py", line 281, in main if "disable_apps" not in appdaemon: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable [23:11:52] INFO: Service AppDaemon exited with code 1 (by signal 0)

joBr99 commented 8 months ago

ups, try this:

secrets: /config/secrets.yaml
appdaemon:
  latitude: 52.379189
  longitude: 4.899431
  elevation: 2
  time_zone: Europe/Berlin
  app_dir: /homeassistant/appdaemon/apps/
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: core-mosquitto.local.hass.io
      client_port: 1883
      client_user: "XYZ"
      client_password: !secret panel
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:
Leichtbaumichel commented 8 months ago

same problem

joBr99 commented 8 months ago

adjust the secrets line, copy pasted my example from the documentation, need to fix that

Leichtbaumichel commented 8 months ago

Thank you very much- its is running! Looking at my mistakes it must be a little bit to late for me ;-)

michilehr commented 8 months ago

There goes another 🍺 or two. Thanks for the very well documented update process @joBr99 🙏

six50joe commented 6 months ago

for those who are struggling the same way as me for all the directories, only to mention that this appdaemon.yaml is in /addon_configs/a0d7b954_appdaemon/. I accessed this via the "terminal & ssh" HACS-add-on.

I haven't been able to access this dir via ssh; it isn't visible as a volume, only /config and the usual other dirs- is there a particular thing you needed to do?

rossi75 commented 6 months ago

for those who are struggling the same way as me for all the directories, only to mention that this appdaemon.yaml is in /addon_configs/a0d7b954_appdaemon/. I accessed this via the "terminal & ssh" HACS-add-on.

I haven't been able to access this dir via ssh; it isn't visible as a volume, only /config and the usual other dirs- is there a particular thing you needed to do?

You need to enable the invisibles in the Editor settings

joBr99 commented 6 months ago

In VSCode File>OpenFolder

image

image

six50joe commented 6 months ago

I haven't been able to access this dir via ssh; it isn't visible as a volume, only /config and the usual other dirs- is there a particular thing you needed to do?

You need to enable the invisibles in the Editor settings

Thanks for replying. This only allows you to access it using an option built into the HA VSCode Editor add on, which is unrelated to ssh. I want to know how to access this volume in a terminal shell (ex. cd <volume>/a0d7b054_appdaemon) then run my own comand line editing tools or my editor (Emacs), which can edit files over ssh, as I have been doing with files in /config/* for a long time.

joBr99 commented 6 months ago

I don't know, I'm not using the ssh plugin. The instructions above are moving the app and the apps.yaml back to it original location in /config, as the new location isn't going to work with HACS and I think the benefits of the new location are not worth the issues created by this change. But I don't have any influence on that.

If you want to know how to access the new config folder over ssh ask the devs of the ssh plugin or the devs of the appdaemon addon.

randybb commented 6 months ago

I have all files in the new directory, I have the old addons_config dir empty and no issues.

The reason for the new dir is that HA can create a backup of a plugin and it can be easily reverted. This was not possible previously, as addons_config dir is included in HA backup.

joBr99 commented 6 months ago

Yep, the only issue you have is that HACS won't be able to update the files in the new folder as HACS is running inside of the Homeassistent Container and will never be able access to the new folder.

There was a backup of the config before just not bundled with the appdaemon app, it was bundled with Homeassistent, which I actually would prefer as my config doesn't get messed up when rolling back appdaemon to an older version.

madebywitteveen commented 3 months ago

Hello joBr99, regarding all the issues with the appdeamon and the core update 2024.4.

could you make a summary where all the apps/configuration/secrets files should be and what should be inside to get it working. Or is there some tool which checks everything ?

After the latest 2024.4 core update I have the weather card working again but can not use the 'type: x' options.

This doesn't work:

    - entity: weather.forecast_home
    type: 1

Then the weather card disappears completely.

thanks

joBr99 commented 3 months ago

Your indentation is wrong type has to be on the same level als entity. Also see #1204 and the latest release notes: https://github.com/joBr99/nspanel-lovelace-ui/releases/tag/v4.4.0