At some point today, âHTTP 500 Internal server errorâ started appearing in my logs (like every 30 minutes?). I restarted Home Assistant (2021.12.0) and now the entire integration failed to setup.
The ViCare app seems to work fine though. Does anybody have similar problems?
Edit: See below.
2021-12-12 21:54:25 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ViCare for vicare
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/vicare/__init__.py", line 98, in async_setup_entry
await hass.async_add_executor_job(setup_vicare_api, hass, entry)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/__init__.py", line 134, in setup_vicare_api
hass.data[DOMAIN][entry.entry_id][VICARE_CIRCUITS] = hass.data[DOMAIN][
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 36, in circuits
return list([self.getCircuit(x) for x in self.getAvailableCircuits()])
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 45, in feature_flag_wrapper
return wrapper(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 38, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 265, in getAvailableCircuits
return self.service.getProperty("heating.circuits")["properties"]["enabled"]["value"]
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
data = self.__get_or_update_cache()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 36, in __get_or_update_cache
data = self.fetch_all_features()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 56, in fetch_all_features
return self.oauth_manager.get(url)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 41, in get
self.__handle_server_error(response)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 60, in __handle_server_error
raise PyViCareInternalServerError(response)
PyViCare.PyViCareUtils.PyViCareInternalServerError: (PyViCareInternalServerError(...), 'Request failed with status code 500 and message "Internal server error". ViCare ErrorId: req-censored')
Edit: Seems to work after another restart now?
Edit 2:
Now getting this for the circulation pumps:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update
raise exc
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/binary_sensor.py", line 196, in update
self._state = self.entity_description.value_getter(self._api)
File "/usr/src/homeassistant/homeassistant/components/vicare/binary_sensor.py", line 44, in <lambda>
value_getter=lambda api: api.getCirculationPumpActive(),
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 45, in feature_flag_wrapper
return wrapper(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 38, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 455, in getCirculationPumpActive
status = self.service.getProperty(f"heating.circuits.{self.circuit}.circulation.pump")[
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
data = self.__get_or_update_cache()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 36, in __get_or_update_cache
data = self.fetch_all_features()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 56, in fetch_all_features
return self.oauth_manager.get(url)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 41, in get
self.__handle_server_error(response)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 60, in __handle_server_error
raise PyViCareInternalServerError(response)
PyViCare.PyViCareUtils.PyViCareInternalServerError: (PyViCareInternalServerError(...), 'Request failed with status code 500 and message "Internal server error". ViCare ErrorId: req-censored')