Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.31k stars 1.61k forks source link

After OTA update Ikea E1524/E1810 can't be bound to group - how to downgrade? #7716

Closed andreypolyak closed 2 years ago

andreypolyak commented 3 years ago

What happened

  1. I upgraded Ikea E1524/E1810 remote to the latest version using Zigbee2mqtt — 2.3.075
  2. Deleted remote and readded it back (this was not related to OTA update so not sure how important is it to reproduce the issue)
  3. Tried to setup the binding between the remote and light group as I previously had. It doesn't work

I read about the same issue in ZHA related issue: https://github.com/home-assistant/core/issues/43969#issuecomment-854951280. So looks like the problem is reproducable.

What did you expect to happen

Is there any way to downgrade the firmware? I have bunch of E1524/E1810 remotes that are on 2.3.014 firmware and they are working great.

How to reproduce it (minimal and precise)

Debug info

Zigbee2MQTT version: 1.19.1 Adapter hardware: CC2652 Adapter firmware version:

strobel1x commented 3 years ago

I'm having the same issue also with the updated (to version 2.3.075) IKEA E1743 remote switches.

antsund commented 3 years ago

Same problem for me, after updating E1743 to 2.3.075, build date 20210526. Force removed the remote, readded it and interview is complete, but after that no messages from clicks/actions are coming.

Since I was using the test server I learned a lesson not to. :)

Edit: After restarting the addon in HA I get this error, suppose it has to do with the change to default group id 0:

Zigbee2MQTT:error 2021-06-07 12:10:57: Failed to configure 'button_onoff', attempt 1 (Error: Bind 0x14b457fffe7e8b2d/1 genOnOff from '901' failed (AREQ - ZDO - bindRsp after 10000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7))

siklosi commented 3 years ago

Same here group id 0 after update. Tried removing and pairing again but can not bind to group. Otherwise works and I temporarily until resolved made script that toggles lights using from domoticz instead directly.

MattWestb commented 3 years ago

deCONZ and ZHA can doing firmware downgrading of but need to knowing how to do it.

And do not using the test feed for production systems then all firmware is not certified !!

supercharley commented 3 years ago

Same problem with the E1812!

martin131 commented 3 years ago

I have same problem on my E1812. No actions from button are recognized by Z2M in Home Assistant.

MattWestb commented 3 years ago

Updated IKEA remotes is still sending all commands with unicast to 0x0000 = the coordinator if the coordinator is listen to the commands you is getting them (sniffed with wireshark).

Do one firmware downgrading with deCONZ or ZHA and you is getting the group functionality back or waiting some days and IKEA is very likely (but not 110% sure) putting one fixed firmware in the test feed.

ruttromp commented 3 years ago

Have the same problem with the E1812 remote. Keeping an eye on this issue

MattWestb commented 3 years ago

If some like downgrading with local file (possible with deCONZ and patched ZHA) is the 5 buttom remote and 2 button in the zip file attached. remotes.zip

shirou93 commented 3 years ago

Same issue IKEA E1812. Pairing but no click always none

AlexKay88 commented 3 years ago

Maybe too easy, but did you press a button on remote to wake it up during (re-)configuration? Any error messages? Timeout? Checked if legacy: false for remote?

shirou93 commented 3 years ago

Maybe too easy, but did you press a button on remote to wake it up during (re-)configuration? Any error messages? Timeout? Checked if legacy: false for remote?

Repair not solve issue. Reconfigure also.

heggink commented 3 years ago

