Core: ZHA Ikea OTA Update Failing - Image size must be a multiple of 64 bytes

Created on 23 Oct 2020  路  2Comments  路  Source: home-assistant/core

The problem


The last couple of days I've noticed that an OTA update for one of my Ikea bulbs keep failing due to an invalid image size.
This is an automatic OTA, it is not one which I have manually supplied.

Environment

  • Home Assistant Core release with the issue: 0.116.4
  • Last working Home Assistant Core release (if known): N/A
  • Operating environment (OS/Container/Supervised/Core): Home Assistant OS
  • Integration causing this issue: zha
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/zha/

Problem-relevant configuration.yaml

zha:
  zigpy_config:
    ota:
      ikea_provider: true # Auto update Tr氓dfri devices
      ledvance_provider: true # Auto update LEDVANCE devices
      otau_directory: /config/zha/ota # Utilize .ota files to update everything else

Traceback/Error logs

020-10-23 15:43:22 WARNING (MainThread) [zigpy.ota.validators] Image OTAImageHeader(upgrade_file_id=200208670, header_version=256, header_length=56, field_control=<FieldControl.0: 0>, manufacturer_id=4476, image_type=16900, file_version=537040419, stack_version=2, header_string='GBL GBL_tradfri_sy5882_bulb_ws', image_size=208242) is invalid: Image size (208180) must be a multiple of 64 bytes

Additional information

zha

Most helpful comment

This is working as designed. IKEA servers return wrong firmware and devices would upload the firmware, reject it and repeat the cycle. To eliminate this, zigpy now does some sanity checks to firmware and rejects firmwares that look wrong.
Check https://github.com/zigpy/zigpy/issues/497 for more info.

You can download firmwares from http://fw.test.ota.homesmart.ikea.net/feed/version_info.json and put those into your configured zigpy_ota folder.
Alternatively you could configure zigpy to use "beta" ikea firmwares which have correct files by adding to configuration.yaml

zha:
  zigpy_config:
    ota:
      ikea_provider: true
      ikea_update_url: http://fw.test.ota.homesmart.ikea.net/feed/version_info.json

All 2 comments

Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with an integration (zha) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

This is working as designed. IKEA servers return wrong firmware and devices would upload the firmware, reject it and repeat the cycle. To eliminate this, zigpy now does some sanity checks to firmware and rejects firmwares that look wrong.
Check https://github.com/zigpy/zigpy/issues/497 for more info.

You can download firmwares from http://fw.test.ota.homesmart.ikea.net/feed/version_info.json and put those into your configured zigpy_ota folder.
Alternatively you could configure zigpy to use "beta" ikea firmwares which have correct files by adding to configuration.yaml

zha:
  zigpy_config:
    ota:
      ikea_provider: true
      ikea_update_url: http://fw.test.ota.homesmart.ikea.net/feed/version_info.json
Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartinHjelmare picture MartinHjelmare  路  3Comments

flsabourin picture flsabourin  路  3Comments

kirichkov picture kirichkov  路  3Comments

moskovskiy82 picture moskovskiy82  路  3Comments

arangates picture arangates  路  3Comments