Hello.py not working

I just installed AppDaemon 2.1.12 and I cannot seem to get hello.py to load. I followed the Installation doc for pip3 (running on Ubuntu 17.10) and I do not see any error so I am not sure where to go from here.

Log:

2018-01-17 20:35:18.779552 INFO AppDaemon Version 2.1.12 starting
2018-01-17 20:35:18.779769 INFO Configuration read from: /home/kevin/homeassist$
2018-01-17 20:35:18.809803 INFO Starting Apps
2018-01-17 20:35:18.893136 INFO Got initial state
2018-01-17 20:35:18.893538 INFO App initialization complete
2018-01-17 20:35:18.893765 INFO Dashboards are disabled
2018-01-17 20:35:18.893903 INFO Starting API
2018-01-17 20:35:18.898768 INFO Connected to Home Assistant 0.60.1

apps.yaml:

hello_world:
  class: HelloWorld
  module: hello

hello.py:

import appdaemon.appapi as appapi

#
# Hello World App
#
# Args:
#


class HelloWorld(appapi.AppDaemon):

    def initialize(self):
        self.log("Hello from AppDaemon")
        self.log("You are now ready to run Apps!")

appdaemon.yaml:

AppDaemon:
  logfile: /home/kevin/homeassistant/conf/logs/appdaemon.log
  errorfile: /home/kevin/homeassistant/conf/logs/error.log
  logsize: 100000
  log_generations: 3
  threads: 10
  cert_path: /etc/letsencrypt/live/example.com/fullchain.pem
  cert_verify: True
  time_zone: <time zone>
  api_port: 4646
  api_key: !secret appdaemon_api_key
  api_ssl_certificate: /etc/letsencrypt/live/example.com/fullchain.$
  api_ssl_key: /etc/letsencrypt/live/example.com/privkey.pem
HASS:
  ha_url: http://localhost:8123
  ha_key: !secret http_password

Any help would be appreciated

Did you follow the v2 instructoins? According to this post the current instructions are for v3

ReneTode
2d

the problem is that the docs that are pointed to (latest) are now for the beta 3.0 version from appdaemon.
you need to use the docs from 2.1.12
http://appdaemon.readthedocs.io/en/2.1.12/index.html11

I did see that post and initially I was using the v3 docs. My appdaemon.yaml and hello.py above should match the 2.1.12 docs.

Do you see any errors in the logs?

No errors in the logs. The appdaemon.log contents are above, nothing in error.log

Looks like hello.py isn’t in the right place, also apps.yaml doesn’t seem to be picked up - where did you put them, and what command line are you using to run appdaemon?

Both hello.py and apps.yaml are in /home/kevin/homeassistant/conf

I have used both:

appdaemon -c /home/kevin/homeassistant/conf

And

sudo systemctl start [email protected]

I checked the logs again when I got home after restarting appdaemon and now it shows:

2018-01-17 20:35:18.779552 INFO AppDaemon Version 2.1.12 starting
2018-01-17 20:35:18.779769 INFO Configuration read from: /home/kevin/homeassistant/conf/appdaemon.yaml
2018-01-17 20:35:18.809803 INFO Starting Apps
2018-01-17 20:35:18.893136 INFO Got initial state
2018-01-17 20:35:18.893538 INFO App initialization complete
2018-01-17 20:35:18.893765 INFO Dashboards are disabled
2018-01-17 20:35:18.893903 INFO Starting API
2018-01-17 20:35:18.898768 INFO Connected to Home Assistant 0.60.1
2018-01-18 02:25:54.438014 WARNING Excessive time spent in scheduler loop: 1436.0ms
2018-01-18 02:25:55.277179 WARNING Scheduler clock skew detected - delta = 1.2771539688110352 - resetting
2018-01-18 19:03:24.167178 INFO AppDaemon Version 2.1.12 starting
2018-01-18 19:03:24.167563 INFO Configuration read from: /home/kevin/homeassistant/conf/appdaemon.yaml
2018-01-18 19:03:24.354754 INFO Starting Apps
2018-01-18 19:03:24.377587 INFO Got initial state
2018-01-18 19:03:24.377945 INFO App initialization complete
2018-01-18 19:03:24.378140 INFO Dashboards are disabled
2018-01-18 19:03:24.378262 INFO Starting API
2018-01-18 19:03:24.456286 INFO Connected to Home Assistant 0.60.1

Do the warnings give any indication as to the problem?

The clock skew warnings are OK to ignore on startup - for thaty version of appdameon, apps.yaml beliongs in /home/kevin/homeassistant/conf but hello.py belongs in a subdirectory called apps under conf.

From the docs:

To add an initial test app to match the configuration above, we need to first create an apps subdirectory under the conf directory. Then create a file in the apps directory called hello.py

1 Like

That is some egg on my face.

Working now. Thank you for pointing that out!

Now on to building some apps

1 Like