Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZHA Fails to load after 2025.1 update. #134691

Closed
rgwilt opened this issue Jan 4, 2025 · 5 comments · Fixed by #134726
Closed

ZHA Fails to load after 2025.1 update. #134691

rgwilt opened this issue Jan 4, 2025 · 5 comments · Fixed by #134726

Comments

@rgwilt
Copy link

rgwilt commented Jan 4, 2025

The problem

After updating to 2025.1 my ZHA does not load and I no longer can control my lights or curtains :/

What version of Home Assistant Core has the issue?

2025.1

What was the last working version of Home Assistant Core?

2024.12

What type of installation are you running?

Home Assistant Core

Integration causing the issue

ZHA

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 17:03:42 (1 occurrences)
Last logged: 17:03:42

Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus, s/n: baf6432d539cec119ee6654d73138bba - ITead for zha
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 132, in async_setup_entry
async with radio_mgr.connect_zigpy_app() as app:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/contextlib.py", line 214, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/radio_manager.py", line 182, in connect_zigpy_app
app = await self.radio_type.controller.new(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_config, auto_form=False, start_radio=False
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 239, in new
await app._load_db()
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 111, in _load_db
await self._dblistener.load()
File "/usr/local/lib/python3.13/site-packages/zigpy/appdb.py", line 684, in load
device = zigpy.quirks.get_device(device)
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/init.py", line 43, in get_device
return _DEVICE_REGISTRY.get_device(device)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/registry.py", line 130, in get_device
return quirk_entry.create_device(device)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/v2/init.py", line 430, in create_device
return CustomDeviceV2(device.application, device.ieee, device.nwk, device, self)
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/v2/init.py", line 91, in init
add_meta(self)
~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/v2/init.py", line 164, in call
endpoint: Endpoint = device.endpoints[self.endpoint_id]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 2

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jan 4, 2025

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 close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha 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)


zha documentation
zha source
(message by IssueLinks)

@TheJulianJES
Copy link
Member

Same as #134686. We hope to get a fix ready for the next patch release.

@andrew19ty
Copy link

I get the above errors and following error when trying to reconfigure radio,

2025-01-05 01:36:57.069 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus V2 for zha
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 221, in startup
await self.initialize(auto_form=auto_form)
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 183, in initialize
await self.permit(0)
File "/usr/local/lib/python3.13/site-packages/bellows/zigbee/application.py", line 859, in permit
await super().permit(time_s, node)
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 1262, in permit
await self.permit_ncp(time_s)
File "/usr/local/lib/python3.13/site-packages/bellows/ezsp/init.py", line 220, in _command
return await command(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/bellows/ezsp/protocol.py", line 126, in command
await self._gw.send_data(data)
File "/usr/local/lib/python3.13/site-packages/bellows/uart.py", line 31, in send_data
await self._transport.send_data(data)
File "/usr/local/lib/python3.13/site-packages/bellows/ash.py", line 708, in send_data
await asyncio.shield(
...<6 lines>...
)
File "/usr/local/lib/python3.13/site-packages/bellows/ash.py", line 633, in _send_data_frame
raise NcpFailure(
t.NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT
)
bellows.ash.NcpFailure: NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 151, in async_setup_entry
await zha_gateway.async_initialize()
File "/usr/local/lib/python3.13/site-packages/zha/application/gateway.py", line 275, in async_initialize
await self._async_initialize()
File "/usr/local/lib/python3.13/site-packages/zha/application/gateway.py", line 258, in _async_initialize
await self.application_controller.startup(auto_form=True)
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 223, in startup
await self.shutdown(db=False)
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 425, in shutdown
await self.disconnect()
File "/usr/local/lib/python3.13/site-packages/bellows/zigbee/application.py", line 454, in disconnect
await self._ezsp.disconnect()
File "/usr/local/lib/python3.13/site-packages/bellows/ezsp/init.py", line 205, in disconnect
await self._gw.disconnect()
asyncio.exceptions.CancelledError: Global task timeout
2025-01-05 01:36:57.076 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 waiting on set() - moving forward
2025-01-05 01:37:56.226 ERROR (SyncWorker_2) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2031, in async_setup
raise OperationNotAllowed(
...<3 lines>...
)
homeassistant.config_entries.OperationNotAllowed: The config entry 'Sonoff Zigbee 3.0 USB Dongle Plus V2' (zha) with entry_id '01JED1TVMCZG7C1SZ55DRRK207' cannot be set up because it is in state ConfigEntryState.SETUP_ERROR, but needs to be in the ConfigEntryState.NOT_LOADED state
2025-01-05 01:50:00.586 DEBUG (bellows.thread_0) [zigpy.serial] Waiting for serial port to close

@jeroenverstraelen1
Copy link

I have a similar error:
Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 6:55:21 AM (7 occurrences)
Last logged: 8:29:49 AM

Error setting up entry Sonoff Zigbee 3.0 USB Dong - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_3a3242b26429ec11b9c66f7840c9ce8d-if00-port0, s/n: 3a3242b26429ec11b9c66f7840c9ce8d - ITead - 10C4:EA60 for zha
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 132, in async_setup_entry
async with radio_mgr.connect_zigpy_app() as app:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/contextlib.py", line 214, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/radio_manager.py", line 182, in connect_zigpy_app
app = await self.radio_type.controller.new(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_config, auto_form=False, start_radio=False
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 239, in new
await app._load_db()
File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 111, in _load_db
await self._dblistener.load()
File "/usr/local/lib/python3.13/site-packages/zigpy/appdb.py", line 684, in load
device = zigpy.quirks.get_device(device)
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/init.py", line 43, in get_device
return _DEVICE_REGISTRY.get_device(device)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/registry.py", line 130, in get_device
return quirk_entry.create_device(device)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/v2/init.py", line 430, in create_device
return CustomDeviceV2(device.application, device.ieee, device.nwk, device, self)
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/v2/init.py", line 91, in init
add_meta(self)
~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/v2/init.py", line 164, in call
endpoint: Endpoint = device.endpoints[self.endpoint_id]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 2

@CrazyUs3r
Copy link

2025-01-05 13:35:29.805 WARNING (MainThread) [homeassistant.helpers.frame] Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 04:87:27:ff:fe:1e:27:2c), with device info: {'connections': {('zigbee', '00:15:8d:00:8b:15:93:c8')}, 'identifiers': {('zha', '00:15:8d:00:8b:15:93:c8')}, 'manufacturer': 'LUMI', 'model': 'lumi.sensor_magnet.aq2', 'name': 'LUMI lumi.sensor_magnet.aq2', 'via_device': ('zha', 04:87:27:ff:fe:1e:27:2c)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants