AppDeamon3 - can't get it off the ground!?

I am brand new to AppDeamon so I apologize in advance for my ignorance. I installed AppDeamon3 using hass.io using this repo: https://github.com/hassio-addons/repository. I plan to use AD for automations and not so much for HA Dashboard.

I have been looking around the community and google and I hav been trying a ton of angles, but with the same result! When I restart AppDeamon I get the following error in the log. The Error repeats every 5 seconds. I have attached my config below.

2018-03-04 14:17:46.293916 INFO AppDaemon Version 3.0.0b2 starting
2018-03-04 14:17:46.294771 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/appdaemon/admain.py", line 341, in main
    admain.main()
  File "/usr/lib/python3.6/site-packages/appdaemon/admain.py", line 337, in main
    self.run(appdaemon, hadashboard)
  File "/usr/lib/python3.6/site-packages/appdaemon/admain.py", line 59, in run
    self.AD = ad.AppDaemon(self.logger, self.error, loop, **appdaemon)
  File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 96, in __init__
>         self.plugin_params = kwargs["plugins"]
> KeyError: 'plugins'

appdeamon.yaml:
(Below I assume that the api_key and ha_key is the http password defined in my configuration.yaml w/ api_password: ****)

log:
  logfile: /config/appdaemon/log/info.log
  errorfile: /config/appdaemon/log/error.log

appdaemon:
  api_key: ****
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_key: ****
      ha_url: http://192.168.1.22:8123

What am I doing wrong?
Also: Where do I place my “apps”?

hello_world:
  class: HelloWorld
  module: hello

Does this go in my appdaemon.yaml (and at what indent) or should I create a apps.yaml?

Please help :wink:
//Tonkin

Also this config throws the same error:

log:
logfile: /config/appdaemon/log/info.log
errorfile: /config/appdaemon/log/error.log

appdaemon:
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_key: ******
      ha_url: http://192.168.1.22:8123

Your place your app descriptions in a separate file, that goes in the same directory as your apps themselves, e.g. a subdirectory called apps in the same directory as your appdaemon.yaml.

As far as the error itself goes, I am puzzled because it is saying you have no plugins section under the appdaemon directive which is clearly wrong.

Wierd!
This is how my files are stored:

I tried to enter my hello_world app in appdeamon.yaml, but still the same error:

log:
  logfile: /config/appdaemon/log/info.log
  errorfile: /config/appdaemon/log/error.log

appdaemon:
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_key: ****
      ha_url: http://192.168.1.22:8123
  hello_world:
    class: HelloWorld
    module: hello

?!?!?

No, you need the hello_world piece in a new file called apps.yaml in the same directory as hello.py

do i see correctly that you have 2 appdaemon.yaml files?

are you editing the right one?

Good observation!
Now it works. THANKS!!! (slightly embarrassing)

Now three new questions arises:

  1. Should I be worried by the log “INFO API is disabled” (see below),
  2. what about the last warning about a missing description? I only have one app “hello.py” and
  3. what is this new folder in my apps folder __pycache__ (containing the file “hello.cpython-36.pyc”)

info.log now shows:

2018-03-05 14:11:25.001500 INFO AppDaemon Version 3.0.0b2 starting
2018-03-05 14:11:25.002303 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
...
2018-03-05 14:11:25.321120 INFO API is disabled
 ...
2018-03-05 14:11:28.206865 INFO hello_world: Hello from AppDaemon
2018-03-05 14:11:28.211895 INFO hello_world: You are now ready to run Apps!
2018-03-05 14:11:28.212560 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/._hello.py - ignoring

And my my log reads:

    [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... 
    -----------------------------------------------------------
     Hass.io Add-on: AppDaemon3 v0.1.0
     Python Apps and HADashboard using AppDaemon 3.x for Home Assistant
     From: Community Hass.io Add-ons
     By: Franck Nijhof <[email protected]>
    -----------------------------------------------------------
    [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] 02-updates.sh: executing... 
    INFO: You are running the latest version of this add-on
    [cont-init.d] 02-updates.sh: exited 0.
    [cont-init.d] 03-version-requirements.sh: executing... 
    INFO: Supervisor version requirements checks passed.
    [cont-init.d] 03-version-requirements.sh: exited 0.
    [cont-init.d] 20-init-configuration.sh: executing... 
    [cont-init.d] 20-init-configuration.sh: exited 0.
    [cont-init.d] 21-compiled-dir.sh: executing... 
    [cont-init.d] 21-compiled-dir.sh: exited 0.
    [cont-init.d] 50-compiled-symlink.sh: executing... 
    [cont-init.d] 50-compiled-symlink.sh: exited 0.
    [cont-init.d] 80-system-packages.sh: executing... 
    [cont-init.d] 80-system-packages.sh: exited 0.
    [cont-init.d] 81-python-packages.sh: executing... 
    [cont-init.d] 81-python-packages.sh: exited 0.
    [cont-init.d] done.
    [services.d] starting services
    starting version 3.2.4
    [services.d] done.

/Tonk.in

  1. api is disabled because you didnt provide the right config in your appdaemon.yaml for it.
    but you only need api if you want to communicate with appdaemon from the outside, for instance if you want alexa to reach appdaemon.
  2. appdaemon 3 works with a new system. an app has 2 parts a) the py script and b) a yaml file that goes with it. somehow you have a ._hello.py file that shouldnt be there. appdaemon sees the file but it doesnt do anything with it because there is no yaml file there to go with it.
  3. python creates cash files in that folder. for every pythonscript you run, there is always a cash file. just ignore those files and dirs.
