Skip to content

Sonoff Zigbee OTA provider for Sonoff branded Zigbee devices by ITead #987

@Hedda

Description

@Hedda

Originally posted by @Daniel-zhan-itead in zigpy/zha-device-handlers#1519 (comment)

We have raised the pull request for the OTA update image on github https://github.com/Koenkk/zigbee-OTA/pulls.
Once it is approved, you can download the image and update the ZBMINI-L devices.

@Daniel-zhan-itead Great to see ITead has publicly published a first OTA file for a SONOFF branded Zigbee device on GiHub now.

https://github.com/Koenkk/zigbee-OTA/tree/master/images/Sonoff

Follow up question to that is if you at ITead can spare development time at extending the OTA provider for it in the zigpy library?

As you might know, this zigpy library is used as a dependecy by a few popular home automation software and having SONOFF Zigbee OTA provider support could potentially enable easier OTA upgrades for end-users of those in the future, and today include; ZHA integration for Home Assistant, Zigbee plugin for Domoticz (Domoticz-Zigbee project), and Zigbee plugin for Jeedom.

See zigpy OTA provider code (provider.py) in Python which include the URL links as source of Zigbee OTA files for direct download:

https://github.com/zigpy/zigpy/tree/dev/zigpy/ota

It will need a "SONOFF OTA Firmware provider" to handle image download (see "Skeleton OTA Firmware provider" for reference, as well as note provider.py also already has code to handle download of OTA files from IKEA, INOVELLI, and LEDVANCE as references).

https://github.com/zigpy/zigpy/blob/dev/README.md#zigbee-device-ota-updates

@Daniel-zhan-itead Tough before deciding to add that Koenkk's repository as URL link as source for SONOFF Zigbee OTA provider, can you at ITead please consider creating a new separate dedicated repository called "SONOFF_Zigbee_OTA" or similar under ITead's own official organization on GitHub and use that as your primary publishing location for all officially released Zigbee OTA files for Sonoff branded Zigbee devices?

https://github.com/itead

(That new repository would for example be called hxxps://github.com/itead/SONOFF_Zigbee_OTA or something like that).

Maybe also consider copying concept of index.json with metadata on all files like Koenkk repository has to make scripting easier:

https://github.com/Koenkk/zigbee-OTA/blob/master/index.json

zigpy and ZHA does not yet use this or other OTA Index files but Zigbee2MQTT allow users to use it locally as descibed here:

https://github.com/Koenkk/zigbee2mqtt.io/blob/develop/docs/guide/usage/ota_updates.md#local-ota-index-and-firmware-files

And of course README.md file which among other things could contain some basic information on how to update those:

https://github.com/Koenkk/zigbee-OTA/blob/master/README.md

Perhaps also as keeping some kind of CHANGELOG.md with changelog release history for each device firmware version:

https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/CHANGELOG.md

For ex. zbmini-l_v1.1.1_release_notes.md and so on with release notes for each version released + compounded changelog.

That way it will be a single trusted and official primary source of official Zigbee OTA files released by ITead, and that OTA provider source repository with your Zigbee OTA files could not only be used by zigpy as it could also be reused by other Zigbee implementations independently (both other open-source implementations as well as closed source and proprietary implementations).

PS: By the way, please also see this somewhat related discussion regarding here Koenkk zigbee-OTA repository -> #535

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions