Hi,
first of all I want to thank roschi for this great project!
Nice to see that you want to push it to the next level allowing schedules for more home assistant components!
Sadly, I discovered heaty only a week ago and since than I still haven’t figured out how to solve the errors I run into on my home assistant server.
Hopefully someone can help me solve these errors so that I can finally use heaty.
My home assistant is based on hassbian running on a raspberry pi 3. The TLS certificate used for home assistant is signed by my own ca. The self-signed root certificate of the ca is imported to the system’s ca-certificates.
I installed appdaemon using hassbian-scripts and hass-apps into the same virtual environment as appdaemon.
First I ran into the same problem described here, but after removing the entry from my config the errors described below showed up.
HADashboard is working so I don’t think appdaemon itself is the problem. Also adding the line
cert_verify: False
to my appdaemon.yaml does not change anything.
These are my configuration and log files:
appdeamon.yaml:
secrets: /home/homeassistant/.homeassistant/secrets.yaml
log:
accessfile: /home/homeassistant/appdaemon/logs/access.log
errorfile: /home/homeassistant/appdaemon/logs/error.log
logfile: /home/homeassistant/appdaemon/logs/appdaemon.log
log_generations: 3
log_size: 1000000
appdaemon:
threads: 10
plugins:
HASS:
type: hass
ha_url: 'https://192.168.1.2:8123'
ha_key: !secret http_password
cert_path: '/etc/ssl/certs/ca-certificates.crt'
#cert_verify: False
hadashboard:
dash_url: http://192.168.1.2:5050
dash_ssl_certificate: !secret ssl_certificate
dash_ssl_key: !secret ssl_key
dash_password: !secret dash_password
apps.yaml:
heaty_full:
module: hass_apps_loader
class: HeatyApp
thermostat_defaults:
# These two settings can be used to tweak the names of the
# operation modes.
# (default: heat)
opmode_heat: manual
# (default: "off")
opmode_off: "away"
window_sensor_defaults:
schedule_prepend:
schedule_append:
schedule_snippets:
rooms:
wohnzimmer:
thermostats:
climate.wohnzimmer_thermostat:
schedule:
- { temp: 22, start: "08:00", end: "22:00", weekdays: "1,2,3,4,5,6,7" }
- { temp: 16 }
log:
2018-10-03 14:17:18.909181 INFO AppDaemon Version 3.0.1 starting
2018-10-03 14:17:18.929449 INFO Configuration read from: /home/homeassistant/appdaemon/appdaemon.yaml
2018-10-03 14:17:18.935559 INFO AppDaemon: Starting Apps
2018-10-03 14:17:18.937332 WARNING config_dir: /home exists, but is not writeable, owner: root
2018-10-03 14:17:18.945983 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-10-03 14:17:19.024541 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-10-03 14:17:19.025841 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-10-03 14:17:19.026842 INFO Starting Dashboards
2018-10-03 14:17:19.075131 INFO API is disabled
2018-10-03 14:17:19.499291 INFO AppDaemon: HASS: Connected to Home Assistant 0.78.3
2018-10-03 14:17:19.785281 INFO AppDaemon: Got initial state from namespace default
2018-10-03 14:17:21.684713 INFO AppDaemon: Reading config
2018-10-03 14:17:21.731799 INFO AppDaemon: /home/homeassistant/appdaemon/apps/apps.yaml added or modified
2018-10-03 14:17:21.732824 INFO AppDaemon: /home/homeassistant/appdaemon/apps/apps.yaml added or modified
2018-10-03 14:17:21.733970 INFO AppDaemon: App 'heaty_full' added
2018-10-03 14:17:21.735070 INFO AppDaemon: Adding /home/homeassistant/appdaemon/apps to module import path
2018-10-03 14:17:21.736724 INFO AppDaemon: Loading App Module: /home/homeassistant/appdaemon/apps/hass_apps_loader.py
2018-10-03 14:17:21.754195 INFO AppDaemon: Initializing app heaty_full using class HeatyApp from module hass_apps_loader
2018-10-03 14:17:22.323078 INFO heaty_full: *** Welcome to heaty (version 0.16.0)!
2018-10-03 14:17:22.328689 INFO heaty_full: ***
2018-10-03 14:17:22.333095 INFO heaty_full: *** This is an app from the hass-apps package.
2018-10-03 14:17:22.337253 INFO heaty_full: *** DOCS: https://hass-apps.readthedocs.io/en/stable/
2018-10-03 14:17:22.341628 INFO heaty_full: ***
2018-10-03 14:17:22.345913 INFO heaty_full: *** If you like this app and want to honor the effort put into it,
2018-10-03 14:17:22.350088 INFO heaty_full: *** please consider a donation.
2018-10-03 14:17:22.354579 INFO heaty_full: *** DONATE: https://hass-apps.readthedocs.io/en/stable/#donations
2018-10-03 14:17:22.358928 INFO heaty_full: *** Thank you very much and enjoy heaty!
2018-10-03 14:17:22.363138 INFO heaty_full: ***
2018-10-03 14:17:22.377796 INFO heaty_full: --- Heaty id is: 'default'
2018-10-03 14:17:22.412057 ERROR heaty_full: !!! [R:wohnzimmer] [T:climate.wohnzimmer_thermostat] Unknown operation mode, ignoring thermostat.
2018-10-03 14:17:22.771094 INFO AppDaemon: App initialization complete
errorlog:
2018-10-03 14:17:22.741032 WARNING AppDaemon: ------------------------------------------------------------
2018-10-03 14:17:22.742376 WARNING AppDaemon: Unexpected error running initialize() for heaty_full
2018-10-03 14:17:22.743074 WARNING AppDaemon: ------------------------------------------------------------
2018-10-03 14:17:22.758274 WARNING AppDaemon: Traceback (most recent call last):
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/connection.py", line 356, in connect
ssl_context=context)
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 372, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/lib/python3.5/ssl.py", line 385, in wrap_socket
_context=self)
File "/usr/lib/python3.5/ssl.py", line 760, in __init__
self.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/appdaemon/lib/python3.5/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/appdaemon/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.2', port=8123): Max retries exceeded with url: /api/services/climate/set_operation_mode (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/appdaemon.py", line 1575, in init_object
init()
File "/srv/appdaemon/lib/python3.5/site-packages/hass_apps/common.py", line 91, in initialize
self.initialize_inner()
File "/srv/appdaemon/lib/python3.5/site-packages/hass_apps/heaty/app.py", line 93, in initialize_inner
room.apply_schedule()
File "/srv/appdaemon/lib/python3.5/site-packages/hass_apps/heaty/room.py", line 320, in apply_schedule
self.set_temp(temp, scheduled=True, force_resend=force_resend)
File "/srv/appdaemon/lib/python3.5/site-packages/hass_apps/heaty/room.py", line 118, in set_temp
result = therm.set_temp(target_temp, force_resend=force_resend)
File "/srv/appdaemon/lib/python3.5/site-packages/hass_apps/heaty/thermostat.py", line 309, in set_temp
"temp": temp,
File "/srv/appdaemon/lib/python3.5/site-packages/hass_apps/heaty/thermostat.py", line 342, in _set_temp_resend_cb
self.app.call_service(opmode_service, **attrs)
File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/plugins/hass/hassapi.py", line 22, in func_wrapper
return func(*args, **kwargs)
File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/plugins/hass/hassapi.py", line 455, in call_service
apiurl, headers=headers, json=kwargs, verify=certpath
File "/srv/appdaemon/lib/python3.5/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/srv/appdaemon/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/srv/appdaemon/lib/python3.5/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/srv/appdaemon/lib/python3.5/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/srv/appdaemon/lib/python3.5/site-packages/requests/adapters.py", line 511, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.2', port=8123): Max retries exceeded with url: /api/services/climate/set_operation_mode (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)'),))
2018-10-03 14:17:22.759554 WARNING AppDaemon: ------------------------------------------------------------
Every help is appreciated! Thank you!