Hi, I have a mix of Tradfri and Hue bulbs and units, and ZHA allows for OTA updates of Tradfri which is just peachy. But as Hue doesn’t publicly release their firmware, you have do some additional steps (if you have the firmware available.
I have gotten far, but I suppose I will need help to get to the finish line:
I have ZHA perfectly setup, and I am able to control everything.
I’ve added the following to my config yaml:
zha:
zigpy_config:
ota:
ikea_provider: true # Auto update Trådfri devices
ledvance_provider: true # Auto update LEDVANCE devices
otau_directory: /config/zigpy_ota # Utilize .ota files to update everything else
I’ve added the file found here to the specified folder, which I believe is the newest version of the dimmer switch firmware (please correct me if I am wrong).
Now, either the dimmer is going to update itself(?), or I have to force it. If I want to force it, how would I go about it? I suppose I have to send a cluster command, but which one?
I read this part of the documentation and my impression is that OTA is unavailable for Hue devices. There are two options to enable OTA, one for Ikea Tradfri and the other for LEDVANCE. What leads you to believe that enabling both of them will also make it work for Philips Hue?
Was it this line?
Note that the otau_directory setting is optional and can be used for any firmware files you have downloaded yourself.
My impression is it means any firmware you downloaded for Ikea or LEDVANCE. However, it seems to suggest that it’s for any vendor’s firmware. If that were true, it leads to the question of how do you tell ZHA to perform OTA with the Hue firmware if there’s no option for it (like for Ikea and LEDVANCE)?
EDIT
To be clear, I’m just thinking out loud here; as mentioned, I have no practical experience with this integration. If I was actually trying to get OTA to work with Hue, I would have exactly the same questions as you: how and when does OTA happen?
I’ve never gotten OTA updates to work for Hue devices using ZHA (and I went down the same rabbit hole that you have for weeks).
So, what I typically do every 3 months or so is unpair my Hue devices (remotes and motion sensors) from HA. Pair them up to my Hue bridge, wait for them to update, and then re-pair them to HA. This process usually takes me between 2-3 days.
Is it painful and tedious? Yes. Does it suck? Yes. But, at least the firmware gets updated (yay I guess?).
It appears it is possible with Deconz, and if you are able to locate a firmware.
I assume it will be the same with ZHA as well, I just got to wait for the project to mature a bit.
Fortunately, I am alone home this coming weekend, and I might migrate to Deconz, just to try updating and then migrate back to ZHA.
I tried to confirm that by inspecting the source code but my first attempt failed to even find the OTA option. I’ll try again later, when I have more time.
I too would like to know if anybody figures this out. Trying to update my Hue bulbs’ firmware with just Hassio+ZHA with no hub, so a solution here would be helpful.
If I figure it out, I’ll be sure to post back as well.
Create an zha_ota folder in /config on your Hass. Drop all files in there.
Then follow this, but uncomment (remove the #) otau_directory.
otau_directory should then point to /config/zha_ota.
Note: Philips Hue Dimmer cannot be upgraded like this yet (the OTA file from Philips doesn’t follow any standards.)
Edit: Thanks to puddly, the Hue Dimmer can now also be upgraded if you have that image.
After some time, some Philips Hue bulbs will request an OTA upgrade, but most don’t.
Use the zha.issue_zigbee_cluster_command service with the following args:
This will send image_notify to the bulb (the args are needed for some bulbs which is why it can’t be done through the Cluster UI of ZHA).
(Replace ieee with your Hue ieee you want to upgrade)
No worries!
In the future this should also work for the Hue Dimmer if/when zigpy validations of the OTA images change (perhaps adding a special case for the Hue images).
Most Hue images do follow the standard though and at least for me, it works with all my types of bulbs.
All the Zigbee OTA images on the zha_ota directory are already parsed on Home Assistant startup.
With Zigbee, the device needs to request an image and ZHA will look for the correct image to send (in the already parsed list of OTA images). If it finds one, then it will slowly send it to the device. If it doesn’t find one, it’ll simply send back a response that’s there no image.
As Philips Hue (Signify) doesn’t provide its OTA images directly (outside of the Hue Bridge), it’s quite problematic to fetch these images.
The zigbee-ota repo on GitHub (linked in the other post) already does a good job of collecting many OTA images for different devices. If you download all the images (from the “url”) "manufacturerCode": 4107, you will have all currently available images for Hue bulbs. (Important Note: Some Hue OTAs are directly on Philips’ servers while others are on Google’s servers)
The image_notify command basically tells the Zigbee device to ask the Coordinator (your Zigbee stick) to look for an update. Normally, this can be done through the GUI, but the Hue bulbs (and some other Zigbee devices) require these two additional arguments (which can only be provided by using the service call in the other post).
IKEA bulbs (and some Hue bulbs even) regularly ask for an OTA image, so at least for IKEA bulbs, the process is basically automated, as the ikea_provider always looks for the latest images (if IKEA doesn’t upload “corrupted” images again…)
It makes sense, and it is a shame that Hue does not publicly release Otas.
But until it does, I really think it makes sense to update the documentation with that part concerning making the service calls etc.
And even if a clever guy could automate the step of pulling the newest available hue firmwares and make the service call for you, that would be a great QoL improvement. Even if some of the Hue bulbs can ask for themselves, I assume it leaves out a lot.
Can’t do it with Philips Hue SML002 Outdoor PIR
I’m receiving some weird errors from zigpy.ota.provider
File is downloaded to OTA folder
Firmware for SML002 is same that’s used for SML001