Zigbee OTA (Over-The-Air) firmware update support to Zigbee End Device component on the NRF52 platform? And try to make it expandable for future Zigbee OTA Upgrade Cluster support on ESP32 platform? #3573
Replies: 8 comments 17 replies
|
I just noticed that z2m allow to use "custom firmware" for OTA. https://www.zigbee2mqtt.io/guide/usage/ota_updates.html#using-custom-firmware-files-or-index |
|
looking at the config values I guess it would generate image during building https://docs.nordicsemi.com/bundle/nrf5_sdk_thread_zigbee/page/zigbee_example_ota_server.html |
|
🏷️ I've automatically added the |
|
Any new thougths on adding native Zigbee Over-The-Air (OTA) support to allow standard Zigbee Over-The-Air Update (OTAU) via ESPHome? An idea here could be to also reach out about possible collaboration on this with the developer working on an external Matter component for ESPHome since he (DavidvtWout) have a similar dilema for how to update ESPHome-based devices using standard Matter OTA: |
|
Tip! Z2M dev nerivec maintains"Zigbee OTA File Editor" open-source tool that let you inspect and edit Zigbee OTA images from your browser: And zigpy/zha devs published a repository with a Python library for parsing and genereating Silicon Labs EBL, GBLv3, and GBLv4 OTA images: FYI, both Home Assistant's ZHA and Zigbee2MQTT support standardized Zigbee Over-The-Air (OTA) images and each have their own repo: ZHAZigbee2MQTT |
|
Hi all, here is a working proof of concept of firmware updates over Zigbee for ESPHome's native Zigbee support (ESP32-C6/H2, esp-zigbee-lib 2.0.5), as a regular OTA platform: ota:
- platform: zigbee
image_type: 0x0101 # one per kind of deviceHow it works
Code, write-up and test kit: draft PR in my fork, mmornati/esphome#1 (mmornati/esphome#1), branch external_components:
- source: github://mmornati/esphome@zigbee-ota
components: [zigbee]Tested on hardware: XIAO ESP32-C6 as router, Zigbee2MQTT 2.14.2 (EmberZNet coordinator). The device updated itself from Z2M:
Not done yet: sleepy end devices (they need fast polling during the download), delta images, a ZHA quirk, nRF52/Zephyr, docs. Credit to jabla, whose esphome-hiflow-zigbee Would the maintainers (luar123 tomaszduda23) be open to a PR along these lines? I'm happy to adapt it to how you'd like Zigbee OTA to fit in. Update (2026-10-29)
|
|
Maybe consider collaborating with DavidvtWout from the esphome-matter project as a similar solution will be likely be needed for Matter as for Zigbee: |
|
Marco Mornati (@mmornati) luar123 tomaszduda23 unless you already have a working releasionship with the Zigbee2MQTT devceliopers then if possible recommend first focus on getting it working with Home Assistant's native ZHA (Zigbee Home Automation) integration as that is not only the Zigbee Gateway which is built-into HA but that whole zigpy and zha Zigbee stack plus all its codebase and dependencies are owned/governed by the Open Home Foundation whom has its own developers (TheJulianJES and puddly) working on making that work as good as possible out-of-the-box (and ESPHome is also owned/governed by the Open Home Foundation). Maybe try reaching out to TheJulianJES (@TheJulianJES) who works on zigpy-ota? FYI, their zigpy-cli tool also has some specific functions/features related to OTA for Zigbee developers -> https://github.com/zigpy/zigpy-cli PS: If you want then also suggest reaching out to the co-funders of Apollo Automation for hardware samples to use as reference (like for example the official ESPHome Starter Kit, the ESPHome C6 Board, or their DEV-2 ESP32-C6 Development Board) since many of Apollo Automation's devices are based on ESP32-C6 (which as you know has a Zigbee radio) and read that they have several times informally expressed interest in using Zigbee on ESP32 in future commercial devices. I bet they would be glad to donate some hardware samples to you with no strings attached if it has the potential to help this cause. |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Component name
zigbee
Link to component documentation on our website
https://esphome.io/components/zigbee/
Describe the enhancement
It it possible to add ability to support for native Zigbee OTA updates to the Zigbee End Device component on the NRF52 platform?
That is, implement full support for the Zigbee ZCL OTA Upgrade Cluster (Zigbee Cluster Library's OTA Upgrade Cluster) and ZigBee Over-the-Air Upgrade (OTAU) firmware updates that enable wireless ESPHome OTA updates via the Zigbee protocol and preserving Zigbee connections after OTA updates.
Expect that a couple challanges would be the signifigant limited bandwith Zigbee has compared to WiFi
Anyway, this feature should allow users to update ESPHome devices configured as Zigbee devices over-the-air using standard Zigbee OTA.
Zigbee firmware over-the-air (Zigbee FOTA) library provides Zigbee endpoint definition, which implements clusters responsible for transferring a firmware file through the Zigbee network.
https://docs.nordicsemi.com/bundle/ncs-2.1.3/page/nrf/libraries/zigbee/zigbee_fota.html
Having native Zigbee OTA support is for sure a wanted feature in the long term, even if it will take a long time to get there.
In my personal opinion this core concept here to add native support for building Zigbee End Device with ESPHome is to allow you to built native Zigbee End Devices using ESPHome firmware, and when end-user have deployed/commisioning them they should not have to use the ESPHome protocol to perform OTA updates on them but instead use standard Zigbee protocol via pure Zigbee communication and be seen to the Zigbee gateway as standard Zigbee device that fully follows the official ZCL (Zigbee Cluster Library) specification.
Use cases
Use case is to be able to allow to update OTA image via Zigbee gateway that the device is connected to, e.g. ZHA or Zigbee2MQTT:
https://www.home-assistant.io/integrations/zha#ota-updates-of-zigbee-device-firmware
https://www.zigbee2mqtt.io/guide/usage/ota_updates.html
It is not user-friendly to if firmware updates of Zigbee devices require user to perform updates via Serial, Bluetooth or WiFi.
I imagine that if and when native Zigbee OTA support is added to ESPHome then it will create a new opportunity to make and sell finished Zigbee devices based on ESPHome that are not only meant for DIY enthusiasts but also for less advanced users who are just willing to buy an ESPHome device if it 100% works as a native Zigbee device, including supporting Zigbee OTA updates,
FYI; Apollo Automation (which is a commercial company that build devices using ESPHome and that also just last month was announced as the second official commercial partner to the Open Home Foundation) has several times expressed to their community that they want to be able to offer native Zigbee firmware for their devices as an option, so I would think it would be in their interest to make sure that some of their investments into ESPHome goes to adding Zigbee OTA support to it (i.e. they might be willing pay a developer to specificly work on that feature).
Anything else?
I believe that tomaszduda23 has recently put the fundamental prerequisites in place to achive this on Zephyr based devices like nrf52?
[nrf52,ota] zephyr mcumgr ota esphome.io#5740
https://esphome.io/components/ota/
So challenge might be more about how to build and package ESPHome firmware as native Zigbee OTAU file with correct metadata?
For reference; know that zigpy/zha project developers have some tools generating OTA index files and testing/checking them. Check out:
and
I believe luar123 mentioned before that he have no current plans to implement Zigbee OTA Update Cluster for the ESP32 platform as of yet.
Espressif's upstream ESP Zigbee SDK does however at least have support for Zigbee OTA Upgrade Cluster related APIs. See:
https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/user-guide/zcl_ota_upgrade.html
and
https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/api-reference/esp_zigbee_ota.html
Again, Bluetooth for OTA firmware updates should probably only be used as a workaround until there is native support for Zigbee OTA Update Cluster for both these platforms, but probably a good idea to add support for Bluetooth OTA firmware updates regardless, especially if it is simpler to add support for in ESPHome than native architecture for Zigbee OTAU Firmware (ZigBee Over-the-Air Upgrade) inside ESPHome, but I believe that sooner or later ESPHome will also need to have native support for building Zigbee firmware update images and allow pushing them over native Zigbee OTA (Over-The-Air) updates,
All reactions