Koenkk / zigbee2mqtt

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

Ikea remote E1524 battery drains with new Zigbee Dongle-E #13681

Closed smarthomejunkie closed 1 year ago

smarthomejunkie commented 2 years ago

What happened?

I tested the new Sonoff Zigbee Dongle-E with various devices. What I notice is that the battery of the Ikea Tradfri Remote is draining within one or two days of using this new dongle. Might be an issue with the dongle itself, because I noticed the same behavior on ZHA. Not sure if that's the case. It seems that it gets polled a lot or something.

I know the dongle is still experimental, but maybe this helps to get it out of the experimental phase.

What did you expect to happen?

I expected that the battery is not getting drained so fast.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.27.0-1

Adapter firmware version

6.10.3.0 build 297

Adapter

Sonoff Zigbee 3.0 USB Dongle-E

Debug log

No response

maframan commented 1 year ago

Put (wpan.src16 == 0xd360) || (wpan.dst16 == 0xd360) in the filter field and and you see all traffic to and from the device :-))) (is not true then paring one device and also is it have changing the short addressee in the network) Before jumping the device the last pull / data request was 22 minute. After jumping is doing it every 5 minutes = more normal.

All looks normal for one jump and some re sending but no timeout = OK.

Can you looking if you have WiFi interference from your or other WiFi networks ?

