ZHA Failing to Load after 2025.1 Update

Hi everyone,
I’ve just updated my instance of Home Assistant to 2025.1 and now I my sonoff dongle won’t load and nor will all my Zigbee devices, does anyone have any ideas on how to resolve this?

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
1 Like

Do you have any custom quirks?

I think so, I seem to remember adding 1 for an Aqara switch.

I have the same issue. I had to restore from the previous version and everything works again.
It looks I have to wait for another update, because there is some bug in there.

same here, but it was already in a failed state after the december release. I had to restore to Core 2024.11.3.

I have the following message for the integration : zigbee home automation failed setup

The new update almost destroyed everything for me. I couldn’t even use the backup i made yesterday.

I am having problems with this also…

To be honest, I thought it was when I made a change ot the yaml, then I thought it was when I added a device. So I restored from a back up, and added the devices again. It all worked great…

But then at some point in the day, seems to be the evening (not sure if this is relevant) - it just crashes. No devices available, and I get the below error.

Of course hitting retry doesn’t work.

What do I do? I’m not quite sure how to debug (as I added a debigline in my Zigbee Confg file previously - and I thought that’s what crashed it, but I now realise it is not).

I’m really struggling with this :frowning: - I don’t really know where ot begin. I just keep restoring, but then that’s not very sustainable. I also am not sure how to find the version I am on, but I am pretty sure it’s the most recent. (when I go into integrations, it doesn’t seem to show me).

I use it with the SkyConnect Zigbee Dongle.

Any help is greatly appreciated.

This is for ZHA not Z2M. For Z2M it was listed as it would break. I believe you need to asd something to your code.

1 Like

hmmmm. OK.
I’ll see if I can find something on that - many thanks
Neil

I had that same issue in ZHA, I couldn’t get ZHA to complete it’s initialisation no matter what I tried. I’m running HA in docker on a Linux host. I eventually redeployed HA by doing a “docker compose pull” and it pulled 2025.1.1 and it worked after that. Whether there’s a fix in the later version or not, I do not know, but it worked for me.

Also the same here, The Dongle is working but the devices are not found as long as the don’t send a state change. (f.i. As soon as I trigger a doorsensor it’s found again)
After a restart the whole integration is not starting. Only a coldboot solves this (with the above situation as result)
I doubt if this is an issue with the ZHA integration. Since the upgrade to 2025 version I have the similar isues with a lot of integration, that were rock steady im the 2024 version.
All is getting pretty unpredictable what is failng. In several cases it just stops working over night. without an update or whatever and takes a lot of time to get running again. So somehow In get the feeling there is a more general issue, I can’t point out.

Same problem with ZHA (PI4 with SSD and ConbeeII far away from the PI box) just after I upgraded to 2025.1.2.
All was working well with 2024.12 (0r 2024.11 I must admit I don’t remember).
By the way, from a HA backup file, is there a way to find the version of HA the backup was created from?
This would be great to have such information clearly and easily available .
Thanks to all.
Thierry

A bit more details about my issue.

  • ZHA seems to work well at least for all incoming messages.
    I get updated values from thermometers and from my power plug (for Voltage, Power, …).
  • But ZHA returns errors when sending requests to zigbee nodes. For instance, if try to switch off/on a power plug or a light, I received an error like :
*PowerON_Switch_005_Frigo_garage_if_pwr_outageNew Automation: Error executing script. Error for device at pos 1: Failed to send request: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225>*
*2025-01-17 16:10:29.104 ERROR (MainThread)* 

I put also a full error message here after.

What I did trying to fix the issue:

  • Downgraded HA core 2024.12.4 since other posts mentionned the same kind of issue. I used : ha core update --version 2024.12.4
    The downgrade was done successfully as far as I saw.
    But I still get the issue

  • Might is be related to the upgrade to HAOSS 14.1 I did just after the upgrade to core 2025.1.2?
    The downgrade I just I did runs now on top of HAOSS 14.1

I’m lost. I’ve the feeling I may have to reinstall the whole stuff starting from HAOSS 14.0 and restoring my HA Core tar backup ?
I admit I don’t have a clear view what releases (HA core and HAOSS) I was running successfully before making the jump to HAOSS14.1 and Ha Core 2024.1.2.
Can we check the running releases from HA Core tar backup ?

Many thanks.

Here after, error message I received (similar to what I had in the past when I moved HA to a USB3 SSD drive due to interference with Zigbee Conbee II. But I fixed it using a long USB cable for the Conbee II and all was working like a charm.

2025-01-17 16:27:36.420 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [546681986720] Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/zigpy_deconz/zigbee/application.py", line 507, in send_packet
    await self._api.aps_data_request(
    ...<11 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/zigpy_deconz/api.py", line 881, in aps_data_request
    rsp = await self.send_command(
          ^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy_deconz/api.py", line 507, in send_command
    return await self._command(cmd, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/zigpy_deconz/api.py", line 588, in _command
    return await fut
           ^^^^^^^^^
zigpy_deconz.exception.CommandError: <CommandId.aps_data_request: 18>, status: <Status.BUSY: 2>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/__init__.py", line 67, in wrap_zigpy_exceptions
    yield
  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/__init__.py", line 85, in wrapper
    return await RETRYABLE_REQUEST_DECORATOR(func)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/zigpy/util.py", line 136, in retry
    return await func()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/__init__.py", line 263, in command
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/zcl/__init__.py", line 375, in request
    return await self._endpoint.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/endpoint.py", line 270, in request
    return await self.device.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 378, in request
    await send_request()
  File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 835, in request
    await self.send_packet(
    ...<14 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/zigpy_deconz/zigbee/application.py", line 521, in send_packet
    raise zigpy.exceptions.DeliveryError(
        f"Failed to enqueue packet: {ex!r}", ex.status
    )
zigpy.exceptions.DeliveryError: Failed to enqueue packet: CommandError('<CommandId.aps_data_request: 18>, status: <Status.BUSY: 2>')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/helpers.py", line 1335, in handler
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/switch.py", line 57, in async_turn_on
    await self.entity_data.entity.async_turn_on()
  File "/usr/local/lib/python3.13/site-packages/zha/application/platforms/switch.py", line 95, in async_turn_on
    await self._on_off_cluster_handler.turn_on()
  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/general.py", line 465, in turn_on
    result = await self.on()
             ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/__init__.py", line 84, in wrapper
    with wrap_zigpy_exceptions():
         ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/__init__.py", line 76, in wrap_zigpy_exceptions
    raise ZHAException(message) from exc
zha.exceptions.ZHAException: Failed to send request: Failed to enqueue packet: CommandError('<CommandId.aps_data_request: 18>, status: <Status.BUSY: 2>')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/helpers.py", line 1337, in handler
    raise HomeAssistantError(err) from err
homeassistant.exceptions.HomeAssistantError: Failed to send request: Failed to enqueue packet: CommandError('<CommandId.aps_data_request: 18>, status: <Status.BUSY: 2>')
2025-01-17 16:31:45.950 WARNING (MainThread) [homeassistant.components.media_player] Updating frontier_silicon media_player took longer than the scheduled update interval 0:00:10

Hi all,

Problem does not seem to be related to the upgrade but more to a radio interference with my new (3 month old) TpLink Decox50 Wifi mesh with 3 nodes.

For more details, feel free to read my answer in this thread for the same topic : Loss of Zigbee - Conbee II