ZHA Firmware Update Guide

I’m having exactly the same problem. I’ve tried every firmware update guide out there, and none will work through ZHA for me. I’ve got one switch on 2.15 (and five more of those to install), 22 on 2.14, and 3 on 2.08. Every one of them indicates that they’re up to date.

I’ve tried adding the firmware to the zigpy_ota directory as per the guide and got nothing. Tried renaming the firmware to VZM31-SN_2.15.ota to make sure the syntax matched exactly and got nothing. Made sure the file was the right size. Changed the true/false flag for inovelli_provider. Rebooted after every step–no luck. Tried forcing the update with ZHA Toolkit, tried forcing through the Manage Zigbee Device dialog…no luck.

At this point, I’m either really doing something wrong, or I’m running into a software configuration problem that I’m just not seeing. Just checked my HA version, and I’m current at 2024.2.2.

…so I’m definitely watching to see what others are doing, because I seem to be striking out.

I saw this earlier today and I feel that maybe it’s a bug. This is what I see when I click on the Firmware Update for a switch:

But when I look at this in the Manage Zigbee Device page, it shows we are still out of date.


The firmware image available for ZHA is still set to 2.08, anything at or past that will appear as up-to-date until it’s updated.

1 Like

Do you know where that check lives, offhand? I was thinking about trying to just bypass this for now. I assume there’s some kind of a “registry” somewhere that defines latest versions that I could hack around.

It’s within the zigpy config and points to the json published by Inovelli. I’ll note though, it looks like they’re redoing the way zigpy handles OTA updates and may be worth just waiting for that to get merged in and you’ll be set.

What I’d really like from ZHA is an actual GUI that shows available versions for any particular device, including custom uploaded binaries (still requiring signatures, of course), and for them to provide a “force” option so we could ignore the version checks and perform downgrades. Maybe some day!

Thanks for pointing me in that direction… waiting for updated merge in core is probably the best bet, but I might get a little squirrelly and play with some simple regex on the JSON that it’s using for the registry to bump from v1.08 → v1.15 meanwhile.

Edit: Yeah, looks like this is where it’s pulling the registry from: https://files.inovelli.com/firmware/firmware-zha.json - here zigpy/zigpy/ota/provider.py at 4b77fc267d3c3edffae2e42cc9c17f0f85afc76e · zigpy/zigpy · GitHub

OK, so I was able to get this to work.

!!! THIS IS ADVANCED, AND YOU CAN BREAK YOUR ZHA FUNCTIONALITY IF YOU DON’T KNOW WHAT YOU’RE DOING; ONLY ATTEMPT THE FOLLOWING IF YOU UNDERSTAND WHAT THIS IS DOING, HOW TO UNDO IT, AND THAT LATER HA INSTALLS WILL OVERWRITE THIS ON ITS OWN - WAITING FOR OFFICIAL ZHA UPDATE IS PREFERRED !!!

OK, disclaimer out of the way… if you add the following patch to zigpy (/usr/local/lib/python3.12/site-packages/zigpy/ota/provider.py), it’ll find the latest firmware (only the line starting with fw_lst, this is in the Inovelli::refresh_firmware_list(...) func):

        self._cache.clear()
                                   
        fw_lst['VZM31-SN'].append({"version": "16908815","channel": "beta","firmware": "https://github.com/InovelliUSA/Firmware/raw/main/Blue-Series/Zigbee/VZM31-SN-2-1-Switch/Production/2.15/VZM31-SN_2.15-Production.ota","manufacturer_id": 4655,"image_type": 257}) 
                                                                                                                                                                                                                                
        for _model, firmwares in fw_lst.items(): 

This injects the 2.15 firmware JSON into the ZHA upgrade checker, so it’ll find it once you trigger the upgrade. I then restarted HA and manually triggered the firmware upgrade on the device (I used ZHA Toolkit). The switch found the firmware and flashed successfully (the ZHA updater UI actually worked fine at this point).

The better short-term fix would be for Inovelli to update the JSON at https://files.inovelli.com/firmware/firmware-zha.json to just include the 2.15 firmware (all this patch does is add that into the payload from that URL). Medium/longer term fix will be for ZHA to update (like chack mentioned) to hopefully fix manual_ota updates via the zigpy_ota directory again.

Anyway, if someone NEEDS to upgrade their switches meanwhile, you should be able to do the above… but avoid unless you know what you’re doing.

1 Like

This worked for me. I had to reset my inovelli_provider to true then it finally worked. ZHA_Toolkit did nothing for me without that and didn’t seem to do much for me anyways. Just wanted to add my two cents.

