Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental feature: OTA updates #2921

Open
Koenkk opened this issue Feb 8, 2020 · 316 comments
Open

Experimental feature: OTA updates #2921

Koenkk opened this issue Feb 8, 2020 · 316 comments
Labels

Comments

@Koenkk
Copy link
Owner

@Koenkk Koenkk commented Feb 8, 2020

This feature allows to OTA update your devices, documentation is available here: https://github.com/Koenkk/zigbee2mqtt.io/blob/develop/docs/information/ota_updates.md

  • Requires latest zigbee2mqtt dev branch.
  • Currently it's only available for IKEA TRADFRI devices, don't ask if device X can also be supported but rather search for the firmware files (if available). If they are available it could be implemented.
  • No guarantees, but I don't think it's possible to brick your devices with this. The device will only start upgrading once the image is valid. So don't worry if an update fails or is interrupted.
@Koenkk Koenkk added the enhancement label Feb 8, 2020
Koenkk added a commit to Koenkk/zigbee2mqtt.io that referenced this issue Feb 8, 2020
@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

Are results only logged or is there a mqtt message also? Will update once I get home.

Also sources for other manufacturers

These are all that I know of, Hue doesn’t post them and encrypt there API, Innr responded that they will not publish firmware either.

@timstanley1985

This comment has been minimized.

Copy link
Contributor

@timstanley1985 timstanley1985 commented Feb 8, 2020

Successfully updated a tradfri bulb! 🎉🎉

Having to watch the logs on info level is a pain though. Can you add an mqtt message that confirms if an update is available or not and a couple of messages that say updated started and then update successful/unsuccessful please.

@atxbyea

This comment has been minimized.

Copy link

@atxbyea atxbyea commented Feb 8, 2020

So I just upgraded to the latest dev branch to check on the tradfri ota feature, however I don't see anything in the logs when I try, running Starting zigbee2mqtt version 1.10.0-dev (commit #5e152f2) and trying to push the following to mosquitto mosquitto_pub -h 192.168.1.40 -u user -P password -t "zigbee2mqtt/bridge/ota_update/check" -m "Stue Stuebord"

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

There is currently a problem with the docker builds, so they don't support OTA yet.

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

Fixed, OTA is available on latest-dev docker now.

@copystring

This comment has been minimized.

Copy link

@copystring copystring commented Feb 8, 2020

I'm currently doing an OTA. Yeah. It is really slow but ok. But waiting for it to finish I think it does make sense to log a message with the current state in % of the update lets say every 60 seconds regardless of progress.
That way I know for sure if the OTA is still running or already finished. Helps a lot when there is a lot going on like in my network with 60+ devices sending a lot of messages.

@PedroLamas

This comment has been minimized.

Copy link

@PedroLamas PedroLamas commented Feb 8, 2020

Fixed, OTA is available on latest-dev docker now.

Fantastic!! WIll update my local docker instance and report back in a bit once it updates the 2 smart plugs I have! 😄

Salus https://eu.salusconnect.io/demo/default/status/firmware?timestamp=0

If no one does the Salus integration before, I can take a look... I have a Salus SP600 that I'm not using and will be willing to "sacrifice" it!

@way2many

This comment has been minimized.

Copy link
Contributor

@way2many way2many commented Feb 8, 2020

I'm trying to update a Ikea dimmer ICTC-G-1 but it fails:

info  2020-02-08 21:00:26: Checking if update available for 'Dimmer: Salon'
info  2020-02-08 21:00:27: Update available for 'Dimmer: Salon'
info  2020-02-08 21:00:27: Starting update of 'Dimmer: Salon'
info  2020-02-08 21:00:29: Update of 'Dimmer: Salon' at 0%
error 2020-02-08 21:00:38: Failed to call 'OTAUpdate' 'onMQTTMessage' (Error: Update failed with code '149'
    at fulfilled (/app/node_modules/zigbee-herdsman-converters/ota/common.js:126:24))

Device is awake. What is error code 149?

@PedroLamas

This comment has been minimized.

Copy link

@PedroLamas PedroLamas commented Feb 8, 2020

I'm having the same issue as @way2many while trying to update my IKEA Tradfri E1603/E1702 smart plugs

Correction, it's actually a timeout error.

zigbee2mqtt:info  2020-02-08 21:04:15: Checking if update available for 'SmartPlug1'
zigbee2mqtt:error 2020-02-08 21:04:25: Failed to call 'OTAUpdate' 'onMQTTMessage' (Error: Timeout - 65430 - 1 - null - 25 - 1 after 10000ms
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7))
@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

