Over The Air Updates Failing

Not sure if anyone else is seeing these errors, but I can no longer seem to update my zigbee devices over the air. I get the following in the logs, which I’m not really understanding.

I’m using ZHA on a Proxmox install with a Norttek Zigbee / Zwave adapter.

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:239
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 2:42:51 PM (1 occurrences)
Last logged: 2:42:51 PM

[140280092267968] Unexpected exception
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 975, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 1047, in _handle_entity_call
result = await task
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/update/init.py”, line 157, in async_install
await entity.async_install_with_progress(version, backup)
File “/usr/src/homeassistant/homeassistant/components/update/init.py”, line 461, in async_install_with_progress
await self.async_install(version, backup)
File “/usr/src/homeassistant/homeassistant/components/zha/update.py”, line 196, in async_install
raise HomeAssistantError(f"Update was not successful: {result}")
homeassistant.exceptions.HomeAssistantError: Update was not successful: <Status.FAILURE: 1>

For me the firmware upgrades with ZHA also do no longer work. They always abort at some point. I have enabled debug logging:

2024-06-05 14:13:27.685 DEBUG (MainThread) [zigpy.device] [0x7684] OTA image_block handler exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/zigpy_deconz/api.py", line 589, in _command
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/zigpy/ota/manager.py", line 152, in _image_block_req
    await self.ota_cluster.image_block_response(
  File "/usr/local/lib/python3.12/site-packages/zigpy/zcl/__init__.py", line 415, in reply
    return await self._endpoint.reply(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/endpoint.py", line 290, in reply
    return await self.device.reply(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 508, in reply
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 334, in request
    await send_request()
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 841, in request
    await self.send_packet(
  File "/usr/local/lib/python3.12/site-packages/zigpy_deconz/zigbee/application.py", line 508, in send_packet
    await self._api.aps_data_request(
  File "/usr/local/lib/python3.12/site-packages/zigpy_deconz/api.py", line 882, in aps_data_request
    rsp = await self.send_command(
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy_deconz/api.py", line 508, in send_command
    return await self._command(cmd, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy_deconz/api.py", line 588, in _command
    async with asyncio_timeout(COMMAND_TIMEOUT):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
2024-06-05 14:13:27.710 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547013918784] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 157, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 461, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/zha/update.py", line 196, in async_install
    raise HomeAssistantError(f"Update was not successful: {result}")
homeassistant.exceptions.HomeAssistantError: Update was not successful: <Status.FAILURE: 1>

If anyone knows how to fix this, please let me know.

I’m having a similar issue, “but wait, there’s more!”

I have two identical THIRDREALITY Zigbee Contact Sensors (came in a pack of 4) currently connected via a GoControl CECOMINOD016164 HUSBZB-1 USB Hub. I was notified 4 days ago that they were due an upgrade from the installed firmware version “0x00000030” to the latest version “0x0000003c”. One successfully upgraded, the other did not… :sweat:

Also, while the exception reads very similar to @ast0815’s mine differs ever so slightly:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:239
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: June 4, 2024 at 11:26:07 PM (5 occurrences)
Last logged: 12:52:28 PM

[546967949504] Unexpected exception
[547447128896] Unexpected exception
[547391924416] Unexpected exception
[547897359808] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 157, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 461, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/zha/update.py", line 196, in async_install
    raise HomeAssistantError(f"Update was not successful: {result}")
homeassistant.exceptions.HomeAssistantError: Update was not successful: <Status.FAILURE: 1>

What happens with the one that will not do the upgrade? Does it just error out after about 30 seconds?

No, sometimes it errors out after a few minutes. But, the plot thickens! The progress is incrementing each time I make an attempt! I didn’t notice until today when I tried again and saw the percentage complete jump straight to 77%. Next run was 80%, this time was 87%. Wish me luck on these next few attempts!

Oh man it finally succeeded! I would only get maybe 4-5% each attempt, but it did eventually hit 100%!

Ya, I find that I get maybe 1% every time, if I’m lucky when it starts at all. Was hoping someone had a solution for why it errors out to begin with…

First of all, you guys should read and follow these best practice tips regarding avoiding interference and why you should to add many more mains-powered Zigbee Router devices (as Zigbee repeaters/extenders) as those low-hanging fruit actions will resolve the most common issues for the symtoms that you describe above → Zigbee networks: how to guide for avoiding interference + optimize using Zigbee Router devices (repeaters/extenders) to get a stable network with best possible range and coverage

That is, add several more “known good” Zigbee Router devices and other than that you also need to be aware that all Zigbee devices, and especially the Zigbee Coordinator radio adapter are extremely sensitive to electromagnetic interference (EMI, also known as RMI / Radio-Frequency Interference), as practically all sources of EMI/RMI are infamously known for sometimes leading to serious Zigbee transmission/reception loss or intermittant connection problems. Such interference can interrupt all Zigbee communication and cause dropped packages/messages on the Zigbee network, including OTA updates. Take the basic recommend actions to avoid it like adding a long USB extension cable and get the Zigbee Coordinator away from infamous know sources such as USB 3.0 devices!

Also, Nortek GoControl QuickStick Combo Model HUSBZB-1 USB Adapter is based on the very old and deprecated “Ember 3581” SoC from Silicon Labs (Silabs EM357 family Zigbee MCU/radio-chip) which is deprecated + uses outdated firmware, and can not be upgraded to latest available firmware, even if you have flashed the latest unofficial firmware released for it which is still older but at least not quite yet obsolete → GitHub - walthowd/husbzb-firmware: Nortek GoControl HUSBZB-1 / EM3581 Firmware update image

You guys really need to buy a modern Zigbee Coordinator dongle based on a much newer chip and migrate to it, (migration is super easy if → https://www.home-assistant.io/integrations/zha#to-migrate-to-a-new-zigbee-coordinator-radio-inside-zha). As such I strongly recommend buy at least new Zigbee USB adapter based on either “EFR32MG21” radio SoC from Silicon Labs or “CC2652P” radio SoC from Texas Instruments (which neither of which are cutting-edge radio SoCs/chips today but are both mature and well know to be stable).

Suggest you consider buying the official SkyConnect USB dongle if need easy of use and want to sponsor Home Assistant, or if on a budget then buy either “Sonoff ZBDongle-E” or “Sonoff ZBDongle-P” as one of those cost less than $20 and works better in every way possible + will support much newer firmware.

I know all about EMI, thats not what causing it.

As far as the coordinator, the one I have is paid for and works for zigbee / zwave. Its worked on everything else I’ve ever used it on, only when OTA came out did I start to see issues.

Well that adapter is specifically listed as “not recommended” → https://www.home-assistant.io/integrations/zha#other-supported-but-not-recommended-zigbee-radio-adapters-or-modules

So which Zigbee EmberZNet firmware version are you using on your Zigbee Coordinator today?

At least update to EmberZNet version 6.7.8 if you have not already → GitHub - walthowd/husbzb-firmware: Nortek GoControl HUSBZB-1 / EM3581 Firmware update image

(Other than that I don’t think you get much more help with that attitude to those trying to help).

You gave me a lot of reasons why it might not be working, never saying you had the issue yourself. What I was looking for was people who had the same issue and had a known error and a fix for that error. Telling me to get a new piece of hardware is like telling me to buy a new car because my 12V battery died, you didn’t tell me what battery to replace it with or how to replace it, you just told me to get a car with newer features so I “might” not have that problem again…

You still did not state which version of EmberZNet firmware you are currently using.

I do not have that problem, but i am not using an Zigbee Coordinator that is not recommend.

I think that a better analogy in this case is me telling you that you should not try to run your new car on old petrol, as petrol does not last forever even if stored right. I told you what fuel is recommend and how to replace it.

1 Like

I am using a RaspBee II with firmware that I upgraded a few months ago. I disabled WLAN on the Pi. I chose ZigBee and WLAN channels to minimize spectrum overlap. The upgradeable devices are routers themselves, IKEA smart bulbs, and the first is less than a meter away from the Pi, the furthest is maybe 3 meters away.

Aaaanyway, I now managed to update the devices. No idea if it is related to HA version 2024.6.2, but it now worked after a few more tries. Didn’t change anything else, but upgrade to the newest version.