Tomorrow I try to scan wifi near my house for research interferences (my uncle take me the android phone with wifi analyzer, i've iphone only what not have good app for wifi analyzer). But is possible the battery drain bug on ikea tradfri to resolve with custom firmware or with ikea gateway or other solution?

MattWestb commented 1 year ago

What we have seen from the IKEA release notes is the first and second gen devices using EZSP v6.3.1 and for fixing the last (of many) possible bugs its need EZSP 6.7.7.X (or better 6.10.X as 3th den is using) is needed. If interested read all the relentless from Silabs EZSP what is fixed between the releases (i have done).

IKEA gateway (the old one not Dirigera) is working in ZLL mode and is the remote the is doing the paring to one router and its working normal OK (I have only one drained and not of reported).

Dirigera and all other (no ZLL) system its need having one good router for not jumping and triggering the no sleep bug and its working if can getting it right.

Cooking firmware is possible but not easy if having the knowledge and the equipment (i have the last but not the first).

maframan commented 1 year ago

What we have seen from the IKEA release notes is the first and second gen devices using EZSP v6.3.1 and for fixing the last (of many) possible bugs its need EZSP 6.7.7.X (or better 6.10.X as 3th den is using) is needed.

If interested read all the relentless from Silabs EZSP what is fixed between the releases (i have done).

IKEA gateway (the old one not Dirigera) is working in ZLL mode and is the remote the is doing the paring to one router and its working normal OK (I have only one drained and not of reported).

Dirigera and all other (no ZLL) system its need having one good router for not jumping and triggering the no sleep bug and its working if can getting it right.

Cooking firmware is possible but not easy if having the knowledge and the equipment (i have the last but not the first).

I've equipment For the activity, can you provide me a step by step guide (link) For custom firmware upgrade? Thanks a lot

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

agecrabahaykubo commented 1 year ago

Hi,

For the past couple of weeks I have this battery drain issue with my Ikea Remote and finally able to resolve it by running this command mosquitto_pub -t zigbee2mqtt/bridge/request/device/configure -m yourDeviceId and now the battery level is stable for the past 4 days.

Allows to manually trigger a re-configure of the device. Should only be used when the device is not working as expected (e.g. not reporting certain values), not all devices can be configured (only when the definition has a configure in its definition

Allowed payloads are {"id": "deviceID"} or deviceID where deviceID can be the ieee_address or friendly_name of the device. Example; request: {"id": "my_remote"} or my_remote, response: {"data":{"id": "my_remote"},"status":"ok"}.

LeeWiu commented 1 year ago

This command is not the same thing as clicking on "Reconfigure" button in Z2M menu?

gkrystev commented 1 year ago

Hi,

For the past couple of weeks I have this battery drain issue with my Ikea Remote and finally able to resolve it by running this command mosquitto_pub -t zigbee2mqtt/bridge/request/device/configure -m yourDeviceId and now the battery level is stable for the past 4 days.

The "configure" command was able to resolve my issue till the whole system was restarted, like a power outage. After everything was up and running, the battery drain issue appeared again.

hnykda commented 1 year ago

What's your adapter and firmware? @gkrystev @agecrabahaykubo

gkrystev commented 1 year ago

@hnykda Adapter: slaesh CC2652RB Firmware: zStack3x0 20210708

hnykda commented 1 year ago

Maybe try to flash a newer firmware first, then? https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/CC2652RB_coordinator_20220219.zip is newer.

Also, as TeHashX writes below, this thread is for Dongle-E.

LeeWiu commented 1 year ago

This thread was for Zigbee Dongle-E, yours is Zigbee Dongle-P, I have this newer firmware without battery drain issues CC1352P2_CC2652P_launchpad_coordinator_20221102 https://github.com/Koenkk/Z-Stack-firmware/tree/develop/coordinator/Z-Stack_3.x.0/bin Unfortunately, there is no newer firmware for my Dongle-E.

RubenKelevra commented 1 year ago

@TeHashX Thanks! I'll give this a try as well! My button emptied it's battery after something like 5 month, and some other devices seem to have some battery drain issues as well - but I'm not 100% certain on that.

I'm currently running

Adapter: slaesh CC2652RB Firmware: zStack3x0 20220219

@Koenkk Is there a reason those versions stay dev? Just a lack of testing, or is there a downside using them?

Koenkk commented 1 year ago

20221102 was a bit unstable, but 20221226 looks good and will be released before 1 February (https://github.com/Koenkk/Z-Stack-firmware/tree/6.10.01.01/coordinator/Z-Stack_3.x.0/bin)

t112013 commented 1 year ago

This new firmware is for dongle E right? Anyone knows how to flash? Thanks for great help

LeeWiu commented 1 year ago

This new firmware is for dongle E right? Anyone knows how to flash? Thanks for great help

No, it's for Dongle-P Z-Stack Firmware for Dongle-E EZSP here https://github.com/itead/Sonoff_Zigbee_Dongle_Firmware/tree/master/Dongle-E but with latest v6.10.3_V1.0.1 firmware I get battery drain issue. For now I'm using the good old Dongle-P with Z2M and Dongle-E with ZHA which don't drain battery.

Flyer11111 commented 1 year ago

System upgrade, Sonoff Zigbee Dongle-P 20221226 1.29.2-dev battery drain within hours ikea switchs 8 of them twice

Old system running for 12 months no problems with batteries

Restored HA and replaced batteries

Home Assistant 2023.1.5 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230110.0 - latest

used old Coordinator usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018E306EB-if00

Zigbee2MQTT version 1.29.2-dev commit: 80c464c

Coordinator type zStack12

Coordinator revision 20201127

Frontend version 0.6.123

working fine again

.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

VS-X commented 1 year ago

I do not think this issue should be closed just yet, until we get a confirmation that the drain is fixed for those with Dongle-E. I'm hesitant to insert a new battery into E1524, as there is a high chance it will drain it in a day.

There also are some attempts to derail this thread into Dongle-P discussion, which is very different from Dongle-E. These do not help with the clarity on whether this is still an issue.

maframan commented 1 year ago

I do not think this issue should be closed just yet, until we get a confirmation that the drain is fixed for those with Dongle-E. I'm hesitant to insert a new battery into E1524, as there is a high chance it will drain it in a day.

There also are some attempts to derail this thread into Dongle-P discussion, which is very different from Dongle-E. These do not help with the clarity on whether this is still an issue.

Exactly, the problem also persists with the new release (7.2.0.0 build 108) for ZBDongle-E. I think that the problem is on router firmware, in my case the router is zbdongle-e product, now I try to remove it.

Flyer11111 commented 1 year ago

I've reinstalled the the Dongle-P and its been working for a few weeks , batteries have been holding. The only change i can think of is when cutting over from the old dongle to the new. the old one was still powered up. causing the batteries to run flat with in hours. I did loose 2 batteries in this attempt . I did however re pair every device every time . Also updated 1.30.1 . big thanks to to Z2M Team. just anther note re pair any repeaters > I'm thinking the Ikea half/fall off the network and start communicating can not connect correctly flat batteries.

currently working

Zigbee2MQTT version 1.30.1-dev commit: e9a3835

Coordinator type zStack3x0

Coordinator revision 20221226

Coordinator IEEE Address 0x00124b0018e306eb

Frontend version 0.6.124

Stats

    Total 27
    By device type
    End devices: 17
    Router: 10
    By power source
    Battery: 16
    Mains (single phase): 11
    By vendor
    IKEA of Sweden: 15
    _TZ3000_wkai4ga5: 6
    3A Smart Home: 2
    _TZ3000_i8l0nqdu: 2
    SONOFF: 1
    _TZ3000_5k5vh43t: 1
    By model
    TRADFRI on/off switch: 10
    TS0044: 6
    TRADFRI bulb GU10 CWS 345lm: 5
    FEB56-ZCW2CLX1.0: 2
    TS0503B: 2
    ZBMINI-L: 1
    TS0207: 1

My config data_path: /config/zigbee2mqtt external_converters: [] devices: devices.yaml groups: groups.yaml homeassistant: true permit_join: false mqtt: base_topic: zigbee2mqtt user: mqttuser password: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX serial: port: >- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_96c9953e8229ec11bcc86f7840c9ce8d-if00-port0 advanced: log_level: info pan_id: 6754 channel: 11 network_key:

maframan commented 1 year ago

I've reinstalled the the Dongle-P and its been working for a few weeks , batteries have been holding. The only change i can think of is when cutting over from the old dongle to the new. the old one was still powered up. causing the batteries to run flat with in hours. I did loose 2 batteries in this attempt . I did however re pair every device every time . Also updated 1.30.1 . big thanks to to Z2M Team

currently working

Zigbee2MQTT version 1.30.1-dev commit: e9a3835

Coordinator type zStack3x0

Coordinator revision 20221226

Coordinator IEEE Address 0x00124b0018e306eb

Frontend version 0.6.124

Stats

    Total 27
    By device type
    End devices: 17
    Router: 10
    By power source
    Battery: 16
    Mains (single phase): 11
    By vendor
    IKEA of Sweden: 15
    _TZ3000_wkai4ga5: 6
    3A Smart Home: 2
    _TZ3000_i8l0nqdu: 2
    SONOFF: 1
    _TZ3000_5k5vh43t: 1
    By model
    TRADFRI on/off switch: 10
    TS0044: 6
    TRADFRI bulb GU10 CWS 345lm: 5
    FEB56-ZCW2CLX1.0: 2
    TS0503B: 2
    ZBMINI-L: 1
    TS0207: 1

My config data_path: /config/zigbee2mqtt external_converters: [] devices: devices.yaml groups: groups.yaml homeassistant: true permit_join: false mqtt: base_topic: zigbee2mqtt user: mqttuser password: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX serial: port: >- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_96c9953e8229ec11bcc86f7840c9ce8d-if00-port0 advanced: log_level: info pan_id: 6754 channel: 11 network_key: - 1 - 3 - 5 - 7 - 9 - 11 - 13 - 15 - 0 - 2 - 4 - 6 - 8 - 10 - 12 - 13 availability_blocklist: [] availability_passlist: [] device_options: {} blocklist: [] passlist: [] queue: {} frontend: port: 8099 experimental: {} socat: enabled: false master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777 slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5 options: "-d -d" log: false

This a discussion about ZBDongle-E not for ZBDongle-P version, please don't use this topic. Thanks

Flyer11111 commented 1 year ago

maframan It's a E and a P problem, thanks

maframan commented 1 year ago

Update from my test. This morning I've removed the second zbdongle-e router from my zigbee network and after 12 hours the button tradfri battery is good, any drain. In this moment i've one zbdongle-e as gateway and one zbdongle-e as router.

maframan commented 1 year ago

Update from my test. After 36 hours the battery drained, now I remove from my zigbee network the last zbdongle-e router device for another test.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

NicolasHaeffner commented 1 year ago

I also have this issue. This should not be closed..

Krazubu commented 1 year ago

Same here, that renders the dongle unusable for me. I went back to my old CC2531.

TheLexus commented 1 year ago

I moved to the skyconnect dongle and zha for some devices (battery ones) for the moment. That fixed the problem. I would suggest to mark the problematic dongle as problematic in the docs…

MattWestb commented 1 year ago

For all that have battery draining problems update the device firmware to 24.5 that shall have many bugs fixed that can being triggered then device is jumping and then draining the battery.

smarthomejunkie commented 1 year ago

For all that have battery draining problems update the device firmware to 24.5 that shall have many bugs fixed that can being triggered then device is jumping and then draining the battery.

I only have this link to update the Dongle-E: https://github.com/xsp1989/zigbeeFirmware/tree/master/firmware/Zigbee3.0_Dongle-NoSigned/EZSP, but it seems different firmware. Where did you get yours?

MattWestb commented 1 year ago

I meaning the controller device firmware not the coordinator. The latest IKEA firmware fund i have posting here also the Dirigra that is not public downloadable from the TF link. (https://github.com/zigpy/zigpy/discussions/660)

And if like to knowing fixed bugs then need reading all reseal notes for the EZSP stack being used from the old to the new one.

VS-X commented 1 year ago

For all that have battery draining problems update the device firmware to 24.5

It seems like E1743 and E1744 don't have official OTA yet, so I cannot test it. I tried to perform the update with the local OTA file via Z2M, but it doesn't seem to work due to https://github.com/Koenkk/zigbee2mqtt/issues/12554

MattWestb commented 1 year ago

TF feed dont have it but Dirigera is having it and i have positing all sniffed OTA files i have getting. https://github.com/zigpy/zigpy/discussions/660

nullket commented 1 year ago

@MattWestb as I understand correctly, the newest firmware for (not too old) ikea hardware is now based on Dirigera and not Tradfri anymore? Also, Dirigera firmwares are encrypted and can not be so easily downloaded from an ikea webserver, thus they are not available in zigbee2mqtt yet, right? Furthermore, you sniffed some decrypted OTA Dirigera firmwares which can be found in https://github.com/zigpy/zigpy/discussions/660?

Could you please elaborate how to update an ikea device (e.g. my E1743 which has the same battery drain issue) from the latest Tradfri (2.3.079) to the newest Dirigera firmware (24.4.5)? Lets assume a fully working zigbee2mqtt network with a sonoff dongle in either the E or P version for that (like most followers of this issue might have). Like @VS-X I was not successful with a local ota file and zigbee2mqtt (I do not know why, it simply does not recognize my ota file and tells me the remote is already up2date).

smarthomejunkie commented 1 year ago

I am not sure if this is an Ikea issue. The batteries do not drain when using ZHA.

MattWestb commented 1 year ago

Battery can being drained the triggering some bugs in old firmware but is not always its happening its most likely being the the device is jumping to one new parent but in recent firmware most bugs is fixed (also loosing the network settings then battery is out).

The sniffed firmware is working with ZHA by adding them as local OTA files and if not not working with Z2M i cant helping you.

IKEA have making different OTA update servers / systems for TF and DG and i think they is releasing all new firmware on both but its looks its not synchronized for the moment or they is getting problems then users moving devices between DG and TF systems.

smarthomejunkie commented 1 year ago

Battery can being drained the triggering some bugs in old firmware but is not always its happening its most likely being the the device is jumping to one new parent but in recent firmware most bugs is fixed (also loosing the network settings then battery is out).

The sniffed firmware is working with ZHA by adding them as local OTA files and if not not working with Z2M i cant helping you.

IKEA have making different OTA update servers / systems for TF and DG and i think they is releasing all new firmware on both but its looks its not synchronized for the moment or they is getting problems then users moving devices between DG and TF systems.

I might not understand correctly what you're saying, but this issue does not occur when using ZHA. I am running them for months now using the ZBDongle-E on ZHA without drainage. In Zigbee2MQTT they were drained in 2 or 3 days. Based on this I would say that it's not an Ikea firmware issue. I must say that I did not try Zigbee2MQTT for these devices anymore after that.

nullket commented 1 year ago

I can confirm @MattWestb observations. I have upgraded my remotes to 24.4.5 two weeks ago and use them with the latest regular zigbee2mqtt release. The battery is still reported as 100 % and they work well.

So I assume the issue is on Ikea's side but not always triggered (e.g. zigbee2mqtt with a different stick and ZHA seem to work without any issues).

For anyone who wants to upgrade using zigbee2mqtt as well:

MattWestb commented 1 year ago

Thanks @nullket for testing and reporting back ! If reading all SIlabs release notes for EZSP and GSDK is around 10 bugs that is fixed on the way from the first IKEA released the firmware. One famous is loosing the network setting if battery is running out (50% chance) and most is being triggered the the device is jumping to one new parent and cant going in sleep mode = battery out in 48 hours. This is verified in ZHA issue for over one year ago but not that is fixed in the last firmware.

Also thanks for the instruction for doing the upgrade in Z2M !!

maframan commented 1 year ago

I can confirm @MattWestb observations. I have upgraded my remotes to 24.4.5 two weeks ago and use them with the latest regular zigbee2mqtt release. The battery is still reported as 100 % and they work well.

So I assume the issue is on Ikea's side but not always triggered (e.g. zigbee2mqtt with a different stick and ZHA seem to work without any issues).

For anyone who wants to upgrade using zigbee2mqtt as well:

  • The 24.4.5 (or newer) firmware is from Ikea's dirigera line (not tradfri). As the provision of the firmware etc. is handled differently by Ikea, the usual Ikea OTA update way using zigbee2mqtts webui does not work

  • Zigbee2mqtt has the option to provide a local ota file but this seems to not work for devices which usually have an online update server

  • Therefore, I temporally replaced the complete tradfri ota routines with those pointing to the github ota repo and simply changed the url variable to an index.json to which I had previously added the new firmware. I used the add.js script. The index.json and the new .ota must of course be hosted on some kind of websever for a valid url. There might be a more elegant way but I wanted to avoid digging too much into zigbee2mqtt ;)

Thanks For your info!! Please, Can you share the step by step action plan to upgrade with zigbee2mqtt the ikea Smart product?

Thanks a lot!!!

nullket commented 1 year ago

Please, Can you share the step by step action plan to upgrade with zigbee2mqtt the ikea Smart product?

As opposed to the following steps, I did it a bit different while I figured out how it works. You might need to improvise a bit. Maybe there is way to avoid the whole webserver hosting of the ota/index file but I was not able to get it to work with local files (but I also tried not very hard). Additionally, I use docker so you might need to adjust for your setup.

This is for sure way more complicated than it has to be but I got it working that way without digging into further into zigbee2mqtt. Also one could argue that the new dirigera firmwares should just be added to the original zigbeeOTA repo.

Good Luck.

nullket commented 1 year ago

Timing is all 😂 Ikea released just yesterday 24.4.6 for tradfri. The notes explicitly mention battery improvements. So no need to hack something together, simply update on vanilla zigbee2mqtt using the regular ota function via the web.

MattWestb commented 1 year ago

All 24.X firmware is have fixed the battery reporting to standard so very likely its need being patched or getting 200% battery reading from them.

Nebula83 commented 1 year ago

@smarthomejunkie cpuld you confirm that a firmware update fixes the issue? Would be great to get a final say from the TS and maybe its a nice topic for a video 🙈

smarthomejunkie commented 1 year ago

@smarthomejunkie cpuld you confirm that a firmware update fixes the issue? Would be great to get a final say from the TS and maybe its a nice topic for a video 🙈

Sorry, I've not been able to find time to look into this lately. I moved to ZHA because of this issue...

Krazubu commented 1 year ago

On my side I can confirm that the new firmwares have fixed the battery issue. I did the updates in early june and it's been running fine so far.

Koenkk commented 11 months ago

For those still having this issue, can you try to unbind genPollCtrl? This might fix the issue. It can be done from the z2m frontend, check only the genPollCtrl cluster and press unbind (if it fails, make sure to wakeup the device right before sending the command)

Screenshot 2023-10-14 at 13 16 08
MattWestb commented 11 months ago

@Koenkk Is the default setting fixed for all IKEA controllers inZ2M like it was with the blinds that was spamming the network by setting the config with bad settings ? The default setting the device is doing then being retested is very OK if ot configuring somthing bad in the host system and these is not the reason for draining batteries it was old bugs in Silabs SDK triggered then the controller was jumping but most shall being OK in 24.X

Koenkk commented 11 months ago

@MattWestb i didnt push any fix, just asking for those who are experiencing it to try my suggestion.

MattWestb commented 11 months ago

@Koenkk Is it not better asking the user reading what is sett in the device and see if its bad done and correcting it ? That we was doing with the blinds and was fixed in some minutes.

The default is sniffed from TF and Dirigera then IKEA is setting them up (TF = no setting = let the device us its default only reporting to the configured IEEE thru Touch Link).