image

149 = 0x95, not sure why it happens try removing power from the device for a minute and try again.

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

I tried both my currently paired trådfri bulbs and repeated, some have no update (but have old firmware AFAIK) and some throw

zigbee2mqtt:info  2020-02-08 21:08:48: MQTT publish: topic 'zigbee2mqtt/masterbedroom/repeater', payload '{"linkquality":34}'
zigbee2mqtt:info  2020-02-08 21:09:04: Checking if update available for 'masterbedroom/repeater'
zigbee2mqtt:error 2020-02-08 21:09:14: Failed to call 'OTAUpdate' 'onMQTTMessage' (Error: Timeout - 47816 - 1 - null - 25 - 1 after 10000ms
    at Timeout.object.timer.setTimeout [as _onTimeout] (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10))

That error I get for my repeater and for my remotes.

@PedroLamas

This comment has been minimized.

Copy link

@PedroLamas PedroLamas commented Feb 8, 2020

I've corrected my comment above as my error actually matches what @sjorge is getting (timeout).

I'm using pihole and a bunch of other stuff, I wonder if this is related... here's my docker configuration just in case (the volume mappings for zigbee-herdsman-converters and homeassistant-extension are currently disabled, I just haven't pushed the changes yet): https://github.com/PedroLamas/nanopineo2-docker-config/blob/master/docker-compose.yml

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

@PedroLamas I'm not sure, I can download the json file from the url in ota/tradfri.js just fine.
And for my bulbs it reports no update.

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

It seems it doesn't work well for the battery powered devices yet, only for bulbs ATM.

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

It seems it doesn't work well for the battery powered devices yet, only for bulbs ATM.

Repeater is mains power though, and I am 100% sure that one should have an update.

@PedroLamas

This comment has been minimized.

Copy link

@PedroLamas PedroLamas commented Feb 8, 2020

Like @sjorge said, same would apply to Tradfri smart plugs!

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

Could indeed also reproduce it for my plug, will investigate

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

Did some more investigating, all my bulbs (that I have paired) are already up to date. And other things (remotes and repeater) are failing.

Both repeat and remotes do have updates, I just verified in the json file.

@kiall

This comment has been minimized.

Copy link
Contributor

@kiall kiall commented Feb 8, 2020

Looking forward to seeing this work - I know loads of my stuff is out of date! I tried to update an IKEA bulb, and got this.. happy to help debug tomorrow if there's new code or some pointers.

EDIT by koenkk: don't post logs here, it makes the issue unreadable: https://pastebin.com/grs4KpUF

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

So for the battery powered devices, you need to wake it up right before sending the MQTT command, updating a TRADFRI 5 button remote control now, fingers crossed.

Update 1: compared to the bulbs I've updated, update goes incredibly slow, bottleneck is on the side of the remote control, which is not that strange.

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

I had mine awake (On/Off) as I was turning on and of the lamp before doing the request.

zigbee2mqtt:info  2020-02-08 22:00:15: Checking if update available for 'bedroom/desk_lamp/remote'
zigbee2mqtt:info  2020-02-08 22:00:16: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":31,"click":"off"}'
zigbee2mqtt:info  2020-02-08 22:00:16: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:00:17: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":31,"click":"off"}'
zigbee2mqtt:info  2020-02-08 22:00:18: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":31,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:00:18: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":31,"click":"off"}'
zigbee2mqtt:info  2020-02-08 22:00:19: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":31,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:00:20: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":31,"click":"off"}'
zigbee2mqtt:info  2020-02-08 22:00:21: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:00:21: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"off"}'
zigbee2mqtt:info  2020-02-08 22:00:22: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:00:23: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"off"}'
zigbee2mqtt:info  2020-02-08 22:00:24: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp', payload '{"state":"OFF","brightness":254,"color":{"x":0.4595,"y":0.4084},"color_temp":369}'
zigbee2mqtt:info  2020-02-08 22:00:24: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/bulb', payload '{"state":"OFF","linkquality":28,"brightness":254,"color":{"x":0.4595,"y":0.4084},"color_temp":369}'
zigbee2mqtt:info  2020-02-08 22:00:24: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:00:25: MQTT publish: topic 'zigbee2mqtt/bedroom/desk_lamp/remote', payload '{"battery":74,"linkquality":28,"click":"off"}'
zigbee2mqtt:error 2020-02-08 22:00:25: Failed to call 'OTAUpdate' 'onMQTTMessage' (Error: Timeout - 26399 - 1 - null - 25 - 1 after 10000ms
    at Timeout.object.timer.setTimeout [as _onTimeout] (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10))

