-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQUEST] grab OTA files from https://github.com/Koenkk/zigbee-OTA/blob/master/index.json #535
Comments
FYI, there was a previous discussion about Zigbee device OTA firmware updates in #154 which might be relative or supersede this? |
Not superseded, but definitely related indeed. It's good that the tickets are separate but linked. |
I tried to download images from https://github.com/Koenkk/zigbee-OTA/tree/master/images/Xiaomi and all of them turned to be invalid OTA files according to zigpy:
Did I miss something? |
They parse fine for me. What is the full error traceback? |
It should be this:
|
I think you downloaded the HTML files instead of the actual OTA images: # Your file
In [11]: (168430090).to_bytes(4, 'little')
Out[11]: b'\n\n\n\n'
# GitHub HTML
In [12]: requests.get('https://github.com/Koenkk/zigbee-OTA/blob/master/images/Xiaomi/20201218113852_lumi.relay.c2acn01_0.0.0_0046_20201216_6BB0FD.ota').content[:4]
Out[12]: b'\n\n\n\n'
# File in the repo
In [13]: pathlib.Path('~/Downloads/OTA_lumi.flood.agl02_V1.0.18_20190814.20191008104903.ota').expanduser().read_bytes()[:4]
Out[13]: b'\x1e\xf1\xee\x0b' |
AAAAAAAAAAARGHHHHHH! 😆 |
But how do you update xiaomi? Do they have it's cluster? |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
Still an issue, dear little robot. |
Bump this discussion now that ITead has submitted an official OTA firmware for one of their Sonoff brander Zigbee devices to Koenkk’s repository as primary source for download. See: Originally posted by @Daniel-zhan-itead in zigpy/zha-device-handlers#1519 (comment)
|
Our ZHA user have already start updating there device with the firmware itead was submitted and its looks working OK in ZHA with local OTA files. The Z2M have some very serious issues then applaying bad frirmware for tuya TRVs and many Xiaomi devices that was not tested and was hard braking user devices so i think it better letting the user downloading there OTA files and doing it by hand and not linking to one external source that can having bad firmware for our devices (as IKEA was braking our controllers but it was all production firmware (and some test feed) that was bad). |
FYI, OpenHAB's Zigbee developers and users have also been discussed the idea of getting Zigbee OTA firmware images from GitHub repository/repositories and specifically parsing https://github.com/Koenkk/zigbee-OTA/blob/master/index.json and grabbing OTA files from https://github.com/Koenkk/zigbee-OTA/tree/master/images https://community.openhab.org/t/ikea-tradfri-firmware-updates/132042/63 And now the developer of OpenHAB's ZigBee Binding (who is also the developer of com.zsmartsystems.zigbee https://github.com/zsmartsystems/com.zsmartsystems.zigbee/ Zigbee Cluster Library Java framework/libraries it depends on) is apparently working on a somewhat similar GitHub Zigbee Firmware Provider backed by GitHub repository/repositories, using a GitHub Library Reader to parse "index.json" and will by default point to Koenkk's https://github.com/Koenkk/zigbee-OTA repo (that is also used by Zigbee2MQTT and IoBroker via zigbee-herdsman): openhab/org.openhab.binding.zigbee#767
|
FYI, pipiche38 look to be working on a similar GitHub OTA Firmware Provider for same"index.json" in Zigbee Plugin for Domoticz: zigbeefordomoticz/Domoticz-Zigbee#1293 zigbeefordomoticz/Domoticz-Zigbee#1294 @pipiche38 Could it not benefit all projects dependent on zigpy if you implemented that GitHub OTA Firmware Provider in zigpy? https://github.com/zigpy/zigpy/tree/dev/zigpy/ota https://github.com/zigpy/zigpy/blob/dev/zigpy/ota/provider.py |
We are only relying on RAW messages. Going to OTA level, will require to got to ZDO and ZCL from zigpy which is not the approach we have taken, as at the same time we support native zigate communication. Now, as firmware update is concerned, my personal opinion is that I'll never make thing smooth and transparent for the end user. I will make sure that a manual action is done , so the user is acting on that. |
FYI. |
FYI, puddly has just now added a new feature to the "zigpy-cli" tool that manufacturers can use to produce a skeleton JSON index from a given set of OTA files, and that way make sure manufacturers OTA files are correctly-structured so that they will be compatible with zigpy out-of-the-box. See the README.md for the "zigpy-cli" tool: https://github.com/zigpy/zigpy-cli/blob/dev/README.md#ota PS: puddly mentioned when adding that feature for generating OTA index files via zigpy-cli was done in preparation for some OTA rewrites in the main zippy library that he is planning to do. |
FYI, be sure to check out puddly's draft PR here which will add support for new open standard of Generic OTA providers -> #1165
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
Now that PR #1165 has been merged adding support for Generic OTA providers, can the wanted feature be achieved if would generate a JSON index file with zigpy-cli (https://github.com/zigpy/zigpy-cli/blob/dev/README.md#generate-ota-index-files) for the OTA images that are hosted on GitHub in Koenkk's zigbee-OTA repository at https://github.com/Koenkk/zigbee-OTA/ and if so then maybe Koenkk could be convinced to host such an alternative index in the same GitHub repository? An additional index file to https://github.com/Koenkk/zigbee-OTA/blob/master/index.json that instead follow zigpy's new JSON index file format as documented here in zigpy's wiki -> https://github.com/zigpy/zigpy/wiki/OTA-Information-for-Manufacturers |
We are going to go with a different approach for OTA and there are no plans to use the Z2M OTA repo at the moment. You're free to generate your own index file (or just clone it and use the file-based OTA provider). |
@Koenkk maintains a nice convenient list of OTA firmwares at https://github.com/Koenkk/zigbee-OTA
Would it be possible to automatically support grabbing OTA updates from https://github.com/Koenkk/zigbee-OTA/blob/master/index.json ?
The text was updated successfully, but these errors were encountered: