AppDaemon run on docker - keep disconnecting

breaking my head with configuring AppDaemon

Details
on a docker (QNAP NAS with 2 network card ).
HA (lovelace ) installed on a docker configured with SSL ,

Accessing HA internally with
https://192.168.1.112:8123

log:
  logfile: /conf/appdaemon.log
  errorfile: /conf/aderror.log
  accessfile: /conf/access.log
appdaemon:
  threads: 10
  app_dir: /conf/apps
  plugins:
    HASS:
      type: hass
      ha_url: https://192.168.1.112:8123
      token: <LONGLIVE_TOKEN_CREATED_VIA_UI>
hadashboard:
  dash_url: http://192.168.1.113:5050
  dash_dir: /conf/dashboards

Starting the AppDaemon and DashBoard page is accessible from
http://192.168.1.113:5050/

error.log
``
2019-07-23 12:04:17.402288 INFO AppDaemon Version 3.0.5 starting
2019-07-23 12:04:17.402762 INFO Configuration read from: /conf/appdaemon.yaml
2019-07-23 12:04:17.405201 INFO AppDaemon: Starting Apps
2019-07-23 12:04:17.409620 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2019-07-23 12:04:17.527898 INFO AppDaemon: HASS: HASS Plugin Initializing
2019-07-23 12:04:17.528572 INFO AppDaemon: HASS: HASS Plugin initialization complete
2019-07-23 12:04:17.529068 INFO Starting Dashboards
2019-07-23 12:04:17.539981 INFO API is disabled
2019-07-23 12:04:17.549628 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds


After few minutes it's running 
``
 INFO SIGTERM Recieved
INFO AppDaemon: HASS: Disconnecting from Home Assistant
INFO AppDeamon Exited

any suggestions?

I found the cause and it’s related to SSL enabled on HA ,
I disable the SSL .
configure the appdaemon.yaml as below :

log:
  logfile: /conf/appdaemon.log
  errorfile: /conf/aderror.log
  accessfile: /conf/access.log
appdaemon:
  threads: 10
  app_dir: /conf/apps
  plugins:
    HASS:
      type: hass
      ha_url: http://192.168.1.112:8123
      token: '<LONG_LIVE_TOKEN>'
hadashboard:
  dash_url: http://192.168.1.113:5050
  dash_dir: /conf/dashboards

And it’s connected:

2019-07-24 20:01:35.896517 INFO AppDaemon Version 3.0.5 starting
2019-07-24 20:01:35.897029 INFO Configuration read from: /conf/appdaemon.yaml
2019-07-24 20:01:35.900028 INFO AppDaemon: Starting Apps
2019-07-24 20:01:35.912515 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from modul
e hassplugin
2019-07-24 20:01:36.223099 INFO AppDaemon: HASS: HASS Plugin Initializing
2019-07-24 20:01:36.224876 INFO AppDaemon: HASS: HASS Plugin initialization complete
2019-07-24 20:01:36.225501 INFO Starting Dashboards
2019-07-24 20:01:36.277828 INFO API is disabled
2019-07-24 20:01:36.310174 INFO AppDaemon: HASS: Connected to Home Assistant 0.95.4
2019-07-24 20:01:36.397424 INFO AppDaemon: Got initial state from namespace default
2019-07-24 20:01:38.363214 INFO AppDaemon: Reading config
2019-07-24 20:01:38.366723 INFO AppDaemon: /conf/apps/apps.yaml added or modified
2019-07-24 20:01:38.367095 INFO AppDaemon: /conf/apps/apps.yaml added or modified
2019-07-24 20:01:38.367372 INFO AppDaemon: App 'hello_world' added
2019-07-24 20:01:38.367780 INFO AppDaemon: Adding /conf/apps to module import path
2019-07-24 20:01:38.368451 INFO AppDaemon: Loading App Module: /conf/apps/hello.py
2019-07-24 20:01:38.395926 INFO AppDaemon: Initializing app hello_world using class HelloWorld f
rom module hello
2019-07-24 20:01:38.555987 INFO hello_world: Hello from AppDaemon
2019-07-24 20:01:38.558146 INFO hello_world: You are now ready to run Apps!
2019-07-24 20:01:38.559216 INFO AppDaemon: App initialization complete

Can some1 please advise if they manage to it when HA with SSL?
Can please share how the appdaemon.yaml should configured in this case?

Getting the same error you did! It sounds like you have found a solution! Every other add on seems to work except this one! I have followed at least 10 different guides and opinions on how to set this up! So far this error is as close as I have gotten to making it work. Not being a computer science expert I am forced to rely on those who know more than me! Would you mind telling me how you disabled the SSL? And by doing that what impact does it have on the system? Thanks for your help!

Hi Mark ,

Happy you found this thread , hopefully it could help others as well,
Yes…it took me a lot of time to overcome this ,
and it was not easy.

First , Can some1 tell if appdaemon still not support SSL?
Case not ,first the problem is appdaemon access HA internally and not supported accessing ha over 443 so no SSL …

Solution:
1.Disable SSL (bad idea)
2. Reverse proxy - this actually is a must even if not using with appdaemon ,what it does is a proxy server which let you access HA internally without need for ssl (appdaemon :wink:) and will let you access HA over ssl from outside .

My setup is based on qnap NAS and all installed manually with dockers ,
so the only option i manage to setup the reverse proxy is with Traefik (which is really great and stable + renew the SSL automatically ).
I know there’s some easier solution (I think nginx for hassio users) but i’m not familiar with it…so first, check/research for reverse proxy which suitable ur setup.
Hope it helps…