I can't pair my other bulbs again for some reason, I have the I can't pair anything bug again :(
I think because the coordinator has too many routes, all device seem to have a direct route to it and a route via the repeater -> bulb -> battery devices.

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Feb 8, 2020
@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

I've pushed some small improvements to the latest dev branch

@sjorge my on/off remote also refused to update, I then replaced the battery with a new one, executed update request and it worked!

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

Mine are at 74% and 87% respectively... I wonder if it needs 100%?

Edit, maybe above 75% or something, my other remote was at 87 not 93... and it seems to work now with the latest change?

zigbee2mqtt:info  2020-02-08 22:57:20: MQTT publish: topic 'zigbee2mqtt/bedroom/night_light/remote', payload '{"battery":87,"linkquality":0,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:57:20: Checking if update available for 'bedroom/night_light/remote'
zigbee2mqtt:info  2020-02-08 22:57:20: MQTT publish: topic 'zigbee2mqtt/bedroom/night_light/remote', payload '{"battery":87,"linkquality":0,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:57:21: MQTT publish: topic 'zigbee2mqtt/bedroom/night_light/remote', payload '{"battery":87,"linkquality":0,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:57:22: MQTT publish: topic 'zigbee2mqtt/bedroom/night_light/remote', payload '{"battery":87,"linkquality":0,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:57:23: MQTT publish: topic 'zigbee2mqtt/bedroom/night_light/remote', payload '{"battery":87,"linkquality":0,"click":"on"}'
zigbee2mqtt:info  2020-02-08 22:57:23: Update available for 'bedroom/night_light/remote'

Will try updating.

Edit 2:

zigbee2mqtt:info  2020-02-08 22:59:29: Update of 'bedroom/night_light/remote' at 0%

That is a good start... i wonder if I need to keep periodically click it?

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Feb 8, 2020

@sjorge great that it started, you only have to press it once (right before), once you see Update of 'bedroom/night_light/remote' at 0% the device stays awake by itself. Progress will be logged at the following percentages: [1, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 100]

@PedroLamas

This comment has been minimized.

Copy link

@PedroLamas PedroLamas commented Feb 8, 2020

Here's what I get with the latest dev version from my Tradfri smart plug:

zigbee2mqtt:info  2020-02-08 23:14:37: Checking if update available for 'SmartPlug1'
zigbee2mqtt:error 2020-02-08 23:14:47: Failed to call 'OTAUpdate' 'onMQTTMessage' (Error: Device didn't respond to OTA request
    at getDeviceInfo (/app/node_modules/zigbee-herdsman-converters/ota/tradfri.js:18:15))
@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Feb 8, 2020

@Koenkk great... looks like it is at 10% now, the repeater still gets the timeout though.

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Mar 15, 2020

@kiall @CodeFinder2 @BastianWie please keep this discussion here: #3118

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Mar 15, 2020
@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Mar 15, 2020

Latest Zigbee2mqtt dev branch adds OTA updates for (some) Hue devices 😄 (thanks to @kiall for getting this started 👍 )

@kiall

This comment has been minimized.

Copy link
Contributor

@kiall kiall commented Mar 15, 2020

Latest Zigbee2mqtt dev branch adds OTA updates for (some) Hue devices (thanks to @kiall for getting this started )

Guess I may as well be the first (or among the first) to try it. 8.47% and counting - 31 mins remaining apparently.

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Mar 15, 2020

@kiall hope you have better luck than me, my only hue bulb (very old E14) is stuck at 0 for about 10 minutes now.

Looks like the first block keeps failing and the coordiantor does a new route request but then hits a

1004	75.402190	0xbac8	0x0000	ZigBee	83	Network Status, 0x6ab9: Non-tree Link Failure

Edit, power cycling the bulb makes it pick work... didn't have to redo the upgrade request!

{
  "type": "ota_update",
  "message": "Update of 'bedroom/desk_lamp/bulb' at 8.73%, +- 47 minutes remaining",
  "meta": {
    "status": "update_progress",
    "device": "bedroom/desk_lamp/bulb",
    "progress": 8.73
  }
}
@kiall

This comment has been minimized.

Copy link
Contributor

@kiall kiall commented Mar 15, 2020

@kiall hope you have better luck than me, my only hue bulb (very old E14) is stuck at 0 for about 10 minutes now.

I kinda did - also an older E14 (LWT012) - it went to 19.4% and hit a timeout (device didn't request any blocks). I'll poke around the logs & code tomorrow and see if maybe allowing more time helps.. it's too late here to really start mucking around with things!

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Mar 15, 2020

I also saw the bulb request a like 4x in rapid succession an OTA block, then the coordinator seems to do a route request and the bulb ignores it. After a off/on (physical) it is only requesting one block at a time 🤷‍♂

Looks like I am doing better than you @kiall

{
  "type": "ota_update",
  "message": "Update of 'bedroom/desk_lamp/bulb' at 28.67%, +- 30 minutes remaining",
  "meta": {
    "status": "update_progress",
    "device": "bedroom/desk_lamp/bulb",
    "progress": 28.67
  }
}

Maybe try again after physically power cycling the bulb tomorrow.

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Mar 15, 2020

I made it!

{
  "type": "ota_update",
  "message": "Update of 'bedroom/desk_lamp/bulb' at 100%",
  "meta": {
    "status": "update_progress",
    "device": "bedroom/desk_lamp/bulb",
    "progress": 100
  }
}

@Koenkk it came back about 3 seconds after this message was posted!

{
  "type": "ota_update",
  "message": "Finished update of 'bedroom/desk_lamp/bulb'",
  "meta": {
    "status": "update_succeeded",
    "device": "bedroom/desk_lamp/bulb",
    "from": {
      "softwareBuildID": "1.29.0_r21169",
      "dateCode": "20170908"
    },
    "to": null
  }
}
@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Mar 15, 2020

Still seems to show the old softwareBuildID even after restarting z2m ...

@Koenkk I'm not sure it worked, I can't get it to get the newer version and the bulb (9290012573A) still doesn't seem to support hue_power_on_behavior to recover... which makes sense if it didn't complete the update

Doing a manual OTA check returns no update available, before it did so I'm not sure if the bubl is stuck in a sort of limbo or not.

Edit: looks like it does work, but if you turn of the bulb... wait 3 sec the physically cut the power... it doesn't work... it needs a good 10 seconds in the 'off' state before it is remembered on power cut, that is fine. So it did get updated, just the version being read is cached and wrong... can we perhaps make ota_update/check also reread the version?

@dreimer1986

This comment has been minimized.

Copy link

@dreimer1986 dreimer1986 commented Mar 16, 2020

@ophilips Hosting firmware something else might be a licensing issue as Osram owns there firmware. Regardless of that: Having an option to push all the devices to the latest known firmware would be a great feature as Osram isn´t really willing to help to push the no longer supported devices to any new firmware they itself offer. There gateway never pushed newer firmware updates to the devices regardless if they exists and the support always said "working as designed". I have multiple plugs from Osram and they all have different firmware versions and I was using the Osram gateway. By the way, the Osram firmware can be found here: http://s3-eu-west-1.amazonaws.com/lightify-osram-firmware/

@kiall

Here is an XML file containing all the Osram firmware files (not the Ledvance ones) with direct download URLs, maybe its helpful. Just be carefully as it seamed some of the files have similar names just a different subfolder.

Osram_Firmware_Index(Rename_to_XML).txt

OK this would fix the last few non LEDvance Osram devices... Sounds like a great addition.

@torerikk

This comment has been minimized.

Copy link

@torerikk torerikk commented Mar 20, 2020

I have an IKEA E1603/E1702 that I tried to upgrade yesterday that no longer responds to anything. The light is off, disconnecting it and leaving it for 10 minutes before reconnecting does nothing, the reset button does nothing, so I fear it's bricked.

The whole OTA process went fine, but the last message puzzled me a bit:

MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"ota_update","message":"Finished update of '1st_floor/living_room/subwoofer'","meta": "status":"update_succeeded","device":"1st_floor/living_room/subwoofer","from":{"softwareBuildID":"1.4.020","dateCode":"20180528"},"to":null}}'

If it was updated from 1.4.020 to null then I guess that would explain why it's dead 😉

Any ideas on what I can do to revive it?

@dreimer1986

This comment has been minimized.

Copy link

@dreimer1986 dreimer1986 commented Mar 20, 2020

Try a factory reset. I think it was 6 times quickly power on off on IKEA lamps

@torerikk

This comment has been minimized.

Copy link

@torerikk torerikk commented Mar 20, 2020

I feel silly now.. thought I'd everything correctly, but must have missed something.. left the plug unplugged for about an hour then pressed the reset button for at least 5 seconds (probably more) and now it's alive again.. :)

