home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.73k stars 29.98k forks source link

vicare integration stopped providing data #100591

Closed ithinkihaveacat closed 5 months ago

ithinkihaveacat commented 1 year ago

The problem

A week ago I stopped receiving data from vicare. My developer account seems to be in good standing. (I can login, and no error messages shown.)

What version of Home Assistant Core has the issue?

core-2023.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

vicare

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vicare

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-09-15 23:52:57.023 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up vicare platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/vicare/sensor.py", line 629, in async_setup_entry
    entity = await hass.async_add_executor_job(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/vicare/sensor.py", line 581, in _build_entity
    sensor.value_getter(vicare_api)
  File "/usr/src/homeassistant/homeassistant/components/vicare/sensor.py", line 67, in <lambda>
    value_getter=lambda api: api.getOutsideTemperature(),
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareUtils.py", line 45, in feature_flag_wrapper
    return wrapper(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareUtils.py", line 38, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareDevice.py", line 77, in getOutsideTemperature
    return self.service.getProperty("heating.sensors.temperature.outside")["properties"]["value"]["value"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
    data = self.__get_or_update_cache()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareCachedService.py", line 42, in __get_or_update_cache
    data = self.fetch_all_features()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareService.py", line 64, in fetch_all_features
    return self.oauth_manager.get(url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 41, in get
    self.__handle_server_error(response)
  File "/usr/local/lib/python3.11/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 60, in __handle_server_error
    raise PyViCareInternalServerError(response)
PyViCare.PyViCareUtils.PyViCareInternalServerError: (PyViCareInternalServerError(...), 'Request failed with status code 502 and message "DEVICE_COMMUNICATION_ERROR". ViCare ErrorId: req-7b7c775296314083a51f5d879e3099d0')

Additional information

No response

home-assistant[bot] commented 1 year ago

vicare documentation vicare source

ithinkihaveacat commented 1 year ago

In this case rebooting the system seems to have fixed it.

Flo2410 commented 11 months ago

I have the same issue with the same error message. Removing the config/.storage/vicare_token.save and/or rebooting did not help. After reinstalling the integration, the error persists and no devices or entities are shown.

rphamel commented 11 months ago

Same issue here. Worked a long time. Did reinstall, delete vicare_toke.save, reboot ... all things mentioned in different ways but finally the error persists. Log:

2023-10-17 15:39:29.921 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 399, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 55, in async_setup_entry await hass.async_add_executor_job(setup_vicare_api, hass, entry) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 85, in setup_vicare_api device = vicare_api.devices[0]


IndexError: list index out of range

Help much appreciated...
CFenner commented 11 months ago

File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 85, in setup_vicare_api device = vicare_api.devices[0]


IndexError: list index out of range

Sounds like you have no devices in your installations. Can you verify this via a direct api call?

gijannet commented 8 months ago

Bump... I have the same problem. It just stopped connecting one sunny day (without any upgrades, etc.) at the end of December. I tried to re-new API code, tried to re-install ViCare integration, nothing helps.

CFenner commented 8 months ago

What are the logs saying?

gijannet commented 8 months ago

What are the logs saying?

Logger: homeassistant.config_entries Source: config_entries.py:402 First occurred: 2024. gada 2. janvāris 20:14:37 (2 occurrences) Last logged: 2024. gada 2. janvāris 20:50:11 Error setting up entry ViCare for vicare

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 56, in async_setup_entry await hass.async_add_executor_job(setup_vicare_api, hass, entry) asyncio.exceptions.CancelledError: Global task

marc-heinlein commented 8 months ago

I also have (again) the problem, that there are no updates since 11.01.2024 11:45 (UTC+1). Usually that was due to the amount of API requests, that were exceeded (for whatever reason, I hade no other API requests beside Home Assistant). Right now I logged into the Viessmann Developer Portal to check the amount of API requests, but it says:

Our services aren't available right now We're working to restore all services as soon as possible. Please check back soon.

20240112T081647Z-y9gm8v70sh6uvd6d9zs7y67vvw00000001fg000000006geg

marc-heinlein commented 8 months ago

After the Viesmann Developer Portal came back, I still got no updates. Later on I recognized, that also the Viessmann ViCare App did not show any udated data anymore. So, it seems, that my problem is not in Homeassistant/Vicare-Integration, but more on the side Viessmann server/heating/internet connection. Attempting to solve this, I disconnected the heating from LAN and connected it again. This did not solve the issue. Then I have disabled the LAN module within the heating menu. After enabling it again, the issue has gone. ViCare App and also Homeassistant are now getting data again. So maybe, the LAN-Module of my heating has hung up.

issue-triage-workflows[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.