ZHA OTA Firmware Update / Upgrade

Has anyone been able to upgrade the firmware of an Aqara device using this method?

I’m using HA 2024.9.3, on HomeAssistant Yellow. I’ve setup the recommended configurations:

# configuration.yaml

zha:
  zigpy_config:
    ota:
      otau_directory: /config/zigpy_ota
      ikea_provider: true
      sonoff_provider: true

zha_toolkit:

# temporary increase log level for OTA update
logger:
  default: info
  logs:  
    homeassistant.components.zha: debug
    zigpy: debug
    custom_components.zha_toolkit: debug

Downloaded the firmware file and placed it on the otau directory:

[core-ssh config]$ ls -lh /config/zigpy_ota/
total 192K   
-rw-r--r--    1 root     root      191.6K Sep 25 16:25 20230130180718_OTA_lumi.motion.ac02_0.0.0_0010_20230104_390E3D.ota

And then tried:

  1. Following ZHA New Gui method instructtions: OTA Device Firmware Updates · zigpy/zigpy Wiki · GitHub with a combination of pressing the Aqara P1 button before or after sending the command. Didn’t seem to do much.
  2. Tried using ZHA Toolkit’s OTA Notify. Here I mostly got:
Exception 'Failed to deliver message: <sl_Status.ZIGBEE_DELIVERY_FAILED: 3074>' for service call with data '{'zha_toolkit_version': 'v1.1.19', 'zigpy_version': '0.66.0', 'zigpy_rf_version': '0.40.6', 'ieee_org': 54:ef:44:10:00:a8:cd:d6, 'ieee': '54:ef:44:10:00:a8:cd:d6', 'command': 'ota_notify', 'command_data': None, 'start_time': '2024-09-25T17:00:49.824610+00:00', 'errors': ["DeliveryError('Failed to deliver message: <sl_Status.ZIGBEE_DELIVERY_FAILED: 3074>')"], 'params': {'dir': 0, 'tries': 1, 'expect_reply': True, 'args': [], 'read_before_write': True, 'read_after_write': True}, 'PAR': {'cmd_id': None, 'endpoint_id': None, 'dst_endpoint_id': None, 'cluster_id': None, 'attr_id': None, 'attr_type': None, 'attr_val': None, 'code': None, 'min_interval': None, 'max_interval': None, 'reportable_change': None, 'dir': 0, 'manf': None, 'tries': 1, 'expect_reply': True, 'args': [], 'state_id': None, 'state_attr': None, 'state_value_template': None, 'force_update': False, 'allow_create': False, 'event_success': None, 'event_fail': None, 'event_done': None, 'fail_exception': False, 'read_before_write': True, 'read_after_write': True, 'write_if_equal': False, 'csvfile': None, 'csvlabel': None, 'download': None, 'path': None, 'use_cache': False}, 'success': False}'

and also

This error originated from a custom integration.

Logger: custom_components.zha_toolkit.ota
Source: custom_components/zha_toolkit/ota.py:192
integration: ZHA 🧰 Toolkit (documentation, issues)
First occurred: 18:58:39 (7 occurrences)
Last logged: 19:13:00

Could not get ota object for ota_update_images, try again

Any suggestions are welcomed :slightly_smiling_face:

I think this is the ‘old’ way of doing it; a few posts up there’s the ‘new’ way. I haven’t tried it yet, but also am stuck with devices with older firmware that have bugs in them, but no notification of available updates :frowning:

Using this method I got updates for my aquaria smart sockets, and almost all of my hue lights and switches.

Unfortunately no updates for my Tuya plugs. (TS011F)

I’m probably stupid, but does this only work with z2m?
Is it possible to get working with ZHA?

I’ve tried adding those lines you refer to my configuration.yaml, but I don’t see any updates, not even after many hours.
I would expect at least some devices to be eligable for an update considering I currently have 87 zigbee devices in my network.

Quick update: Two out of three Tuya plugs have been updated. Not sure why the last one won’t update, though.

It seems that the two plugs which received the update no longer turn off randomly.

Additionally, I have a couple of Hue dimmers and one Hue Tap where updates are available, but I can’t get the devices to install the updates. Do you have any advice on how to update these battery-powered devices? Do I need to wake them up somehow?

As of Home Assistant 2024.12.0 this worked for me:
(Ikea one just for logic example)

  zigpy_config:
    ota:
      extra_providers:
        - type: ikea
        - type: z2m
2 Likes

Question out of curiosity: how did you find that out? Especially the thing with z2m? I can’t find it in the official Home Assistant documentation.

I think you can find it here:

2 Likes

Adding the z2m line works very well. Thanks!

Can anyone help me. ZHA keeps saying that my TS011F is up to date.

But is it?

I have tried the following:
Configured this:

zha:
  zigpy_config:
    ota:
      allow_file_providers: "I understand I can *destroy* my devices by enabling OTA updates from files. Some OTA updates can be mistakenly applied to the wrong device, breaking it. I am consciously using this at my own risk."
      otau_directory: /config/zigpy_ota
service: zha.issue_zigbee_cluster_command
data:
  ieee: a4:c1:38:fa:e7:98:4b:6c
  endpoint_id: 1
  cluster_type: out
  command_type: client
  cluster_id: 25
  command: 0
  params:
    payload_type: 0
    query_jitter: 100

1662545193-oem_zg_tl8258_plug_OTA_3.0.0.bin is placed inside zigpy_ota including all other toolkit files.

Nothing shows up while
tail -f home-assistant.log | egrep 'zigpy.ota|zigpy.util|zigpy.*OTA'

current file version stays 68

And yes I also have had random turn off’s with this plug and others so I wanted to update it. But again, I dont know if its up to date as ZHA says or not?

Hey guys,
I’ve bought 3 pcs IKEA Symfonisk Sound Controls.
But they do not send anything into HA - no logs, no nothing.
I have attached it via ZHA and with the help of a SLZB-06M.

Now I saw that it needs a FW-upgrade, which is not starting at all.
I did easily 15-20 restarts of HA while changing some settings in HA.
I have configured the update providers in my configuration.yaml like this:

zha:
    enable_quirks: true
    custom_quirks_path: /config/config_ZHA/
    zigpy_config:
        ota:
          otau_directory: /config/zigpy_ota
          extra_providers:
            - type: ikea
            - type: z2m

And finally I just saw now in the HA protocols, when looking for ZHA the following:

Logger: zha.zigbee.device
Quelle: components/zha/websocket_api.py:1389
Erstmals aufgetreten: 23:16:50 (7 Vorkommnisse)
Zuletzt protokolliert: 23:19:27

[0x35C5](SYMFONISK sound remote gen2): args [[0, 100]] are deprecated and should be passed with the params key. The parameter names are: ['payload_type', 'query_jitter', 'manufacturer_code', 'image_type', 'new_file_version']
[0x957F](SYMFONISK sound remote gen2): args [[0, 100]] are deprecated and should be passed with the params key. The parameter names are: ['payload_type', 'query_jitter', 'manufacturer_code', 'image_type', 'new_file_version']

One last thing, I have downloaded this file and placed into the zigpy-ota-folder:

symfonisk-sound-remote-zingo_release_prod_v16777269_1fcbd170-5b54-49e8-896e-16a73ca72011.ota

Still no update starting. The log shows this:

4364))
2025-03-23 23:30:38.243 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Sonoff(url=None, manufacturer_ids=(4742,))
2025-03-23 23:30:38.243 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Inovelli(url=None, manufacturer_ids=(4655,))
2025-03-23 23:30:38.243 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: ThirdReality(url=None, manufacturer_ids=(4659, 4877, 5127))
2025-03-23 23:30:38.243 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Tradfri(url='https://fw.ota.homesmart.ikea.com/DIRIGERA/version_info.json', manufacturer_ids=(4476,))
2025-03-23 23:30:38.243 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: RemoteZ2MProvider(url='https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json', manufacturer_ids=())
2025-03-23 23:30:39.328 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Ledvance(url='https://api.update.ledvance.com/v1/zigbee/firmwares', manufacturer_ids=(4489, 4364))
2025-03-23 23:30:39.329 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Sonoff(url=None, manufacturer_ids=(4742,))
2025-03-23 23:30:39.329 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Inovelli(url=None, manufacturer_ids=(4655,))
2025-03-23 23:30:39.329 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: ThirdReality(url=None, manufacturer_ids=(4659, 4877, 5127))
2025-03-23 23:30:39.329 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: Tradfri(url='https://fw.ota.homesmart.ikea.com/DIRIGERA/version_info.json', manufacturer_ids=(4476,))
2025-03-23 23:30:39.329 DEBUG (MainThread) [zigpy.ota] Registering new OTA provider: RemoteZ2MProvider(url='https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json', manufacturer_ids=())
2025-03-23 23:30:45.143 DEBUG (MainThread) [zigpy.util] Tries remaining: 5

I also tried to check the FW-version within the devices data (OTA-cluster) which fails with a red button (read attribute).
The same happens when using the IEEE in the developer console and the code you provided.
So I have basically no idea how I can proceed and use the remotes.
Anyone able to help me :frowning: ?

1 Like

Some addition, tried with ZHA-Toolkit:

2025-03-24 00:01:22.222 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service: <ServiceCall zha_toolkit.ota_notify (c:01JQ2KTHNE7F7HN929NRKE2ZJ7): ieee=update.ikea_of_sweden_symfonisk_sound_remote_gen2_firmware, path=/config/zigpy_ota>
2025-03-24 00:01:27.080 ERROR (MainThread) [custom_components.zha_toolkit] Exception 'Failed to deliver message: <sl_Status.ZIGBEE_DELIVERY_FAILED: 3074>' for service call with data '{'zha_toolkit_version': 'v1.1.27', 'zigpy_version': '0.77.1', 'zigpy_rf_version': '0.43.0', 'ieee_org': 'update.ikea_of_sweden_symfonisk_sound_remote_gen2_firmware', 'ieee': '28:db:a7:ff:fe:86:1e:b1', 'command': 'ota_notify', 'command_data': None, 'start_time': '2025-03-23T23:01:22.234071+00:00', 'errors': ["DeliveryError('Failed to deliver message: <sl_Status.ZIGBEE_DELIVERY_FAILED: 3074>')"], 'params': {'dir': 0, 'tries': 1, 'expect_reply': True, 'args': [], 'kwargs': {}, 'read_before_write': True, 'read_after_write': True, 'path': '/config/zigpy_ota'}, 'PAR': {'cmd_id': None, 'endpoint_id': None, 'dst_endpoint_id': None, 'cluster_id': None, 'attr_id': None, 'attr_type': None, 'attr_val': None, 'code': None, 'min_interval': None, 'max_interval': None, 'reportable_change': None, 'dir': 0, 'manf': None, 'tries': 1, 'expect_reply': True, 'args': [], 'kwargs': {}, 'state_id': None, 'state_attr': None, 'state_value_template': None, 'force_update': False, 'allow_create': False, 'event_success': None, 'event_fail': None, 'event_done': None, 'fail_exception': False, 'read_before_write': True, 'read_after_write': True, 'write_if_equal': False, 'csvfile': None, 'csvlabel': None, 'download': None, 'path': '/config/zigpy_ota', 'use_cache': False, 'json_out': None, 'json_timestamp': False}, 'success': False}'

I did it like from here: ZHA Device Firmware Update Ikea Symfonisk - #6 by bigforblue

You have a typo in your config. You put otau_directory instead of ota_directory. That might be the issue.

Also this kind of devices (buttons and remotes) send events to HA and don’t usually expose entities. Are you sure this is not the problem?
You can go to Developer Tools > Events and liste for all events *.
Then press the buttons and see if you see events related to that remote.

1 Like

After connecting, forgetting and connecting it 5 or 6x it just works… :man_shrugging:

Hello - is this still capable/relevant at:

Installation method
Home Assistant OS
Core
2025.7.2
Supervisor
2025.07.1
Operating System
16.0
Frontend
20250702.2

I have several of these devices with unknown firmware statuses:

Thanks!

Did you figure it out? I’m starting with ZHA and I’m seeing something similar

Not sure. I will check and get back to you.

Don’t worry, I’ve moved to z2m . Thanks for answering!

Okay. No problem!