@kiall

This comment has been minimized.

Copy link
Contributor

@kiall kiall commented Mar 20, 2020

So, I understand the "to": null thing for battery devices, but I left a E1810 updating today and just checked back in on it.

MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"ota_update","message":"Finished update of 'remote_1_landing'","meta":{"status":"update_succeeded","device":"remote_1_landing","from":null,"to":null}}'

from null to null is a new one for me - seems to be working fine, but thought I'd mention it here as a FYI.

@vide

This comment has been minimized.

Copy link

@vide vide commented Mar 24, 2020

Philips 324131092621 page says that it supports OTA updates but in my installation it does not work, I see this in the logs

zigbee2mqtt:debug 2020-03-24 10:20:29: No converter available for '324131092621' with cluster 'genOta' and type 'commandQueryNextImageRequest' and data '{"fieldControl":0,"manufacturerCode":4107,"imageType":265,"fileVersion":1107314102}'

I'm using 1.11.0

@Koenkk

This comment has been minimized.

Copy link
Owner Author

@Koenkk Koenkk commented Mar 24, 2020

@vide you need zigbee2mqtt 1.12.0 for hue otas

@kiall thanks, I will look into it how to make this more stable.

@vide

This comment has been minimized.

Copy link

@vide vide commented Mar 24, 2020

@Koenkk tried with 1.12.0 (commit #840b9d9)) and now I get:

$ mosquitto_pub -t zigbee2mqtt/bridge/ota_update/update -m 0x0017880106362bb1

zigbee2mqtt:debug 2020-03-24 20:35:19: Received Zigbee message from 'philips_mando_1', type 'read', cluster 'genTime', data '["time"]' from endpoint 1 with groupID 0
zigbee2mqtt:debug 2020-03-24 20:35:19: No converter available for 'QBKG04LM' with cluster 'genTime' and type 'read' and data '["time"]'
zigbee2mqtt:debug 2020-03-24 20:35:29: Received MQTT message on 'zigbee2mqtt/bridge/ota_update/update' with data '0x0017880106362bb1'
zigbee2mqtt:info  2020-03-24 20:35:29: Updating '0x0017880106362bb1' to latest firmware
zigbee2mqtt:info  2020-03-24 20:35:29: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"ota_update","message":"Updating '0x0017880106362bb1' to latest firmware","meta":{"status":"update_in_progress","device":"0x0017880106362bb1"}}'
zigbee2mqtt:debug 2020-03-24 20:35:34: Updating to latest '0x0017880106362bb1' (RWL021)
zigbee2mqtt:debug 2020-03-24 20:35:34: Using endpoint '2'
zigbee2mqtt:error 2020-03-24 20:35:39: Update of '0x0017880106362bb1' failed (Device didn't respond to OTA request)

battery is brand new, dimmer is next to the antenna and dimmer is awake (button pressed a few seconds before, working).

I have the exact same behaviour with an Ikea Tradfri E1810

Don't know if it may matter but both remotes are bound to other devices (lamps)

@lvefferen

This comment has been minimized.

Copy link

@lvefferen lvefferen commented Mar 25, 2020

I fear I bricked 2 ikea smart plugs, after succesful update, the devices stopped working. left them out of sockets for multiple hours. did resets (holding the pinhole for 10s). Tried to re-join but no cigar. As far as I can see, the plugs don't even try to re-join. no evidence in z2m debug logs. stopped updating now have some 12 plugs to go. Updated HUE lights as well and the had no problem. Any hints/tips to revive them?

@vide

This comment has been minimized.

Copy link

@vide vide commented Mar 25, 2020

@lvefferen maybe you already did it but before/after factory-resetting them, did you remove them from zigbee2mqtt? I had to do this to rejoin one of my remotes after factory-resetting it

@lvefferen

This comment has been minimized.

Copy link

@lvefferen lvefferen commented Mar 25, 2020

@lvefferen maybe you already did it but before factory-resetting them, did you remove them from zigbee2mqtt? I had to do this to rejoin one of my remotes after factory-resetting it

Just tried to remove them, had to use force remove to get rid of them. but afterwards the plugs are not re-joining. any other hint are welcome.zigbee2mqtt/bridge/config/force_remove

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Mar 25, 2020

@lvefferen have you tried stopping z2m, unplugging and replugging the coordinator usb, then starting z2m and try to pair again?

@kiall

This comment has been minimized.

Copy link
Contributor

@kiall kiall commented Mar 25, 2020

And, since nobody has asked.. have you set permit_join to true? (Either in config, or via MQTT).

I know I've lost time trying to figure out "broken devices" because I forgot this step ;)

@lvefferen

This comment has been minimized.

Copy link

@lvefferen lvefferen commented Mar 25, 2020

And, since nobody has asked.. have you set permit_join to true? (Either in config, or via MQTT).

I know I've lost time trying to figure out "broken devices" because I forgot this step ;)

I know, I've been there also. but this time I did.

@lvefferen have you tried stopping z2m, unplugging and replugging the coordinator usb, then starting z2m and try to pair again?

This seems to be the golden tip, restarted Z2M multiple time, but I never unplugged the coordinator physically. Probably the issue is OTA update unrelated.

@sjorge

This comment has been minimized.

Copy link
Contributor

@sjorge sjorge commented Mar 25, 2020

@lvefferen see #3177 I have this issue a while ago, I think also around the time I started doing OTA updates. I think it might have been the ZB 3 enabling updates to some trådfri bulbs/repeater that triggered it.

Hopefully I have some time to update the issue with more package captures this week.

@aXionDevelopment

This comment has been minimized.

Copy link

@aXionDevelopment aXionDevelopment commented Mar 26, 2020

I have two IKEA E1810 remotes which I'm trying to update using z2mqtt 1.12.0. Updates for both devices are failing with an 'aborted by device' response. I activated the devices prior to sending the update command, and replaced the batteries with a lab psu. Also tried pressing one of the buttons a few times during the update procedure.

See the log output below.. Am I doing something wrong? Sorry for the image, somehow I'm unable to show formatted code in my post

image

@BudBundi

This comment has been minimized.

Copy link
Contributor

@BudBundi BudBundi commented Mar 26, 2020

If you click the button to often it also aborts, when you see the "Update of ... at 0%" log stop to press the button.
Also restart z2m and wait 3 minutes before starting the update, give me the best results.

I have two IKEA E1810 remotes which I'm trying to update using z2mqtt 1.12.0. Updates for both devices are failing with an 'aborted by device' response. I activated the devices prior to sending the update command, and replaced the batteries with a lab psu. Also tried pressing one of the buttons a few times during the update procedure.

See the log output below.. Am I doing something wrong? Sorry for the image, somehow I'm unable to show formatted code in my post

image

@bmc-git

This comment has been minimized.

Copy link

@bmc-git bmc-git commented Mar 26, 2020

Sucessfully updated the TRADFRI control outlet (E1603/E1702) by IKEA, but the new version is not reflected in the configuration. I did remove the device and then paired it again and now the version is correct. It would be nice if the current version was reflected after an update :o)