2 Likes

Thanks Rene!!
That makes a lot of sense. I still loomking for the rouge file (_hello.py) - but I guess it must be in there somewhere :slight_smile:

/Tonk.in

that is the place where it is.
but it starts with a dot so its probably hidden.
depending on the program that you use to view the filelist you could find it.

Looks like I also get the same error message
(hassbian image)

pi@hassbian:~/conf $ appdaemon -c /home/pi/conf
2018-03-08 00:42:59.240382 INFO AppDaemon Version 3.0.0b5 starting
2018-03-08 00:42:59.241044 INFO Configuration read from: /home/pi/conf/appdaemon.yaml
Traceback (most recent call last):
File “/usr/local/bin/appdaemon”, line 11, in
sys.exit(main())
File “/usr/local/lib/python3.5/dist-packages/appdaemon/admain.py”, line 365, in main
admain.main()
File “/usr/local/lib/python3.5/dist-packages/appdaemon/admain.py”, line 361, in main
self.run(appdaemon, hadashboard)
File “/usr/local/lib/python3.5/dist-packages/appdaemon/admain.py”, line 60, in run
self.AD = ad.AppDaemon(self.logger, self.error, self.diag, loop, **appdaemon)
File “/usr/local/lib/python3.5/dist-packages/appdaemon/appdaemon.py”, line 100, in init
self.plugin_params = kwargs[“plugins”]
KeyError: ‘plugins’

Files and folders:

conf
  appdaemon.log
  appdaemonerror.log
  appdaemon.yaml
  apps.yaml
apps
  hellp.py
compiled
  css
  javascript
  html

appdaemon.yaml

HASS:
  ha_url: https://xxxxxx.duckdns.org:8123
  ha_key: xxxxxx 
appdaemon: 
  logfile: /home/pi/conf/appdaemon.log 
  errorfile: /home/pi/conf/appdaemonerror.log 
  threads: 10
  api_ssl_certificate: /etc/letsencrypt/live/xxxxxx.duckdns.org/fullchain.pem
  api_ssl_key: /etc/letsencrypt/live/xxxxxx.duckdns.org/privkey.pem
HADashboard: 
  dash_url:  https://xxxxxx.duckdns.org:5050

What am I doing wrong? :flushed:

if you look at the docs for installation you see that your appdaemon.yaml is wrong.
it should look like:

secrets: /some/path
log:
  accessfile: /export/hass/appdaemon_test/logs/access.log
  errorfile: /export/hass/appdaemon_test/logs/error.log
  logfile: /export/hass/appdaemon_test/logs/appdaemon.log
  log_generations: 3
  log_size: 1000000
appdaemon:
  threads: 10
  time_zone: <time zone>
  plugins:
    HASS:
      type: hass
      ha_url: <some_url>
      ha_key: <some key>
      cert_path: <path/to/root/CA/cert>
      cert_verify: True
      namespace: default
hadashboard:
  dash_url: http://192.168.1.20:5050

look for the right order, the right indention and the right capitals!
the docs are here:
http://appdaemon.readthedocs.io/en/latest/INSTALL.html

1 Like

Thank you Rene Tode :relaxed:
No errors after getting the appdaemon.yaml right and moved the apps.yaml to the apps folder :love_you_gesture:

This was the top search result when Googling “AppDaemon” “No app description”, so I’ll add my solution here.

In my case, “No app description” was trying to tell me I had a misconfiguration in the app.yaml file.

Specifically, I was had “.py” at the end of my module name.

I incorrectly had this:

hello_world2:
  module: hello2.py
  class: HelloWorld2

when I should have had this:

hello_world2:
  module: hello2
  class: HelloWorld2