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
73.77k stars 30.87k forks source link

ViCare not starting up if one device is offline #115198

Closed konairius closed 4 months ago

konairius commented 7 months ago

The problem

After the upgrade to 2024.4.1 ViCare is not starting up anymore. However, I assume it has nothing to do with the version change, but with the restart of the Plugin. The heating system is offline for Repair at the moment, the PV System is working fine (in the app).

I tried deleting and reading the integration, that isn't helping.

What version of Home Assistant Core has the issue?

core-2024.4.1

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

config_entry-vicare-0424867667770859e487a9d6abf82095.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-04-08 12:36:27.111 ERROR (SyncWorker_60) [ViCare] Missing 'data' property when fetching data.
2024-04-08 12:36:27.112 ERROR (MainThread) [homeassistant.components.water_heater] Error while setting up vicare platform for water_heater
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/vicare/water_heater.py", line 91, in async_setup_entry
    await hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/vicare/water_heater.py", line 78, in _build_entities
    for circuit in get_circuits(device.api)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/vicare/utils.py", line 61, in get_circuits
    return device.circuits
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareHeatingDevice.py", line 48, in circuits
    return list([self.getCircuit(x) for x in self.getAvailableCircuits()])
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareUtils.py", line 55, in feature_flag_wrapper
    return wrapper(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareUtils.py", line 48, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareHeatingDevice.py", line 335, in getAvailableCircuits
    return self.service.getProperty("heating.circuits")["properties"]["enabled"]["value"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
    data = self.__get_or_update_cache()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareCachedService.py", line 45, in __get_or_update_cache
    raise PyViCareInvalidDataError(data)
PyViCare.PyViCareUtils.PyViCareInvalidDataError: {'viErrorId': '|00-54d2ddb75ce140dfbe3d8e991b4277d8-9927d3f3b9de4d97-01.1ec2a286_', 'statusCode': 400, 'errorType': 'DEVICE_COMMUNICATION_ERROR', 'message': '', 'extendedPayload': {'httpStatusCode': 'NotFound', 'code': '404', 'reason': 'GATEWAY_OFFLINE'}}

Additional information

No response

home-assistant[bot] commented 7 months ago

Hey there @cfenner, mind taking a look at this issue as it has been labeled with an integration (vicare) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `vicare` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign vicare` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vicare documentation vicare source (message by IssueLinks)

CFenner commented 7 months ago

@konairius thanks reporting this.

Unfortunately, the integration/library is lacking a proper handling of offline devices. My knowledge is not (yet) profound enough to fix that.

issue-triage-workflows[bot] commented 4 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.