Closed muzzy124 closed 6 months ago
Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zha documentation zha source (message by IssueLinks)
I am also seeing this problem.
homeassistant | 2024-02-14 10:15:25.447 DEBUG (MainThread) [zigpy.zcl] [0xB441:1:0x0019] Received command 0x01 (TSN 71): QueryNextImageCommand(field_control=<FieldControl: 0>, manufacturer_code=4655, image_type=257, current_file_version=16908800)
homeassistant | 2024-02-14 10:15:25.448 DEBUG (MainThread) [zigpy.zcl] [0xB441:1:0x0019] OTA query_next_image handler for 'Inovelli VZM31-SN': field_control=0, manufacturer_id=4655, image_type=257, current_file_version=16908800, hardware_version=None, model='VZM31-SN'
homeassistant | 2024-02-14 10:15:25.448 DEBUG (MainThread) [zigpy.zcl] [0xB441:1:0x0019] No OTA image is available
homeassistant | 2024-02-14 10:15:25.449 DEBUG (MainThread) [zigpy.zcl] [0xB441:1:0x0019] Sending reply header: ZCLHeader(frame_control=FrameControl<0x19>(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 1>, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False), tsn=71, command_id=2, *direction=<Direction.Server_to_Client: 1>)
otau_directory is /config/zigpy_ota and the HACS ZHA toolkit update script's "Enable download" populates it correctly. I added VZM31-SN_2.15.ota into that directory, as well. I will admit I haven't yet figured out how it determines which file from that directory is appropriate as an OTA image for a particular device - is there a magic number in the OTA file or something?
Manually issuing cluster commands like query_next_image
and using otau_directory
was intended for development purposes, not for general use. ZHA now properly supports OTA for select providers automatically.
To that end, otau_directory
has been disabled because of severe incompatibility issues destroying Tuya devices. It will be replaced in the next release with something more robust, deprecating the use of ZHA toolkit for this purpose.
Ok. For regular updates presumably the current correct method is to just wait to be notified that an update is available? Is there a means of causing a specific image to be sent, for instance if the manufacturer supplies a beta binary?
Fwiw there will be plenty of questions like this, I think, because there are a lot of documents floating around suggesting triggering updates manually via issuing cluster commands - possibly this should be noted prominently in release notes or something.
Hm, if someone puts firmware images to otau folder, he/she should be aware of a risk to destroy tuya or any other device. A firmware update is dangerous in any case. So why we should disable this feature which is very needed for custom devices like in my case? Use z2m instead?
Hi
I have problem to update to new firmware on my LYWSD03MMC with firmware 0x01133001. I need to upgrade firmware because I have problem with battery life. I try to update to 1141-0203-11003001-z03mmc.zigbee.
2024-02-17 18:41:37.702 DEBUG (MainThread) [zigpy.zcl] [0x98C3:1:0x0019] OTA query_next_image handler for 'Xiaomi LYWSD03MMC': field_control=0, manufacturer_id=4417, image_type=522, current_file_version=18034689, hardware_version=None, model='LYWSD03MMC' 2024-02-17 18:41:37.723 DEBUG (MainThread) [zigpy.zcl] [0x98C3:1:0x0019] No OTA image is available
Hm, if someone puts firmware images to otau folder, he/she should be aware of a risk to destroy tuya or any other device.
As mentioned above, it's disabled temporarily and will be re-enabled in the next release with many improvements: https://github.com/zigpy/zigpy/pull/1340
at the moment you can "enable" otau folder with:
zha:
zigpy_config:
ota:
allow_file_providers: "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."
otau_directory: /config/zigpy_ota
The problem
In 2024.2.0 ota is somehow broken, I can't update devices with query_next_image command anymore. I haven't changed ZHA YML configuration but ZHA doesn't see updates in otau folder. (the device from the logs is a Xiaomi LYWSD03MMC flashed to custom pvvx's zigbee firmware with ota support. I did update it before via ZHA OTA)
What version of Home Assistant Core has the issue?
2024.2.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
zha
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response