Upgrading Hue dimmer with ZHA OTA

Thanks for your report. I’m glad you solved it already.
As you’ve already found out, some Philips Hue devices do require another intermediate update. These updates should also be in the zigbee-ota repo but it doesn’t seem to be present for your device (imageType: 270). This should probably be added in the future (and then marked with minFileVersion /maxFileVersion).

If you have another device that doesn’t update, you can check the “history” of the index.json file in the zigbee-ota repo, as it might contain links to the older updates.

1 Like

That might work for Zigbee2MQTT which uses zigbee-herdsman-converters as its dependency, but I do not think that just adding index.json to ZHA works which relies on zigpy library as its dependency. See:

https://github.com/zigpy/zigpy/tree/dev/zigpy/ota

versus

https://github.com/Koenkk/zigbee-herdsman-converters/tree/master/lib/ota

It + other ideas have however been discussed among zigpy developers but no one has implemented it:

https://github.com/zigpy/zigpy/issues/535

https://github.com/zigpy/zigpy/issues?q=is%3Aissue+ota

https://github.com/zigpy/zigpy/discussions?discussions_q=ota

1 Like

Lot of thank for your detailed answer!

Meanwhile I figured it out as HA dropped errors in it’s logs at OTA files initialization if I had the ‘trial’ .JSON at there.

curious if anyone having success updating their HUE devices? I manually downloaded the firmware files to the ota folder fron the .json file, updated the config to include the ota path… but there are more fields here than mentioned above - what is to be placed here?:

any ideas? or anyone successfully upgrade the firmware of their HUE devices using another method?

config:

zha:
  zigpy_config:
    source_routing: true
    network:
      channel: 25
      channels: [25]
    ota:
      inovelli_provider: false
      otau_directory: /config/zha_ota
logger:
  default: info
  logs:
    zigpy.ota: debug

looks like they are updating!

For anyone needing a quick start without reading the entire thread:

  1. Make directory within your config directory, “zha_ota” (my full path /config/zha_ota/)
  2. Manually download the firmware with manufacturer ID 4107 from here zigbee-OTA/index.json at 2035512f4f1aebd01599f4b76e1f219a634a5981 · Koenkk/zigbee-OTA · GitHub
  3. Upload the firmware to your /config/zha_ota/
    4.Specify otau_directory in your configuration.yaml
zha:
  zigpy_config:
    ota:
      otau_directory: /config/zha_ota
  1. Add some logging to your configuration.yaml
logger:
  default: info
  logs:
    zigpy.ota: debug
  1. Reboot HA, you should see in the logs, first it finds the firmware:
2022-12-28 11:35:34.708 DEBUG (SyncWorker_5) [zigpy.ota.provider] ImageKey(manufacturer_id=4107, image_type=260): /config/zha_ota/ConnectedLamp-Atmel_0104_5.130.1.30000_0012.sbl-ota, version: 1107326256, hw_ver: (None, None), OTA string: 

and then the bulbs actually updating:

2022-12-28 11:55:35.321 INFO (MainThread) [zigpy.zcl] [0x6FA8:11:0x0019] Updating: Philips LWO002
2022-12-28 11:55:54.279 INFO (MainThread) [zigpy.zcl] [0x5D3D:11:0x0019] Updating: Philips LWO002
2022-12-28 11:56:57.462 INFO (MainThread) [zigpy.zcl] [0x8249:11:0x0019] Updating: Philips 1743830V7
2022-12-28 12:00:10.082 INFO (MainThread) [zigpy.zcl] [0x3EA8:11:0x0019] Updating: Signify Netherlands B.V. LCD001
2022-12-28 12:04:28.445 INFO (MainThread) [zigpy.zcl] [0x007B:11:0x0019] Updating: Signify Netherlands B.V. LTD009

Takes some time to update, but seems to be working well. thanks for all the info!

4 Likes

FYI, newer Hue images are available here: zigbee-OTA/index.json at b569796dcc29f8a4f96f17ef3ef996612be4c749 · TheJulianJES/zigbee-OTA · GitHub
EDIT: Now in main repo again: zigbee-OTA/index.json at master · Koenkk/zigbee-OTA · GitHub
(download all images ending with “meethue.com” and put them in your ZHA OTA directory instead of the old ones)

They’ve been pulled from the main repo temporarily until Z2M is able to correctly parse all images. It already works fine with ZHA though.
EDIT: They’re in the main repo now.

3 Likes

amazing, thank you. is this something that will be kept updated? i’ll bookmark this bad boy…

out of curiosity… any reason this isn’t baked into HA/ZHA as is? probably stop a lot of zigbee issues with users running very old firmware…

1 Like

Just bookmark the main file: zigbee-OTA/index.json at master · Koenkk/zigbee-OTA · GitHub
The current Hue updates should be there soon-ish (when Z2M is fixed)The current Hue updates are there now and future Hue updates should be merged into the main repo, as soon as I get them.

I think OTA updates with HA’s update entities are planned but it could still take very long, due to time constraints and other stuff being important important.

Do you remember which file you downloaded? For the life of me i cannot get the firmware to update on my LWB014 bulbs. The file transfers to the bulb and then nothing updates. I have tried a bunch of different file versions that ive found and they wont update. I have 6 LWB014 bulbs and they are all on different fw versions.

1.15.2_r19181
1.23.0_r20156 x2
1.29.0_r21169
1.46.13_r26312 x2

Crappy thing is 1.46 is where the power on restore state was implimented. I have about 36 bulbs in total, so i know how to update the bulbs and where to get firmware files. A link to the working fw would be great!

Latest attempt was with : 100B-010C-01002100-ConfLight-Lamps_0012.zigbee

OTA upgrade progress: 99.8
OTA upgrade_end handler for 'Philips LWB014': status=Status.SUCCESS, manufacturer_id=4107, image_type=268, file_version=16786688

Did you try installing this first:
https://otau.meethue.com/storage/ZGB_100B_010C/2ef158a5-ffb4-43ac-9d59-3cb71078f6f7/100B-010C-01001A02-ConfLight-Lamps_0012.zigbee

and then this:
https://otau.meethue.com/storage/ZGB_100B_010C/0f7ed133-fa2f-48f6-810d-533fd1d4994a/100B-010C-01002500-ConfLight-Lamps_0012.zigbee

(So first, only put the 100B-010C-01001A02-ConfLight-Lamps_0012.zigbee file in your OTA directory, then update all bulbs to that and then do that with the other file)

1 Like

I did try:
100B-010C-01001A02-ConfLight-Lamps_0012.zigbee
from
https://raw.githubusercontent.com/Koenkk/zigbee-OTA/36b56b919320be2d7c941c6bf2
as i figured it may be too large of a change from one version to the next. I dug through the commit history to try to find an earlier version. I will give your link a go and see if it provides better results.

and yes, i have stripped all files out of the ota dir so i know its going to only use the one file there.

It seems to be working now. 5 of 6 updated to first iteration. 1.50.2_r30933 Working on the last LTW014.

Now to find older fw for :

  • LCA002 (on 1.93.11) ← no power on restore
  • LCT001 (on 67.93.11)
  • LCT002 (on 5.127.1.26581)
  • LCT014 (on 1.46.13_r26312)
  • LTW004 (on 5.50.1.16698) ← no power on restore

lol

Where are you getting the links for the fw files?
Im getting them from:
dresden-elektronik/deconz-rest-plugin
and
Koenkk/zigbee-OTA

Most links should be in the zigbee-ota repo. I’d need the OTA image ids those bulbs request.

I have a guide here: How to update the firmware of ZigBee devices using Home Assistant — Rudd-O.com

3 Likes

Thanks for the succinct guide.

Is there any way to update them in bulk instead of one by one with the IEEE Add.

Yes. You can create a HA script and add the call multiple times one for each sensor (use the YAML edit view to copy and paste).