-
Notifications
You must be signed in to change notification settings - Fork 28
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
OTA update in ZHA #7
Comments
Tried to follow restoring BLE but stumbled on these issues:
HA:
Any advice ? |
Download the file correctly. |
D'oh ! Embarrasing mistake on my side. Thank you, succesfully reflashed |
Do you have such an walkthrough for zigbee2mqtt? |
https://www.zigbee2mqtt.io/guide/usage/ota_updates.html#local-ota-index-and-firmware-files |
I followed the procedure but still not able to do the OTA update back to BLE. Z2M keeps telling me
|
Hello, If you have HomeAssistant OS, the configuration file must be like this:
|
This solved my problem and this trick is not written anywhere. Thanks so much! |
Unfortunately, OTA in zigbee2mqtt doesn't work for me either (HA OS). I've followed the manual, created override OTA index, tried many things, but it just doesn't work. If anyone has any other experience, please share. Only error I get is 'Failed to check if update available for 'Termometr 2' (No image available for imageType '522')' - it seems like z2m is just ignoring my local OTA index. |
Ok I've managed to make a progress - you don't add 'zigbee_ota_override_index_location' to the configuration.yaml file manually, but go to 'Settings' -> 'OTA Updates' -> fill in the 'OTA index override file name' field. And suddenly z2m sees it, even though the configuration.yaml looks the same as if I'd edited it manually. |
@rwronski try this guide. Personally I didn't validate it |
@pvvx where is the BLE .zigbee file for tuya TS0201? |
Hi, I have LYWSD03MMC with devbis fw 1.1.0 and I would like to migrate to ZigbeTLc fw or back to BT. I followed guides for Z2M and ZHA but without success. For example ZHA.. I added following to configuration.yaml:
the folder /root/config/zigpy_ota contains:
I called ZHA Toolkit: Trigger Device's Firmware Update service. The log contains:
there is one interesting message... I do not know what it means or if it is related to my issue...
Core 2024.2.2 It looks like the local OTA files are ignored... Can you see anything wrong? Any ideas what to try next? |
zigpy has disabled local providers because many people are breaking their devices with wrong OTA updates. The commit that does that is here: You can still do OTA updates using ZHA with the following yaml configuration:
|
After flashing the Zigbee firmware, is there a way to tell exactly which image was installed? I am unsure whether the image from pvvx or devbis were installed. HAOS |
Zigbee->BLE Files
Have you tried using "reconfigure"? Devices sometimes fall off if the coordinator is turned off for a long time (days) and the devices work through some Tuya Zigbee routers. |
I had that setup. But you might want to modify your text above that you copied here. The directory that is referenced is "zigpy_ota", but in your example config you have "zigbee_ota". I suppose it doesn't matter as long as config and actual directory name are the same. ;-) |
Just got it working thanks to this and this. My working code now: zha:
zigpy_config:
ota:
allow_advanced_ota_dir:
I understand I can *destroy* my devices by enabling OTA
updates from files. Some OTA updates can be mistakenly applied to the
wrong device, breaking it. I am consciously using this at my own risk.
advanced_ota_dir: /config/zigpy_ota |
Newer working config zha:
zigpy_config:
ota:
extra_providers:
- type: advanced
warning: I understand I can *destroy* my devices by enabling OTA updates from
files. Some OTA updates can be mistakenly applied to the wrong
device, breaking it. I am consciously using this at my own risk.
path: /config/zigpy_ota |
Even simpler zha:
zigpy_config:
ota:
extra_providers:
- type: z2m
url: https://raw.githubusercontent.com/pvvx/ZigbeeTLc/refs/heads/master/bin/index.json |
Dear all I tried a merge of the last 2 options but without success.
After that I get this error in ZHA:
|
If you're using Zigbee2MQTT and want to update your devices from devbis firmware to ZigbeeTLc using Over-The-Air (OTA) updates, follow these simple steps. Prerequisites
Step-by-Step Guide1. Download the Firmware File
2. Place the Firmware File in the Zigbee2MQTT Directory
3. Create a Custom OTA Index File
4. Configure Zigbee2Mqtt to Use the Custom OTA Index
5. Perform the OTA Update
6. Clean Up After the Update
Important Notes
|
How can I reflash the OTA image or downgrade it? I've managed to upgrade the firmware of a TS0201-TZ3000 to '0x01233001' (reported in ZHA), but the temperature reading reports -327.7 degrees C and the humidity is 655.4%. So something has gone wrong somewhere... |
This should be in main readme! Thank you! |
[Edit: Solved.] I'm trying this method to update from devbis firmware to ZigbeeTLc and I get this message:
Am I missing something?
I'm trying to update with db15-0203-79993001-Z03MMC_v0122.zigbee End of ota:
zigbee_ota_override_index_location: my_index.json
[
{
"url": "db15-0203-79993001-Z03MMC_v0122.zigbee",
"force": true
}
] Edit: A reminder to all to actually download the RAW firmware links, not the links that connect straight to github pages!(My update has now started... but it will take 23 minutes...) |
I have a TH03 from this Aliexpress listing. I'd like to OTA flash it to the custom firmware. I've confirmed the PCB matches the layout shown for TH03 devices, but it reports a manufacturerCode of 4742 and an imageType of 65535. Further, the file listed in I've downloaded index.json, and added the following entry:
I modified my configuration.yaml as described in the first entry here, and confirmed that ZHA is reading it. However, even after restarting home assistant, no firmware update shows as available for the device. Can anyone suggest why? |
"imageType": 514 (0x0202) The transition from Tuya to other variants is not included in the general index file.
In this case it is already "SonOff" :) Additional Zigbee OTA identifiers are already being introduced to help select the correct firmware and device, but there is no user interface or support in ZHA/Z2M yet. |
Sorry, what do you mean by this?
I see, that makes sense. Is there something wrong with my custom configuration that would cause it not to be recognized as an update for my device? Edit: Ah, I see - I'm misunderstanding the file description; the firmware I've been selecting is for installing Sonoff firmware on a ZigbeeTlc flashed device. Is there a documented process for zigbee OTA updating from the manufacturer firmware to ZigbeeTlc? |
It worked for me with this one index.json:
But there is no guarantee that the firmware in your device has the same IDs. |
Mine reports a manufacturerCode of 4742 and an imageType of 65535 when I check the cluster config, but this configuration doesn't show up as an available update. |
ZHA does not have an interface that would show the device IDs to the user for OTA. IDs can only be found in the log when OTA occurs. |
There is, but there is no interface. "image_type_id" for the given query is always 0xffff. |
Sorry, can you elaborate? How can I get the correct |
The device provides identifiers when requesting the Zigbee OTA function. See the Zigbee 3.0 specification... ZHA does everything to make OTA as difficult as possible for the user. |
I see. I tried to use ZHA Toolkit as documented in your first post to prompt an OTA update. However, I get the error "sl_Status.ZIGBEE_DELIVERY_FAILED". In the system logs I also see "Could not get ota object for ota_update_images, try again", and a parsing error from zigpy trying to deserialize a package with too-short data:
None of this leaves me any closer to figuring out how to get the device's image type, however. Any advice you have to offer would be much appreciated. |
No advice. |
Edit: I sent the following action, and suddenly an update shows up as available:
At a guess, the device simply hadn't checked for an update since I updated the file? |
Unfortunately, the update still won't apply - it times out trying to OTA, even with me pressing the button to wake the device up. |
OTA process interrupted? |
I have six Xiaomi sensors (model LYWSD03MMC-z) that I successfully updated via OTA using the configuration provided below. I am running Home Assistant version
I experienced some connectivity issues with one sensor. I retried the update 3-4 times, but it got stuck at 100% at one point. To resolve this, I moved the sensor closer to the controller, removed the battery for 5 seconds, and when it came back online, the update was successfully completed. The initial firmware version on these sensors was I am using the I also have another Xiaomi sensor, model |
|
There is any way to flash your firmware over the air? |
How can I manually trigger the update? I’ve added the firmware file |
Follow the ZHA documentation. Or ask the ZHA writers. There, with every new version, everything changes with OTA. |
My current version of the mess for ZHA OTA is this:
I create a local index.json and put it in /home/pvvx/zigpy_ota/
This has worked for the last few versions of ZHA. Due to the fact that the Tuya firmwares does not adhere to the Zigbee OTA standards, "Koenkk/zigbee-OTA" has problems. How it will be solved is unknown. Many Tuya devices have the same names and the same IDs for OTA. But the devices themselves are different... If you get an update announcement for Zigbee, do not rush to use it. First, make sure that this update is suitable for your device. |
OTA update in ZHA.
The "configuration.yaml" file must have a directory assigned to the OTA files and the "ZHA Toolkit" installed.
For example, the directory name will be: “/zigbee_ota”
Place the new FW version files "*.zigbee" or "index.json" from bin into this directory ("./zigbee_ota").
Restart ZHA (preferably the entire Home Assistant).
Update in new versions of Home Assistant:
Update in ZHA Toolkit:
Doesn't work in the new version of ZHA!
https://github.com/mdeweerd/zha-toolkit#ota_notify---downloadtrigger-device-fw-update
Go to “Developer tools” -> “SERVICES” and select “ZHA Toolkit: Trigger Device's Firmware Update”.
Select “Device Reference” and click “CALL SERVICE”.
After some time, 15..20 minutes, the firmware number will change:
To restore to BLE, use the Zigbee OTA file with the same number device from: https://github.com/pvvx/ATC_MiThermometer/tree/master/zigbee_ota
After running Zigbee OTA, be sure to delete this file or files from the update directories for Zigbee OTA and completely restart z2m/zha. Otherwise, with the new Zigbee firmware, this update in BLE will work again.
The text was updated successfully, but these errors were encountered: