Please help, trying to set up AppDaemon and I havent got a clue

hi all,

ok I just found out about AppDaemon after searching for a light controller and finding it in HACS but now I need to set up the add-on and I’m totally lost…

so far I have:

gone into Hass.io add-on store and installed the AppDaemon “app”
set the token and saved it to a secrets.yaml file
got lost…
tried to follow the instructions
got more lost
re-tried to follow the instructions…
got so far lost I think i’m the only peron here…

please help… if i understand it corectly in order to use an AppDaemon program I need to set it up in the AppDaemon.yaml file but I’ve no idea how to do that…

here is what I have,

appdaemon:
  plugins:
    HASS:
      type: hass
      ha_url: !secrets ha_url
      token: !secrets token

but if I click the “open UI” button I get an error

what am I not doing? or doing wrong?

Yeah, no
All I did was install the addon
config stays as default
start the addon, check logs no erros
the appsdaemon.yaml setup is automatically created
this is my appsdaemon.yaml file

secrets: /config/secrets.yaml
log:
  logfile: STDOUT
  errorfile: STDERR
appdaemon:
  threads: 10
  app_dir: /config/appdaemon/apps
  plugins:
    HASS:
      type: hass
      ha_url: http://hassio/homeassistant
      token: 1234567890abcdefghijklomnop what ever
hadashboard:
  dash_url: http://127.0.0.1:5050
  dash_dir: /config/appdaemon/dashboards

if you open web ui you should see the hello app
you know its working
install the app you want from hacs
it will install it in the apps folder
then all you need to do is add the configuration for that addon in the config/appdaemon/apps.yaml file
change it to suit you and save.

Installation

NEEDS THE Alexa Media Player HACS Integration from Keaton Taylor and Alan Tse

Use HACS or download the alexa_talking_clock directory from inside the apps directory here to your local apps directory, then add the configuration to enable the alexa_talking_clock module.

App Configuration (config/appdaemon/apps/apps.yaml)

alexa_talking_clock:
  module: alexa_talking_clock
  class: AlexaTalkingClock
  alexa: media_player.kitchen_alexa
  start_hour: 7
  start_minute: 0
  end_hour: 21
  end_minute: 0
  announce_hour: true
  announce_half_hour: true
  announce_quarter_hour: false

my apps.yaml

hello_world:
  module: hello
  class: HelloWorld


alexa_off_talking_clock:
  module: alexa_talking_clock
  class: AlexaTalkingClock
  alexa: media_player.office_echo_plus
  start_hour: 8
  start_minute: 0
  end_hour: 21
  end_minute: 0
  announce_hour: true
  announce_half_hour: false
  announce_quarter_hour: false
2 Likes

Which version did you install?

Just for your information, my app for the Hue Dimmer that you want to use is still for version 3 (as version 4 has only be officially released 1 or 2 days ago). I’m currently adjusting it for version 4, but I will not release it yet, due to most users probably still using version 3. I suggest installing version 4 directly, because sooner or later you need to use version 4 anyway. Just tell me which version you end up installing so I can provide you with the correct app to test.

And I was so sure he was talking about the AutoMoLi app :grin:

1 Like

Ok… here is where I am just now…

I was trying to install v3 (only due to not seeing v4 right beside it…) so uninstalled V3 and installed V4 all loaded… pressed “start”… all looks good… then I press on “web IU” and get the following error…

This site can’t be reached

192.168.0.38 took too long to respond.

ERR_CONNECTION_REFUSED

in the logs i have :-

20:59:30] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[20:59:35] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[20:59:37] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[20:59:42] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[20:59:47] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[20:59:51] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[20:59:56] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[21:00:01] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[21:00:06] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[21:00:11] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[21:00:16] INFO: Starting AppDaemon...
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 384, in main
    admain.main()
  File "/usr/lib/python3.8/site-packages/appdaemon/__main__.py", line 216, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable
[21:00:20] INFO: Starting AppDaemon...

Ive not touched the config…

any ideas of what I’ve done wrong? or just not done?

You need to follow Frenck guide to upgrading from 3.x
And edit the appdaemon.yaml

1 Like

thanks Harry, I thought I had but I’ll go over it and try again :smile:

Can you post your appdaemon.yaml file?

1 Like

Sure,

the error has now changed to

This site can’t be reached

myloginaddress.nabu.casa took too long to respond.

ERR_CONNECTION_TIMED_OUT

my appdaemon.yaml consists off

secrets: /config/secrets.yaml
appdaemon:
  latitude: mylat
  longitude: mylong
  elevation: 139
  time_zone: Europe/London
  plugins:
    HASS:
      type: hass
http:
  url: http://127.0.0.1:5050
hadashboard:
admin:
api:

the log now shows this (after a restart)

[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: AppDaemon 4
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.1.1
 You are running the latest version of this add-on.
 System: HassOS 2.12  (armv7 / raspberrypi3)
 Home Assistant version: 0.103.6
 Supervisor version: 195
-----------------------------------------------------------
 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... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] appdaemon.sh: executing... 
[cont-init.d] appdaemon.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:45:05] INFO: Starting AppDaemon...
2020-01-15 21:45:10.415975 INFO AppDaemon: AppDaemon Version 4.0.0 starting
2020-01-15 21:45:10.416888 INFO AppDaemon: Python version is 3.8.1
2020-01-15 21:45:10.417757 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2020-01-15 21:45:10.418724 INFO AppDaemon: Added log: AppDaemon
2020-01-15 21:45:10.419637 INFO AppDaemon: Added log: Error
2020-01-15 21:45:10.420447 INFO AppDaemon: Added log: Access
2020-01-15 21:45:10.421261 INFO AppDaemon: Added log: Diag
2020-01-15 21:45:10.486088 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2020-01-15 21:45:10.578625 INFO HASS: HASS Plugin Initializing
2020-01-15 21:45:10.579650 INFO HASS: HASS Plugin initialization complete
2020-01-15 21:45:10.581606 INFO AppDaemon: Initializing HTTP
2020-01-15 21:45:10.583321 INFO AppDaemon: Using 'ws' for event stream
2020-01-15 21:45:10.623637 INFO AppDaemon: Starting API
2020-01-15 21:45:10.641275 INFO AppDaemon: Starting Admin Interface
2020-01-15 21:45:10.642985 INFO AppDaemon: Starting Dashboards
2020-01-15 21:45:10.681164 INFO HASS: Connected to Home Assistant 0.103.6
2020-01-15 21:45:10.692755 INFO AppDaemon: Starting Apps with 0 workers and 0 pins
2020-01-15 21:45:10.696071 INFO AppDaemon: Running on port 5050
2020-01-15 21:45:10.784216 INFO HASS: Evaluating startup conditions
2020-01-15 21:45:10.857980 INFO AppDaemon: Got initial state from namespace default
2020-01-15 21:45:12.711408 INFO AppDaemon: Scheduler running in realtime
2020-01-15 21:45:12.724269 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2020-01-15 21:45:12.725789 INFO AppDaemon: Adding /config/appdaemon/apps/hue_dimmer_switch_deconz to module import path
2020-01-15 21:45:12.731600 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hue_dimmer_switch_deconz/hue_dimmer_switch_deconz.py - ignoring
2020-01-15 21:45:12.734748 INFO AppDaemon: App initialization complete

You can’t open the Appdaemon page through Nabu Casa as far as I know, only locally or through a reverse proxy. The log looks fine, seems like appdaemon is up and running.

1 Like

Ahhh… Thank you… just logged in via local IP and yip all working great… now to test the switch :smile:

Thank you all for your help and time

1 Like