Right i have changed the logfile and have access if I run via sudo appdaemon -c /home/homeassistant/conf
Nothing happens and I stop it by the keyboard i.e. CTRL + C
My appdaemon.log file shows the following:
2018-02-06 11:52:12.117013 INFO AppDaemon Version 2.1.12 starting
2018-02-06 11:52:12.118363 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2018-02-06 11:52:12.394307 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:52:17.583656 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:52:22.896318 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:52:28.227394 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:52:33.533472 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:52:38.837380 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:52:39.595325 INFO Keyboard interrupt
2018-02-06 11:54:08.743454 INFO AppDaemon Version 2.1.12 starting
2018-02-06 11:54:08.744819 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2018-02-06 11:54:09.043367 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:54:14.312785 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:54:19.592619 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:54:24.717934 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:54:29.992351 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:54:35.285032 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-06 11:54:40.425090 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
My error log file doesnt contain anything.
However when I hit CTRL + C, i get the following errors:
^CTraceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/usr/local/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/local/lib/python3.6/ssl.py", line 814, in __init__
self.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='XXXX.duckdns.org', port=443): Max retries exceeded with url: /api/config (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/appdaemon/admain.py", line 422, in main
ha_config = utils.get_ha_config()
File "/usr/local/lib/python3.6/site-packages/appdaemon/utils.py", line 347, in get_ha_config
r = requests.get(apiurl, headers=headers, verify=conf.certpath)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='XXXX.duckdns.org', port=443): Max retries exceeded with url: /api/config (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/appdaemon", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/appdaemon/admain.py", line 432, in main
time.sleep(5)
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 122, in handle_sig
stopit()
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 108, in stopit
conf.appq.put_nowait({"event_type": "ha_stop", "data": None})
AttributeError: 'NoneType' object has no attribute 'put_nowait'