I noticed that, of my 5 IKEA remotes, only 1 is still bound to a group and working. All others are unbound (report group 0) even though I only upgraded 1 remote to the latest firmware. Whatever I try, I cannot even bind the previously working remotes to the original groups even though nothing changed in the firmware. It almost seems as if something changed in z2m rather than the firmware update causing it. My E1524 should be always bound to 901 and now that also reports group 0 :-(. No idea where I am going wrong.

MattWestb commented 3 years ago

Request the cluster attributes "sw_build_id (id: 0x4000)" and you is getting the "real version" not what Z2M is "thinking".

With the updated firmware is not possible for Z2m to changing the group to 901 and the remote is not sending commands to gropes only to the device with address 0x0000 = coordinator in your system.

Downgrading the firmware and you is getting the function back.

shirou93 commented 3 years ago

After upgrade firmware switch don't pair with oryginal IKEA gateway. This firmware is broken

brhahlen commented 3 years ago

Yeah, I have the same problem here. After upgrade, no clicks are being registered anymore.

MattWestb commented 3 years ago

@shirou93 Do you knowing if one original IKEA GW is supporting software downgrading ? If you have it running with IKEA test firmware is very likely can do that but i dont knowing how to doing that.

deCONZ and ZHA with "puddly patch" can doing selecting downgrading if like going back to stable firmware.

heggink commented 3 years ago

Request the cluster attributes "sw_build_id (id: 0x4000)" and you is getting the "real version" not what Z2M is "thinking".

With the updated firmware is not possible for Z2m to changing the group to 901 and the remote is not sending commands to gropes only to the device with address 0x0000 = coordinator in your system.

Downgrading the firmware and you is getting the function back.

Bizarrely, I only upgraded one device but now find that I have 2 on old FW and 3 actually on new. I never upgraded them myself. Does z2m upgrade FW itself?

Also, any advice on how to easiest downgrade the FW?

shirou93 commented 3 years ago

@shirou93 Do you knowing if one original IKEA GW is supporting software downgrading ? If you have it running with IKEA test firmware is very likely can do that but i dont knowing how to doing that.

deCONZ and ZHA with "puddly patch" can doing selecting downgrading if like going back to stable firmware.

I dont have ikea gateway. I tested in shop and employe change this switch for another new one.

MattWestb commented 3 years ago

@shirou93 If you is family member you can always do that without any reason and infinity time in most country and after that i can baying it for 3€ in the recycle hub :-))

Dont forgetting disabling the test feed until its reported being stable !!!!

shirou93 commented 3 years ago

@shirou93 If you is family member you can always do that without any reason and infinity time in most country and after that i can baying it for 3€ in the recycle hub :-))

Dont forgetting disabling the test feed until its reported being stable !!!!

:) I disabled IKEA test server in config. In stable server no ota update info.

MattWestb commented 3 years ago

deCONZ only picking the old file in the file dialogue and upgrading and waking the remote so it can getting the command.

ZHA OTA-Device-Firmware-Updates.

Z2M putt one future request for implanting it.

@shirou93 Then you was getting one with updated firmware so no need updating it and you can putting your groups back in it :-)))

heggink commented 3 years ago

@MattWestb Thx!. The one thing I don;t get is that the E1524 no longer works even though the FW is not updated.

MattWestb commented 3 years ago

@heggink I think its upgraded butt Z2M is not reporting it OK. Perhaps restart Z2M and doing one new attribute report request and see is its updated or not.

heggink commented 3 years ago

@MattWestb that's what I thought as well but then z2m would have updated it without my involvement. After restarting z2m, it still reports as FW 2.3.014 which is, according to the normal ikea FW site, the current version:

{ "fw_binary_url": "http://fw.ota.homesmart.ikea.net/global/GW1.0/01.14.024/bin/159699-5.1-TRADFRI-remote-control-2.3.014.ota.ota.signed", "fw_file_version_LSB": 17969, "fw_file_version_MSB": 8961, "fw_filesize": 182590, "fw_image_type": 4545, "fw_manufacturer_id": 4476, "fw_type": 2 },

MattWestb commented 3 years ago

Then i think the best is deleting it in Z2M and resetting the remote and doing one new pairing.

If messing up the binding its normally not possible getting it back OK without repairing /resetting the device.

Giancky79 commented 3 years ago

i'm try to bind with lamp and working, with ota we don't need pairing with a group? i have a E1743

MattWestb commented 3 years ago

The E1743 is one dimmer switch = shall sending command to groups of lights and need doing it with broadcast (=Zigbee groups). Before it was not possible binding the remote to one light only groups and I have not testing if its possible with the test version. The test version is sending all commands to 0x0000 = the coordinator in you mesh.

strobel1x commented 3 years ago

deCONZ and ZHA with "puddly patch" can doing selecting downgrading if like going back to stable firmware.

I am trying the "ZHA with puddly patch" option to downgrade, but with no success yet:

