Closed aurbod closed 2 months ago
For reference this is my index.json created by add.js
cat index.json
[
{
"fileVersion": 302067713,
"fileSize": 131378,
"manufacturerCode": 4417,
"imageType": 515,
"sha512": "ae83e077d91fc4b2ca658c2d9754daa6675b632863f62aa1edd786bf909b2541c25b63752972b791be546527cecfca99c50c598085c3a948e72a206a95b99444",
"url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Telink/1141-0203-12013001-z03mmc.zigbee",
"path": "images/Telink/1141-0203-12013001-z03mmc.zigbee"
}
]
I've changed the url to /opt/zigbee2mqtt/data/ota/1141-0203-12013001-z03mmc.zigbee and removed the "path" entry, this did not work either.
Before starting OTA the device checks OTA file's header against manufacturer ID and device ID. In 1.1.0 vendor ID is 0xdb15 and device ID is 0x0203 You need to keep these values OR mangle them in OTA header. I just added options in tools/make_ota.py to let you set old values in the header and use your own ones in the binary.
Hi Ivan, thank you so much for your quick reply and fix! I was able to update my custom firmware as follows:
cd build/src/
python3 ../../tools/make_ota.py -m 0xdb15 -t 0x0203 z03mmc.bin
# This produced a file called db15-0203-11013001-z03mmc.zigbee
cp db15-0203-11013001-z03mmc.zigbee /opt/zigbee2mqtt/data/ota/
cat /opt/zigbee2mqtt/data/ota.json
[
{
"force": true,
"url": "/opt/zigbee2mqtt/data/ota/db15-0203-11013001-z03mmc.zigbee"
}
]
# Restarted zigbee2mqtt
That was it! Afterwards I did a manual update check in zigbee2mqtt, it detected the new firmware, the whole OTA took around 15 min. I've posted the result in issue #18
Thanks!
Hello! This is a follow-up question to issue #18 : I would like to create a custom firmware and upload it via OTA. So far, I have not been successfull. This is what I tried:
I ended up with a file 1141-0203-12013001-z03mmc.zigbee which I copied to my zigbee2mqtt OTA directory and I updated ota.json as follows:
However, it always says "No update available":
I even tried the add.js script from https://github.com/Koenkk/zigbee-OTA/tree/master to create my very own index.json, but this did not work either. Am I missing something? Do I need to change the "-DMANUFACTURER_CODE" in the build command?