@aXionDevelopment

This comment has been minimized.

Copy link

@aXionDevelopment aXionDevelopment commented Mar 27, 2020

The first few tries were without the 'in between clicking', but that didn't make any difference. But I looks like restarting z2m did the trick :

zigbee2mqtt:info  2020-03-27 07:01:38: Update of 'e1810_remote_1' at 5.28%, +- 60 minutes remaining
zigbee2mqtt:info  2020-03-27 07:01:38: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"ota_update","message":"Update of 'e1810_remote_1' at 5.28%, +- 60 minutes remaining","meta":{"status":"update_progress","device":"e1810_remote_1","progress":5.28}}'
zigbee2mqtt:info  2020-03-27 07:02:14: Update of 'e1810_remote_1' at 6.11%, +- 61 minutes remaining
zigbee2mqtt:info  2020-03-27 07:02:14: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"ota_update","message":"Update of 'e1810_remote_1' at 6.11%, +- 61 minutes remaining","meta":{"status":"update_progress","device":"e1810_remote_1","progress":6.11}}'
zigbee2mqtt:info  2020-03-27 07:07:52: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"ota_update","message":"Update of 'e1810_remote_1' at 16.11%, +- 50 minutes remaining","meta":{"status":"update_progress","device":"e1810_remote_1","progress":16.11}}'
zigbee2mqtt:info  2020-03-27 07:08:23: Update of 'e1810_remote_1' at 16.98%, +- 49 minutes remaining

If you click the button to often it also aborts, when you see the "Update of ... at 0%" log stop to press the button.
Also restart z2m and wait 3 minutes before starting the update, give me the best results.

@vide

This comment has been minimized.

Copy link

@vide vide commented Mar 27, 2020

Ok, the "restart z2m + press remote button right after sending the OTA message to mqtt" worked with both and I'm currently updating my Ikea Tradfri E1810 and Philips Hue 324131092621 Thanks for the tips!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.