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.71k stars 29.97k forks source link

Home connect initialization freezes and hangs, fails in the end #124832

Open michnovka opened 3 weeks ago

michnovka commented 3 weeks ago

The problem

I have this error with home connect:

homeassistant  | 2024-08-29 01:43:50.690 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.office_combined are missing or not currently available
homeassistant  | 2024-08-29 01:43:53.421 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: {('home_connect', '01J6CV1F6WE4KEZWKR9NY0QZ3V'): 182994.493163482}
homeassistant  | 2024-08-29 01:44:53.496 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: {('home_connect', '01J6CV1F6WE4KEZWKR9NY0QZ3V'): 182994.493163482}
homeassistant  | 2024-08-29 01:45:53.575 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: {('home_connect', '01J6CV1F6WE4KEZWKR9NY0QZ3V'): 182994.493163482}
homeassistant  | 2024-08-29 01:46:53.661 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: {('home_connect', '01J6CV1F6WE4KEZWKR9NY0QZ3V'): 182994.493163482}
homeassistant  | 2024-08-29 01:47:53.701 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry XXXX for home_connect
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
homeassistant  |     result = await component.async_setup_entry(hass, self)
homeassistant  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/usr/src/homeassistant/homeassistant/components/home_connect/__init__.py", line 230, in async_setup_entry
homeassistant  |     await update_all_devices(hass, entry)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/components/home_connect/__init__.py", line 254, in update_all_devices
homeassistant  |     await hass.async_add_executor_job(hc_api.get_devices)
homeassistant  | asyncio.exceptions.CancelledError: Global task timeout
homeassistant  | 2024-08-29 01:47:53.706 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 waiting on set() - moving forward

I was debugging my custom module, so I was doing restarts of HA very often. Perhaps I reached the rate limit? I dont know, but what happens is that the extension is initializing for long time, and then it fails. If it is the rate limit, Id appreciate some message. maybe I am firewalled by their API servers? so I dont even get error message?

What version of Home Assistant Core has the issue?

core-2024.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Home Assistant

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 weeks ago

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

Code owner commands Code owners of `home_connect` 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 home_connect` 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)


home_connect documentation home_connect source (message by IssueLinks)

HertogArjan commented 3 weeks ago

Hi @michnovka, did your problem resolve itself? Was it rate limiting? I have the same problem now after updating and restarting HA. Initialization of the Home Connect integration always fails and I get the same error message in the logs.

I am also running version core-2024.8.3 and type of installation Home Assistant Container.

2024-08-31 16:32:59.821 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Configuration.yaml for home_connect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/home_connect/__init__.py", line 230, in async_setup_entry
    await update_all_devices(hass, entry)
  File "/usr/src/homeassistant/homeassistant/components/home_connect/__init__.py", line 254, in update_all_devices
    await hass.async_add_executor_job(hc_api.get_devices)
asyncio.exceptions.CancelledError: Global task timeout
2024-08-31 16:32:59.824 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 waiting on set() - moving forward

Update 2024-09-02: Today I reloaded the integration from HA and it succesfully initialized the first time. Whatever my issue was it was temporary.