ZHA OTA Firmware Update / Upgrade

2024.3.0 is out! Anyone manage to get the new z2m OTA to work?

ie using:

zha:
  zigpy_config:
    ota:
      # Download the index over HTTPS
      z2m_remote_index: https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json
2 Likes

Yes, it works! I have one Xiaomi thermometer/hygrometer with Zigbee firmware. I updated my config this morning as described ba moelito and the next time i open Home Assistant it showed an available update in ZHA. The update took about 15 minutes. Happy user! :slight_smile:



1 Like

OMG, yes it works!
I was never able to get it to work before. Now I got a notification that an update is available and the process was click and go perfect!
Some screenshots:




2024-03-09 OTA progress

1 Like

What’s curious though, is that this particular device isn’t present in the Z2M OTA repository on https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json. Where did the OTA update come from? Not that I’m unhappy with it, of course not, I’d just like to understand everything.

Anyone had anything brick via an update through ZHA? I have 2 Fyrtur IKEA blinds and one of them did an update, dropped off the network, and now won’t join whatsoever no matter how often I reset… Thinking I’m gunna buy a new one to replace it and bust this one apart to debug but wanted to see if anyone had a similar experience.

Hi,
Can someone confirm if new firmware updates will infinitly wait for a manual decision to either install or skip?
Or will they automatically install after a while (zigbee devices typically solicit for updates a few times per day)?

I didn’t enable OTA updates yet as I don’t want to update specific devices
Best Eric

PS: The official ZHA documentation is not updated (yet?!). But I think this issue describes the new config settings:

zigpy:
  ota:
    # It's enabled by default
    enabled: true

    # Periodically send out a network-wide (including end devices!) image notification
    broadcast_enabled: true
    broadcast_initial_delay: 14400
    broadcast_interval: 14400

    # You probably do not need this, it's for development
    advanced_ota_dir: /path/to/raw/ota/files
    allow_advanced_ota_dir: ...

    # Points to Z2M OTA `index.json` if stored locally
    z2m_local_index: /path/to/z2m-ota/index.json

    # Points to Z2M OTA `index.json` URL
    z2m_remote_index: "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json"

Tuya devices are usually sold as white label products that are rebranded under many different names and models.

Be careful though as flashing wrong firmware will brick devices.

I have similar issues as @mrmontesa . Plus, ZHA crashes after the OTA of the Styrbar remote fails.

Any advice?

Any updates on this issue? I’ve moved to 2023.4 home assistant core and the problems persist, no OTA updates of any type.

I guess it depends on whether the OTA file is in the repository.
I have a different problem. I was prompted about availability of an update for my Aqara TRV. I installed it successfully and the version number increased. Afterwards HA says there’s another update, with an even higher version number. I’ve tried installing it many times, but I always end up with the version from after the first update. There’s no error, just doesn’t work.

My Zigbee devices stopped working.

After upgrading the firmware on my Skyconnect it works again.
Looks like the ZHA-integration does not find new OTA firmware for the Skyconnect and I can’t find in the documentation about Skyconnect firmware update config setting.

How do I get HA /ZHA to automatically find and notify me when a new firmware for the Skyconnect is published?

So is ZHA OTA update folder now working? I am trying to roll back my Aqara switches that I just got as the 5 button Ikea remote keeps turning them on and off.

1 Like

Hi! I have downloaded a file with a firmware upgrade from Legrand (a top quality vendor in Europe), but I don’t know how to send it to the device. It’s a Zigbee 3.0 shutter switch. Since it’s not a public download (requires registration), I don’t think it can be included in the aforementioned firmware repository.

Considering that I’m running 2024.2.1, what are my options?

Thanks a lot!

Just wanted to mention that I got the same:
Firmware update IKEA N2 remote does not conclude - Configuration / Zigbee - Home Assistant Community (home-assistant.io)

Did you find a solution?

I didn’t find a solution for this problem with my Aqara TRV’s. I also don’t know where to start looking.

Firmware upgrade via ZHA of the device (Ikea example) is working but sooo slow.
Updated a Ikea Dimmer today and it took more the 6 hours. Is there something I can do to speedup the firmware updates. I use a Sonoff USB Zigbee coordinator to connect to devices,

If the device is far away from the coordinator it will take longer, but zigbee updates are slow, tipically around 1h.

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)