Closed robje closed 9 months ago
Did you pay attention to the release notes of the Update?
I didn't upgrade my AppDaemon Version yet so idk but I guess this is going to cause issues with HACS too.
I just did the upgrade and now it's entirely broken, still investigating but it looks like even my config is gone ... lol
I just did the upgrade and now it's entirely broken, still investigating but it looks like even my config is gone ... lol
Same issue here, I restored the entire folder and downgrade to previous appdaemon version to recover
So in my case updating from 14.0 to 15.2 breaks appdaemon entirely:
[17:07:54] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
File "/usr/bin/appdaemon", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/appdaemon/__main__.py", line 417, in main
ERROR Error loading secrets file: /config/secrets.yaml
admain.main()
File "/usr/lib/python3.11/site-packages/appdaemon/__main__.py", line 276, in main
if "appdaemon" not in config:
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
[17:07:55] INFO: Service AppDaemon exited with code 1 (by signal 0)
config/appdaemon is empty afterwards - it looks like the files have been moved to /addon_configs/a0d7b954_appdaemon/ (which you can acually open in the vscode addon)
To solve the error above I needed to change the line with the secrets (Even though I'm not using it so I could remove it aswell lol)
#secrets: /config/secrets.yaml
secrets: /homeassistant/secrets.yaml
Next issue that I got is related to the config files that I've included from apps.yaml.
#hiddenCards: !include /config/appdaemon/apps/hiddenCards.yaml
hiddenCards: !include /config/apps/hiddenCards.yaml
If I recall correctly my config was moved to /addon_configs/a0d7b954_appdaemon/
Did you pay attention to the release notes of the Update?
I did not read all changelogs, except for 0.15.2
So in my case updating from 14.0 to 15.2 breaks appdaemon entirely
Same here. I'm using AppDaemon only for NSPanel Lovelace UI, this is the literal only reason it exists on my HA server. The issue in the AppDaemon Github doesn't seem to be fully solved at the moment, I'll patiently wait for a guide here.
Ok, after I fixed the issue with my secrets files (and the config files I included) - everything is working fine.
@robje
AttributeError: 'NoneType' object has no attribute 'mqtt_publish'
This is happening if mqtt initialization doesn't work - so please check what your appdaemon addon is logging after restarting it. Maybe your mqtt password is no longer working, because it was in the secrets file or something like that.
@Critycal1 For the most people this is probably fixing it, because it's preventing appdaemon from starting up.
If you have this in your appdaemon.yaml file:
secrets: /config/secrets.yaml You will need to adjust this to:
secrets: /homeassistant/secrets.yaml
AttributeError: 'NoneType' object has no attribute 'mqtt_publish'
This is happening if mqtt initialization doesn't work - so please check what your appdaemon addon is logging after restarting it. Maybe your mqtt password is no longer working, because it was in the secrets file or something like that.
at least one of the controllerx instances is working fine. I guess this means passwords are read.
secrets: /homeassistant/secrets.yaml
is in my /addon_configs/a0d7b954_appdaemon/appdaemon.yaml
Thanks for the suggestion, but I'm in the same boat as the guys who have a complete empty AppDaemon folder. (/homeassistant/appdaemon/ was filled before). How would I start fixing this? Sorry for the inconvenience.
I have the exact same log output as you here:
[17:07:54] 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 ERROR Error loading secrets file: /config/secrets.yaml admain.main() File "/usr/lib/python3.11/site-packages/appdaemon/main.py", line 276, in main if "appdaemon" not in config: ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable [17:07:55] INFO: Service AppDaemon exited with code 1 (by signal 0)
Edit:
Just saw your reply. I think my main problem is to find the new appdaemon.yaml and to access it. I have vscode installed, but the top level folder I can access seems to be only /homeassistant/ like in the usual file editor that ships with HA.
Thank you so much, this helped. I can confirm after accessing the folder you linked above and changed this:
@Critycal1 For the most people this is probably fixing it, because it's preventing appdaemon from starting up.
If you have this in your appdaemon.yaml file: secrets: /config/secrets.yaml You will need to adjust this to: secrets: /homeassistant/secrets.yaml
It works again without any problem.
So as HACS isn't able to access to the folder this is the workaround to still use the application from HACS in the home assistant folder:
rm -rf /config/apps/apps-from-hacs && cp -R /homeassistant/appdaemon/apps/ /config/apps/apps-from-hacs/
This will do the following things on every startup of the appdaemon container
/config/apps/apps-from-hacs
/homeassistant/appdaemon/apps/
into /config/apps/apps-from-hacs/
You may need to delete the nspanel-lovelace-ui
folder directly below /config/apps/
afterwards.
So summarized it in a new issue:
https://github.com/joBr99/nspanel-lovelace-ui/issues/1029
@robje Going to close this one, however if you still have issues with MQTT comment here.
okay found an even simpler solution see #1029
MQTT:
was gone from the moved appdaemon.yaml
and I didn't spot it right away. After adding MQTT:
section back things work as expected.
Sorry for the not being sharp.
So in my case updating from 14.0 to 15.2 breaks appdaemon entirely:
[17:07:54] INFO: Starting AppDaemon... s6-rc: info: service legacy-services successfully started Traceback (most recent call last): File "/usr/bin/appdaemon", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/lib/python3.11/site-packages/appdaemon/__main__.py", line 417, in main ERROR Error loading secrets file: /config/secrets.yaml admain.main() File "/usr/lib/python3.11/site-packages/appdaemon/__main__.py", line 276, in main if "appdaemon" not in config: ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable [17:07:55] INFO: Service AppDaemon exited with code 1 (by signal 0)
config/appdaemon is empty afterwards - it looks like the files have been moved to /addon_configs/a0d7b954_appdaemon/ (which you can acually open in the vscode addon)
To solve the error above I needed to change the line with the secrets (Even though I'm not using it so I could remove it aswell lol)
#secrets: /config/secrets.yaml secrets: /homeassistant/secrets.yaml
Next issue that I got is related to the config files that I've included from apps.yaml.
#hiddenCards: !include /config/appdaemon/apps/hiddenCards.yaml hiddenCards: !include /config/apps/hiddenCards.yaml
This finally did the trick! All seems to work now… Thank you all for your work!!!
PROBLEM DESCRIPTION
After upgrading AppDaemon (to 0.15.0 then 0.15.1 and finaly 0.15.2) nspanel-lovelace-ui fails to start properly.
in AppDaemon wui the state of NsPanelLovelaceUIManager is
initialize_error
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
kantoor_controllerx: module: controllerx class: HG06323LightController integration: z2m controller: sensor.kantoor_spots_afstandsbediening_action light: light.bureau_lamp
bedlamp_robje_controllerx: module: controllerx class: E2002LightController integration: z2m controller: sensor.bedlamp_robje_knop_action light: light.bedlamp_robje
bedlamp_francine_controllerx: module: controllerx class: E2002LightController integration: z2m controller: sensor.bedlamp_francine_knop_action light: light.bedlamp_francine
nsp01: module: nspanel-lovelace-ui class: NsPanelLovelaceUIManager config: panelRecvTopic: tele/nsp01/RESULT panelSendTopic: cmnd/nsp01/CustomSend model: eu locale: nl_NL screensaver: type: screensaver entities:
relevant log output:
2023-11-15 14:53:30.883813 WARNING nsp01: ------------------------------------------------------------ 2023-11-15 14:53:30.885295 WARNING nsp01: Unexpected error running initialize() for nsp01 2023-11-15 14:53:30.886526 WARNING nsp01: ------------------------------------------------------------ 2023-11-15 14:53:30.894033 WARNING nsp01: 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 "/config/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-15 14:53:30.895261 WARNING nsp01: ------------------------------------------------------------