I think I’m in a similar situation. I tried using VS Code to open provider.py, but I don’t see a /usr/local/lib/python3.12/site-packages directory. The closest I see is /usr/local/lib/python3.11/dist-packages. Any idea where I’m going wrong?

This may be the explanation of why the custom OTA file update doesn’t work any more, and a workaround:

@EricM_Inovelli do you guys plan to update the ZHA json file at some point? This is resulting in a lot of folks having to do some circus to get firmware updates on their switches. Just curious if it’s intentional or not. :slight_smile:

Good news is that ZHA has changed the way they handle OTAs so we will be implementing the new method soon (probably in the next HA release). Also good news, the changes made to how ZHA handles updates has also made manual updates much easier. You can just add this to your configuration if you have a recent release of HA:

zha:
  zigpy_config:
    ota:
      z2m_remote_index: https://inov.li/omega/firmware-zha.json

I don’t recommend doing this yet though because there is a fingerprint change in the latest firmware that requires a change that will probably be in the May release of HA:

Add Inovelli VZM31-SN firmware 2.17 support by InovelliUSA · Pull Request #3076 · zigpy/zha-device-handlers (github.com)

5 Likes

Thanks for the update Eric :slight_smile:

I have been anxiously waiting for a while to try out the version with trailing edge control. I did the manual update by editing the zigpy ota and adding the 2.15 info.

Once I rebooted HA I saw the prompt and could update my switches. But I am happy to hear that it’s going to be available for the masses via one click in ZHA :slight_smile:

Instructions unclear. Updated 31 switches to 2.17.

(I kid; that was probably not smart and people should probably wait, but for what it’s worth, there doesn’t seem to be any problems running it prior to that PR being included in the next release. Now to dig through the Zigbee params and experiment, and see whether it fixes the flickering I had on 2 lights…)

@EricM_Inovelli Is this still the recommended URL? Reason I’m asking is that it doesn’t have version 2.18.

I’m on HA 2024.5.1 and I have tried every other suggestion I found around the community and nothing but this will works for me, the only down side is that if offers me to upgrade to 2.17.

I’m out of town, but will add 2.18 to the main manifest when I am back on Monday. In the meantime I believe you can use this manifest file (same url except for the end): firmware-218.json

2 Likes

FYI the 2.17 url in the current firmware-zha.json is incorrect; there’s an extra e in the hostname. I downloaded it locally, fixed the typo, and used z2m_local_index: /config/zigpy_ota/firmware-zha.json to finally get ZHA to show it as an available upgrade.

Which one is the “main manifest”? There seem to be so many manifests, and I don’t have any idea why there needs to be so many of them.

I thought perhaps it was to keep older versions of ZHA on older Inovelli firmware, but as far as I know, the versions of ZHA that check firmware-zha.json have the quirks for firmware 2.15, yet that file only has 2.08. And the switch to firmware-zha-v2.json just happened last month, and that file is also lagging at 2.08. While the OG manifest, firmware.json, that old versions of ZHA use (e.g, versions from around 2022) gets the latest.

Hi,

I recently installed my first Inovelli switches (Blue Series).
Now Home Assistant (2024.5.4) ask me to upgrade their firmware (through standard GUI updating method) but it fails.
I seem to understand that firmware v2.18 (0x01020212) may still be beta firmware.

Other than the fact that upgrading fails, is there a way of not being notified of beta firmwares ?

Hoping someone can help me out. I have a VZM31-SN in Home Assistant using ZHA. It’s currently reporting version 0x0102020f (2.15 I believe). I’m trying to get it to install 2.18. I’ve gone to the github page, downloaded the file (VZM31-SN_2.18-Beta.ota) and placed it in /config/zigpy_ota directory. I changed permissions on the directory and the file to 777

I’ve added this to my config and restarted home assistant

zha:
  zigpy_config:
    ota:
      inovelli_provider: false
      otau_directory: /config/zigpy_ota

the update just doesn’t seem to ever start. I tried using zha toolkit, but that gets a generic error when I issue the command. (search seems to indicate that maybe that is broken now). I’ve tried to follow Inovelli documentation on triggering the update but they don’t list a file version to input for 2.18. issuing the update command with the 2.15 file version didn’t do anything either. I’ve tried looking in logs but dont’ see anything interesting/telling in there. I did find where it “adds new ota providers” and noticed that Inovelli isn’t listed as a provider at all.

Any help would be appreciated. Thank you.