[homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0300]: 'async_initialize' stage failed: / asyncio.exceptions.CancelledError
The problem
The devices themselves seem to work okay but I receive an error anyway about a timeout.
2024-02-04 13:45:14.967 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: finished cluster handler initialization
2024-02-04 13:45:14.968 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: initializing cluster handler: from_cache: False
2024-02-04 13:45:14.968 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: initializing cached cluster handler attributes: ['current_file_version']
2024-02-04 13:45:14.968 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: Reading attributes in chunks: ['current_file_version']
2024-02-04 13:45:14.968 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: finished cluster handler initialization
2024-02-04 13:45:14.969 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0006]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.969 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0008]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.970 DEBUG (Thread-3) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f6bf634c0>)
2024-02-04 13:45:14.971 DEBUG (Thread-3) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f6bf634c0>) completed
2024-02-04 13:45:14.969 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0300]: 'async_initialize' stage failed:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 330, in request
return await req.result
^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 186, in sem_task
return await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 404, in async_initialize
await self._get_attributes(
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 514, in _get_attributes
read, _ = await self.cluster.read_attributes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy/zcl/__init__.py", line 524, in read_attributes
result = await self.read_attributes_raw(to_read, manufacturer=manufacturer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy/zcl/__init__.py", line 377, in request
return await self._endpoint.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy/endpoint.py", line 253, in request
return await self.device.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 329, in request
async with asyncio_timeout(timeout):
File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
TimeoutError
2024-02-04 13:45:14.987 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0003]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.987 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0000]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.988 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x1000]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.988 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.988 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0538:11:0x0019]: 'async_initialize' stage succeeded
2024-02-04 13:45:14.988 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0538](1745430A7): power source: Mains
2024-02-04 13:45:14.988 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0538](1745430A7): completed initialization
What version of Home Assistant Core has the issue?
core-2024.2.0b4
What was the last working version of Home Assistant Core?
core-2023.11.x
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ZHA
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zha/
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
Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of zha can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign zhaRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
zha documentation zha source (message by IssueLinks)
The traceback is logged at the DEBUG level specifically because this isn't a problem. The device just was unreachable at startup.
No problem. I was reviewing my debug logs for all issues and this one stood out. Do we know why it was not reachable? I could only speculate as it is more or less immediately adjacent (within a metre or two) to three other similar Hue outdoor luminaires.
It depends on the coordinator in use but it's usually routing issues. Can you upload the diagnostics JSON for the integration? It'll contain coordinator info.
Certainly and my apologies for not sharing that sooner.
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.