No Hello World

When starting appdaemon with appdaemon -c conf/appdaemon.cfg
I get:

2017-02-19 10:29:01.414394 INFO AppDaemon Version 1.5.2 starting
2017-02-19 10:29:11.645541 INFO Got initial state
2017-02-19 10:29:11.646237 INFO App initialization complete
2017-02-19 10:29:11.658719 INFO Connected to Home Assistant 0.38.3

and it stops there. No info about modules loaded or Hello World. Not sure what I’ve done wrong.

What does your appdaemon.cfg file look like?

try specifying the complete path not a relative path to the config file.

[AppDaemon]
ha_url = http://localhost:8123
ha_key = 
logfile = STDOUT
errorfile = STDERR
app_dir = 
threads = 10

# Apps
[hello_world]
module = hello
class = HelloWorld

I tried specifying the app directory to a sub directory called “apps” within /.homeassistant and got the same result

That did it.

2017-02-19 15:55:27.609104 INFO AppDaemon Version 1.5.2 starting
2017-02-19 15:55:37.807433 INFO Got initial state
2017-02-19 15:55:37.809734 INFO Loading Module: /home/homeassistant/.homeassistant/apps/hello.py
2017-02-19 15:55:37.822370 INFO Loading Object hello_world using class HelloWorld from module hello
2017-02-19 15:55:37.939309 INFO hello_world: Hello from AppDaemon
2017-02-19 15:55:37.941800 INFO hello_world: You are now ready to run Apps!
2017-02-19 15:55:37.942171 INFO App initialization complete
2017-02-19 15:55:37.954220 INFO Connected to Home Assistant 0.38.3

Thanks!

Having the same problem. What exactly did you do to solve it? Thanks.

what he did wouldnt solve your problem, because appdaemon has changed to much in the last 7 months.

so you get no hello world?

what is your appdaemon version?
what is in your logfiles?
what is in your appdaemon.yaml?
what is in your apps.yaml?

Thanks for you reply. Here is my log:

2017-09-28 08:21:13.652918 INFO AppDaemon Version 2.0.8 starting
2017-09-28 08:21:13.653679 INFO Configuration read from: /config/hadaemon/appdaemon.yaml
2017-09-28 08:21:13.958791 INFO Got initial state
2017-09-28 08:21:13.960564 INFO Loading Module: /config/hadaemon/apps/hello.py
2017-09-28 08:21:13.962658 INFO App initialization complete
2017-09-28 08:21:13.963632 INFO Dashboards are disabled
2017-09-28 08:21:13.978778 INFO Connected to Home Assistant 0.54.0

Error log is empty.

apps.yam:
hello_world:
module: hello
class: HelloWorld

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:
cert_verify: False
disable_apps: 1
logfile: /config/hadaemon/hadaemon.log
errorfile: /config/hadaemon/hadaemonerr.log
threads: 10
app_dir: /config/hadaemon/apps
HASS:
ha_url: http://192.168.1.130:8123

Thanks so much for your help. I was expecting the hello message to show up in the log file but maybe it’s somewhere else?

you use appdaemon version 2.0.8 and if i am correct in that version the appdaemon.yaml and apps.yaml were still 1 file.

so you have 2 choices:

  1. update appdaemon (sudo pip3 install --upgrade appdaemon)
  2. put what is in your apps.yaml inside your appdaemon.yaml

Thanks so much! The second option worked.

I just installed Appdaemon using Hass.io so I am surprised it is not the latest version.

I tried the first option by logging into my pi using Putty with user “root” but it doesn’t recognize the command.
It gives me:
core-ssh:/# sudo pip3 install --upgrade appdaemon
-ash: sudo: not found

I would like to update. What am I doing wrong?

no idea.
sudo should work in my opinion, but you also could try it without sudo if you are root user

pip3 install --upgrade appdaemon

Tried that. Same result:
core-ssh:/# pip3 install --upgrade appdaemon
-ash: pip3: not found

But thanks again for your help. At least I can get started now. I never would have figured that out in a million years.

The version thing is quite confusing. On the Hass.io page for AppDaemon under “Info” it says “version 0.0.13”. At the bottom of the page under “Logs” it says “starting version 3.2.2”. And in the log file it says “INFO AppDaemon Version 2.0.8 starting”

Anyway, thanks again for your help.

i can only guess that sudo and pip are shutdown because of hassio.
its hassio what makes things confusing for people.
i never used it and i get confused by it :wink:

You can’t use ssh in hass.io to install or upgrade anything as it is only a limited cli intended to be used for a few commands. Typing “hassio help” will show you these. You can’t update the addon because it is running in a container (as are all addons) and ha is running in its own container on top of ResinOS. They work in a modular sense together to create your home assistant as a whole. It is a bit different than the usual installation of HA.

If you are knowledgeable about the OS and docker containers, you can SSH in following these instructions:
https://home-assistant.io/developers/hassio/debugging/ but unless you’re developing your own addon there is no real benefit as any changes you make will not survive the next update/reboot.

The appdaemon addon needs to be updated or you can create your own and manually install it. I’m still trying to figure out how to do that myself.

1 Like

Thanks for the info. Very helpful.