bob1de / hass-apps

Some useful apps and snippets to empower Home Assistant and AppDaemon even more.
Apache License 2.0
85 stars 23 forks source link

Appdaemon4 HAOS Plugin and Hass-apps not working. #69

Closed supersebbo closed 2 years ago

supersebbo commented 2 years ago

Hi,

I'm trying to get hass-apps working inside AppDaemon4. I've followed all the instructions and I'm sure I've done everything by the book, the logs are showing that AppDaemon installs the hass-apps Python package during startup, but this is where the good news ends.

Installing collected packages: observable, cached-property, hass-apps
Successfully installed cached-property-1.5.2 hass-apps-0.20200319.0 observable-1.0.3
[cont-init.d] appdaemon.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:12:55] INFO: Starting AppDaemon...

Any apps placed in the config/appdaemon/apps folder do not seem to be able to refence the installed hass-apps package and just state:

2021-11-11 11:13:01.484407 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hass_apps_loader.py - ignoring
2021-11-11 11:13:01.489322 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/schedule_heating.py - ignoring

Full startup log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: AppDaemon 4
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.7.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 6.6  (amd64 / qemux86-64)
 Home Assistant Core: 2021.11.1
 Home Assistant Supervisor: 2021.10.8
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] appdaemon.sh: executing... 
Looking in links: https://wheels.home-assistant.io/alpine-3.13/amd64/
Collecting hass-apps
  Downloading hass_apps-0.20200319.0-py3-none-any.whl (54 kB)
Requirement already satisfied: voluptuous~=0.11 in /usr/lib/python3.9/site-packages (from hass-apps) (0.12.1)
Collecting cached-property~=1.5
  Downloading https://wheels.home-assistant.io/alpine-3.13/amd64/cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Requirement already satisfied: appdaemon<5,>=3.0 in /usr/lib/python3.9/site-packages (from hass-apps) (4.1.0)

----TRUNCATED A BUNCH REQUIREMENT SATISFIED OUTPUT ---

Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3.9/site-packages (from requests-oauthlib>=0.5.0->msrest>=0.6.21->azure-keyvault-secrets==4.3.0->appdaemon<5,>=3.0->hass-apps) (3.1.1)
Installing collected packages: observable, cached-property, hass-apps
Successfully installed cached-property-1.5.2 hass-apps-0.20200319.0 observable-1.0.3
[cont-init.d] appdaemon.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:12:55] INFO: Starting AppDaemon...
2021-11-11 11:12:58.923614 INFO AppDaemon: AppDaemon Version 4.1.0 starting
2021-11-11 11:12:58.924626 INFO AppDaemon: Python version is 3.9.5
2021-11-11 11:12:58.925389 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2021-11-11 11:12:58.926353 INFO AppDaemon: Added log: AppDaemon
2021-11-11 11:12:58.927937 INFO AppDaemon: Added log: Error
2021-11-11 11:12:58.928995 INFO AppDaemon: Added log: Access
2021-11-11 11:12:58.930096 INFO AppDaemon: Added log: Diag
2021-11-11 11:12:59.017832 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2021-11-11 11:12:59.176110 INFO HASS: HASS Plugin Initializing
2021-11-11 11:12:59.177591 INFO HASS: HASS Plugin initialization complete
2021-11-11 11:12:59.179923 INFO AppDaemon: Initializing HTTP
2021-11-11 11:12:59.182640 INFO AppDaemon: Using 'ws' for event stream
2021-11-11 11:12:59.198090 INFO AppDaemon: Starting API
2021-11-11 11:12:59.215897 INFO AppDaemon: Starting Old Admin Interface
2021-11-11 11:12:59.217723 INFO AppDaemon: Starting Dashboards
2021-11-11 11:12:59.317093 INFO HASS: Connected to Home Assistant 2021.11.1
2021-11-11 11:12:59.371853 INFO AppDaemon: App 'hello_world' added
2021-11-11 11:12:59.375856 INFO AppDaemon: Found 1 total apps
2021-11-11 11:12:59.378295 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2021-11-11 11:12:59.381839 INFO AppDaemon: Running on port 5050
2021-11-11 11:12:59.489693 INFO HASS: Evaluating startup conditions
2021-11-11 11:12:59.527717 INFO HASS: Startup condition met: hass state=RUNNING
2021-11-11 11:12:59.529075 INFO HASS: All startup conditions met
2021-11-11 11:12:59.609248 INFO AppDaemon: Got initial state from namespace default
2021-11-11 11:13:01.457781 INFO AppDaemon: Scheduler running in realtime
2021-11-11 11:13:01.469940 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2021-11-11 11:13:01.484407 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hass_apps_loader.py - ignoring
2021-11-11 11:13:01.489322 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/schedule_heating.py - ignoring
2021-11-11 11:13:01.493325 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2021-11-11 11:13:01.516644 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2021-11-11 11:13:01.984273 INFO hello_world: Hello from AppDaemon
2021-11-11 11:13:01.988963 INFO hello_world: You are now ready to run Apps!
2021-11-11 11:13:01.995478 INFO AppDaemon: App initialization complete
supersebbo commented 2 years ago

User error! I was saving my hass-apps app files as .py instead of .yaml.