ZHA Device firmware update

Since the latest core 2024.2.0 firmware updates for devices in the Zha UI where introduced.
I’m thrilled to use that, but also a little confused.

I don’t see any updates available. Reason is probably that I didn’t enabled the ZHA OTA providers in the configuration.yaml.

Reason was that I don’t want to auto update what is working. According the ZHA documentation, this setting still enables auto updates.

Is the documentation just behind and did this behaviour change? So if I enable the OTA providers, will it NOT auto update, but provide manual control to either update a device or skip updates?

2 Likes

I have exactly the same question

How should the configuration.yaml look for the new updates? Is it even needed or will the new override the setting or will the old setting override the new updater?

Only four manufacturers provide OTA updates, apparently:

I just appended this to the end of my yaml file:

zha:
  zigpy_config:
    ota:
      ikea_provider: true                        # Auto update Trådfri devices
      ledvance_provider: true                # Auto update LEDVANCE/OSRAM devices
      salus_provider: true                      # Auto update SALUS/Computime devices
      inovelli_provider: true                   # Auto update INOVELLI devices
      thirdreality_provider: true             # Auto update 3REALITY devices
      otau_directory: /config/zb_ota_auto_update # Use .ota files to update others

I had update notifications for 3 of my Third Reality plugs yesterday. 2 of them worked perfectly when I installed them. The third is still running - looks like it hasn’t moved from 8% in at least 10 hours.

I don’t know whether I can kill it without killing my plug - I’m hoping someone here knows what to do.

Edit - I tried waking the device up and somehow that worked and my firmware loaded. Odd, but it works now.

1 Like

Hi Bob
This confirms for me the that the providers in the config still must be enabled to receive updates. Thanks.
Remains the second part of the question: what is the behaviour?
Will devices still auto update as well? (devices will typically check for updates a few times a day), OR is that always a manual decision in the UI now?
For me this is really important to know as I don’t want to update some specific devices.

Best Eric

Hi Eric,
I’ve only seen the 3 I mentioned above, but all 3 showed up in Settings just like if you had notices for any other upgrades (like for Mail-and-Packages or Home Assistant or any others). I just clicked on the upgrade/update and it loaded. I don’t yet know how the otau directory will work - I just switched all my Zigbee from an aeotec SmartThings hub to the SkyConnect stick Friday.

Thanks, Bob

Yes I understand. The question remaining is if these updates eventually will install automatically without clicking manually.
I hope one of the ZHA contributors steps in to answer this simple question

I’m now getting notifications that I have an update for an IKEA device:-

image

But whenever I click the install button it just fails with the following message:-

image

This is the stack trace:-

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 2543, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 162, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 466, 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>

I have the following in my configuration.yaml file:-

zha:
  custom_quirks_path: /config/custom_zha_quirks/
  zigpy_config:
    ota:
      otau_directory: /config/zigpy_ota
      ikea_provider: true                        # Auto update Trådfri devices

What else should be done to allow this update to work ?

I think this answers the OP’s question: if there’s an update, you have to click on “INSTALL” for each device, in order to update that device.

@Rofo try enabling debug logging in ZHA.

In my case, I click INSTALL and it goes through an “Installing (79%)” stage that takes 10 minutes or so, and eventually stops with an error that I haven’t been able to catch yet because it disappears within a few seconds (although not the same status number as yours). The debug log shows:

2024-04-29 18:08:52.997 DEBUG (MainThread) [zigpy.zcl] [0xEFBE:1:0x0019] Decoded ZCL frame: Ota:upgrade_end(status=<Status.ABORT: 149>, manufacturer_code=0, image_type=0, file_version=92)

I have 3 smart plugs that use Tuya firmware. One of them upgraded just fine but the other two haven’t. The two that failed are a different release of hardware, so are likely to be a different firmware, which possibly has something to do with it, although I don’t know why ZHA would show that an update was available if it wasn’t compatible.

Thanks for answering my question :+1: