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)