I did flash the latest stable versions (2.2.010 for E1743, 2.3.014 for E1524) downloaded from the test server, completely remove, reset (even with battery removed) and re-pair.

Did anyone successfully downgrade from this test-version yet?

MattWestb commented 3 years ago

I have don many lights and also the wireless dimmer. What is the log saying the version the in the device and the version it staring downloading (on of the first lines then starting the OTA requests) ?

Best is disabling the normal IKEA OTA and only using the local file you like so cant getting wrong version upgraded.

strobel1x commented 3 years ago

I have don many lights and also the wireless dimmer. What is the log saying the version the in the device and the version it staring downloading (on of the first lines then starting the OTA requests) ?

Best is disabling the normal IKEA OTA and only using the local file you like so cant getting wrong version upgraded.

I only have the logs of the remote control (E1524) at hand. At the beginning it says:

OTA query_next_image handler for 'IKEA of Sweden TRADFRI remote control': field_control=1, manufacture_id=4476, image_type=4545, current_file_version=587683377, hardware_version=1
OTA image version: 587286065, size: 182590. Update needed: True
Updating: IKEA of Sweden TRADFRI remote control

At the end:

OTA upgrade_end handler for 'IKEA of Sweden TRADFRI remote control': status=Status.SUCCESS, manufacturer_id=4476, image_type=4545, file_version=587286065

I only have the local OTA folder enabled in ZHA (containing only the two OTA files), no update URL. z2m is still reporting the test-version (2.3.075) and I keep having the group-binding issue.

After pairing the remote control again with ZHA ("puddly patch"), it starts OTA-flashing again with the same versions reported in the log as above...

MattWestb commented 3 years ago

I is doing one fast test with one 5 button remote. Its taking some hours but its have started downloading the file.

2021-06-10 21:44:16 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA query_next_image handler for 'IKEA of Sweden TRADFRI remote control': field_control=1, manufacture_id=4476, image_type=4545, current_file_version=587683377, hardware_version=1
2021-06-10 21:44:16 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA image version: 587286065, size: 182590. Update needed: True
2021-06-10 21:44:16 INFO (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] Updating: IKEA of Sweden TRADFRI remote control
2021-06-10 21:44:26 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA image_block handler for 'IKEA of Sweden TRADFRI remote control': field_control=0, manufacturer_id=4476, image_type=4545, file_version=587286065, file_offset=0, max_data_size=63, request_node_addr=Noneblock_request_delay=None
2021-06-10 21:44:26 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA upgrade progress: 0.0
MattWestb commented 3 years ago

Half time :-)))

2021-06-10 22:40:01 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA image_block handler for 'IKEA of Sweden TRADFRI remote control': field_control=0, manufacturer_id=4476, image_type=4545, file_version=587286065, file_offset=91480, max_data_size=63, request_node_addr=Noneblock_request_delay=None
2021-06-10 22:40:01 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA upgrade progress: 50.1
MattWestb commented 3 years ago

Looks like the device is downloading the file OK and replaying it was done OK and rebooting and rejoining the system = OK

2021-06-10 23:34:48 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA image_block handler for 'IKEA of Sweden TRADFRI remote control': field_control=0, manufacturer_id=4476, image_type=4545, file_version=587286065, file_offset=182560, max_data_size=63, request_node_addr=Noneblock_request_delay=None
2021-06-10 23:34:48 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA upgrade progress: 100.0
2021-06-10 23:34:48 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA upgrade_end handler for 'IKEA of Sweden TRADFRI remote control': status=Status.SUCCESS, manufacturer_id=4476, image_type=4545, file_version=587286065

But its still having the test firmware and like getting one update to the old :-((

2021-06-10 23:36:29 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA query_next_image handler for 'IKEA of Sweden TRADFRI remote control': field_control=1, manufacture_id=4476, image_type=4545, current_file_version=587683377, hardware_version=1
2021-06-10 23:36:29 DEBUG (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] OTA image version: 587286065, size: 182590. Update needed: True
2021-06-10 23:36:29 INFO (MainThread) [zigpy.zcl] [0x3d53:1:0x0019] Updating: IKEA of Sweden TRADFRI remote control

I letting it eating batteries over the night and see how its working (if the batteries is surviving it) tomorrow.

I can being the the firmware protection that is implanted in the blinds and signal repeater is blocking the old firmware to being flashed but the firmware is having OK signature and normally being flashed OK and the device ave replaying it success.

strobel1x commented 3 years ago

I can being the the firmware protection that is implanted in the blinds and signal repeater is blocking the old firmware to being flashed but the firmware is having OK signature and normally being flashed OK and the device ave replaying it success.

I'm having exactly the same effect (firmware OTA update SUCCESS, but after rejoining reporting again the previous test-firmware). My remotes are directly connected to the coordinator (CC2531) - no repeaters.

strobel1x commented 3 years ago

Maybe this is not a bug, but a feature: Instead of binding the remote switch (E1743) to one group of two lamps (FLOALT panels), I am able to bind the remote switch directly to each of the lamps. I've never tried that before, but according to the z2m documentation, that should not have worked before.

MattWestb commented 3 years ago

The zigbee class of controlling devices hall being able sending commands with braodcast = zigbee groups. Possibility sending unicast is also possible but normally not used with light controllers then its not making any sin then all with lights is groups also with touch linking and setting up the network.

And its receiving the the binding command and replaying back success but is not doing the real binding inside itself (sniffed with wireshark) https://github.com/zigpy/zigpy/discussions/660#discussioncomment-827229.

My remote is still living and have doing 75% af the last try (4 or 5 time then i was sleeping) and its still on test FW. Then its finises i trying downgrading to one 1.2 firmware from 2018 but i think its not working because the firmware protection but need to trying.

I was thinking if the problems for some weeks ago then IKEA was roiling out the blinds and signal repeater but it was working OK after first test feed fixed version it was certified and released and looks working (user have doing positive feed back).

heggink commented 3 years ago

Maybe this is not a bug, but a feature: Instead of binding the remote switch (E1743) to one group of two lamps (FLOALT panels), I am able to bind the remote switch directly to each of the lamps. I've never tried that before, but according to the z2m documentation, that should not have worked before.

Brilliant!!! Just did the same and it works wonderful without having to downgrade anything. Thanks!!

heggink commented 3 years ago

Latest stable E1524 (dimmer) remote FW also works the same: I can directly connect it to a bunch of devices instead of a group.

clyso commented 3 years ago

I can confirm @heggink findings: binding the remote directly to the device (tested with ikea buld and osram power plug) instead of the group works as expected. thanks @strobel1x for this brilliant idea. i find this way much better as I don't need to create groups for each single device bound to one control. thanks @heggink for trying out what i also noticed is that the led disappeared and joining works only after resetting control

MattWestb commented 3 years ago

Looks being one good work around but its very likely not lasting then the firmware need being fixed then the group binding must working for light groups.

Large light network cant being controlled with unicast it must being done with braodcast (group sending) or the network is collapsing because of router discovery communications for every single command sent to etch device.

I have starting downgrading with one 1.2 and see is the test is accepting it or not. In 2 hours we is knowing if its working or not (i think not).

MattWestb commented 3 years ago

Undocumented future i like (=Bugs). :-)))

MattWestb commented 3 years ago

@strobel1x If you like getting the "default scenes" that is controlled with the 5 button remote you can downgrading IKEA lights and then upgrading then and the firmware is restoring them and is working with your remote until you is resetting the light but you need adding the light to the "magic group" for getting it working :-))

mateusz-bak commented 3 years ago

How do you successfully bind e1743 to a bulb? I select my button, go to Bind tab, add the LED as destination, select OnOff and LevelCtrl, click Bind and all i get is errors. E1743 is on 2.2.010 (0x847127fffec989cd) LED1836G9 is on 2.3.050 (0x847127fffebeb87a)

image

Log:

