oischinger / ha_vicare

Inofficial Home Assistant custom component for Viessmann ViCare API
61 stars 33 forks source link

Error setting up entry ViCare for vicare (Source: custom_components/vicare/__init__.py:55) #99

Closed DarkTempIar closed 1 year ago

DarkTempIar commented 2 years ago

From one day to another (no updates, no changes whatosever on my end) I'm getting this error. I was not able to fix it.

I'm running: Home Assistant Core 2022.6.7 Home Assistant Supervisor 2022.07.0 Home Assistant OS 8.2

Error:

Logger: homeassistant.config_entries Source: custom_components/vicare/init.py:55 Integration: Viessmann ViCare First occurred: 00:37:18 (1 occurrences) Last logged: 00:37:18

Error setting up entry ViCare for vicare Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/vicare/init.py", line 44, 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 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/vicare/init.py", line 66, in setup_vicare_api vicare_api = vicare_login(hass, entry.data) File "/config/custom_components/vicare/init.py", line 55, in vicare_login vicare_api.initWithCredentials( File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCare.py", line 26, in initWithCredentials self.initWithExternalOAuth(ViCareOAuthManager( File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCare.py", line 31, in initWithExternalOAuth self.loadInstallations() File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCare.py", line 43, in loadInstallations installations = self.oauth_manager.get( 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-ffb2ff48f97a4d4ba77fdfab805c1f77')

oischinger commented 2 years ago

Can you please try to delete the locally saved token via rm /config/.storage/vicare_token.save

and restart HA or re-configure the integration?

oischinger commented 1 year ago

Please use 1.0.0-beta.1

The error is now caught and displayed to the user. also token files are cleared after re-configuring the integration