AppDaemon doesn't connect to HA :(

Hi

Trying to install and setup AppDaemon on my Raspberry PI where I have already HA running. I have done the config but when I’m starting AppDaemon I get all the time an error of connection with HA:

root@home-assistant:/home/homeassistant/.homeassistant# appdaemon -c /home/homeassistant/.homeassistant/
2017-07-11 08:24:04.085515 INFO AppDaemon Version 2.0.3 starting
2017-07-11 08:24:04.086046 INFO Configuration read from: /home/homeassistant/.homeassistant/appdaemon.yaml
2017-07-11 08:24:04.381117 INFO Got initial state
2017-07-11 08:24:04.382013 INFO App initialization complete
2017-07-11 08:24:04.382605 INFO Dashboards are disabled
2017-07-11 08:24:04.478891 WARNING Disconnected from Home Assistant, retrying in 5 seconds
2017-07-11 08:24:09.496986 INFO Disconnecting from Home Assistant
2017-07-11 08:24:09.660805 INFO Got initial state
2017-07-11 08:24:09.661420 INFO App initialization complete
2017-07-11 08:24:09.756769 WARNING Disconnected from Home Assistant, retrying in 5 seconds

Here is the config file:

AppDaemon:
  logfile: STDOUT
  errorfile: STDERR
  threads: 10
  cert_verify: False
HASS:
  ha_url: https://192.168.1.8:8123
  ha_key: mywebpassforhahere
# Apps
hello_world:
  module: hello
  class: HelloWorld

Not sure what to investigate here…

Thanks

Vincèn

I have the same problem with my setup. Because I think this is a bug i just opened an Issue on Github: https://github.com/home-assistant/appdaemon/issues/81

At the moment I’m using this workaround: Start appdaemon with “–commtype=SSE”
This uses Server-Sent-Events instead of a websocket connection.

Best,
Matthias

If you are used my HTTPS you need to use the name no the IP address on your HASS URL. You can get more info about what is going wrong by running with -D DEBUG

@aimc I understand the logic to ask for fqdn instead of IP for SSL connection but how to do you handle local connection in your LAN ?? My SSL certificate is on my public FQDN but for sure it can’t check on local as I access my HA with local IP adress !! All the more I putted the parameter to avoid SSL check but it’s stil doing it (I see it in debug messages !). So it looks like AppDaemon is unusable on local network with SSL (if like me your ISP router is so bad that it’s not doing local loop :frowning:

This isn’t my choice, it is enforced by the SSL standard. For this reason I don’t use SSL for HASS, I use regular HTTP with an NGINX proxy to handle the SSL piece, that way local devices like HADashboard can connect over HTTP.

One workaround is to set up a DNS server or edit your hosts file to resolve to the IP address.

Once again, this isn’t my doing, it’s the way SSL works!

1 Like