debug 2021-06-11 16:03:18: Received MQTT message on 'zigbee2mqtt/bridge/request/device/bind' with data '{"clusters":["genOnOff","genLevelCtrl"],"from":"IKEA_E1743_kitchen_1/1","to":"IKEA_LED1836G9_kitchen_1/1","transaction":"4shzx-14"}'
debug 2021-06-11 16:03:18: binding cluster 'genOnOff' from 'IKEA_E1743_kitchen_1' to 'IKEA_LED1836G9_kitchen_1'
error 2021-06-11 16:03:28: Failed to bind cluster 'genOnOff' from 'IKEA_E1743_kitchen_1' to 'IKEA_LED1836G9_kitchen_1' (Error: Bind 0x847127fffec986aa/1 genOnOff from '0x5c0272fffeaaf4c1/1' failed (AREQ - ZDO - bindRsp after 10000ms))
info  2021-06-11 16:03:28: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"cluster":"genOnOff","from":"IKEA_E1743_kitchen_1","to":"IKEA_LED1836G9_kitchen_1"},"type":"device_bind_failed"}'
debug 2021-06-11 16:03:28: binding cluster 'genLevelCtrl' from 'IKEA_E1743_kitchen_1' to 'IKEA_LED1836G9_kitchen_1'
error 2021-06-11 16:03:38: Failed to bind cluster 'genLevelCtrl' from 'IKEA_E1743_kitchen_1' to 'IKEA_LED1836G9_kitchen_1' (Error: Bind 0x847127fffec986aa/1 genLevelCtrl from '0x5c0272fffeaaf4c1/1' failed (AREQ - ZDO - bindRsp after 10000ms))
info  2021-06-11 16:03:38: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"cluster":"genLevelCtrl","from":"IKEA_E1743_kitchen_1","to":"IKEA_LED1836G9_kitchen_1"},"type":"device_bind_failed"}'
info  2021-06-11 16:03:38: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/bind', payload '{"data":{"clusters":[],"failed":["genOnOff","genLevelCtrl"],"from":"IKEA_E1743_kitchen_1/1","to":"IKEA_LED1836G9_kitchen_1/1"},"error":"Failed to bind","status":"error","transaction":"4shzx-14"}'
error 2021-06-11 16:03:38: Failed to bind
heggink commented 3 years ago

I think you need to update that firmware to the latest beta. The 2.2 release does not support direct device binding

BuildTheRobots commented 2 years ago

Maybe this is not a bug, but a feature: Instead of binding the remote switch (E1743) to one group of two lamps (FLOALT panels), I am able to bind the remote switch directly to each of the lamps. I've never tried that before, but according to the z2m documentation, that should not have worked before.

It's quite nice being able to bind a switch to multiple devices - and I thought after rebinding everything I'd fixed any issues that this firmware brought me, but there's a hidden gotcha:

The switches now seem to be keeping track of their state and not broadcasting multiple events. EG, if you're looking at the mqtt and press the off switch on the remote, you see an off message. No matter how many times you press off again, you don't see another button press event. Same goes for switching it on; it broadcasts the first on event, but no subsiquent ones.

As I'd just set up node-red to detect double and tripple taps on the buttons (eg double tap on the bed-side button switches off all lights in the house), this is really annoying as it's completely broken things. If anyone has thoughts on getting the old (mqtt for every press) behaviour back, i'd greatly appreciate it.

brhahlen commented 2 years ago

Did anyone fix this somehow? I have one remote (config mishap) that I accidentally put on the Test OTA (Firmware build date: 20190401; Firmware version 2.3.075) It just won't work anymore now... Can pair it, but no button clicks are registering at all...

MattWestb commented 2 years ago

IKEA have blocking rolling back the firmware in there controlling so its not possible doing "Over The Air".

They have not releasing any new or moving the test to production but they have certificated 3 device by Zigbee Alliance for some weeks ago.

Still recommending waiting and see wot they is doing in some weeks.

In extreme cases its possible flashing one older version with SWD probe but for the 5 button remote you must destroying it for doing it but the rest is possible without "hard tools".

KF042020 commented 2 years ago

In extreme cases its possible flashing one older version with SWD probe but for the 5 button remote you must destroying it for doing it but the rest is possible without "hard tools".

Hi, Have you tried this with the shortcut or On/Off button? If so can you link some description, please?

MattWestb commented 2 years ago

The E1743 On/Off button is easy flashing if you have one SWD probe and can shouldering some wires and you is not destroying the device / case. E1743 and for flashing and dumping IKEA firmware https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module.

Edit: Open/Close and On/Off is the same hard and firmware but different data setting and the shortcut button is little modified hardware but nearly the same and also easy to hacking but have own firmware.