Also, HA takes a long time to restart, guessing the component is timing out, and holding up the restart ?
2020-02-09 14:29:22 ERROR (MainThread) [homeassistant.setup] Error during setup of component vicare
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 164, in __get
r=self.oauth.get(url).json()
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 478, in request
url, http_method=method, body=data, headers=headers
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 300, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f41d916ef90>: Failed to establish a new connection: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='iam.viessmann.com', port=443): Max retries exceeded with url: /idp/v1/authorize?response_type=code&client_id=79742319e39245de5f91d15ff4cac2a8&redirect_uri=vicare%3A%2F%2Foauth-callback%2Feverest&scope=openid&state=F2nWSPQ2AHUjccGv5ADWGzAeM8niYx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f41d916ef90>: Failed to establish a new connection: [Errno 110] Operation timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/__init__.py", line 66, in setup
vicare_api = GazBoiler(conf[CONF_USERNAME], conf[CONF_PASSWORD], **params)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareDevice.py", line 40, in __init__
self.service = ViCareService(username, password, token_file, circuit)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 62, in __init__
self._getInstallations()
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 218, in _getInstallations
self.installations = self.__get(apiURLBase+"/general-management/installations?expanded=true&")
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 172, in __get
self.renewToken()
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 145, in renewToken
self.oauth=self.__getNewToken(self.username,self.password,self.token_file)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 120, in __getNewToken
response = requests.post(authorization_url, headers=header,auth=(username,password))
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='iam.viessmann.com', port=443): Max retries exceeded with url: /idp/v1/authorize?response_type=code&client_id=79742319e39245de5f91d15ff4cac2a8&redirect_uri=vicare%3A%2F%2Foauth-callback%2Feverest&scope=openid&state=F2nWSPQ2AHUjccGv5ADWGzAeM8niYx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f41d916ef90>: Failed to establish a new connection: [Errno 110] Operation timed out'))
2020-02-09 14:29:22 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform vicare.water_heater: Unable to set up component.
2020-02-09 14:29:22 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.vicare_heatcurve_target_temperature fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/template/sensor.py", line 224, in async_update
self._state = self._template.async_render()
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 221, in async_render
return compiled.render(kwargs).strip()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'