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

IKEA TRADFRI remote control, color temperature not working #1232

Closed ripperle closed 3 years ago

ripperle commented 5 years ago

Hello,

after updating to the latest coordinator firmware (stable, January 2019) I was able to connect my IKEA TRADFRI floalt panel und the Ikea 5 button remote control...

Over zigbee2mqtt I have full control to the IKEA light panel (on/off, brightness, color temperature)

With the remote control I lost the ability to change the color temperature... So I can only switch it on and off and change brightness...

Very weird behavior... 😁

Somebody any idea how that can be happen and how to solve it.?

Koenkk commented 5 years ago

Did you try this: http://www.zigbee2mqtt.io/information/binding.html#ikea-tradri-remote-control-e1524 ?

ripperle commented 5 years ago

No, not yet,

I don't want do use the remote in zigbee2mqtt so I thought that wouldn't be necessary

tim-devel commented 5 years ago

@koenkk I am having a similar issue. I have followed the cc sniffer guidance and bound the switch to a light fitting with three bulbs. The on/off switch and brightness work flawlessly but the change colour buttons do not change colour temperature like they used to when using the tradfri hub.

ripperle commented 5 years ago

I noticed that the normal IKEA panel supports only 3 different color temperatures...

With zigbee2mqtt I can set more than that! Maybe the firmware of the panel gets in an unknown state or something?!

Koenkk commented 5 years ago

I've just checked and indeed setting colour temperature is not possible using this method. Perhaps some extra setup is done, need to do some more sniffing..

tim-devel commented 5 years ago

I have just paired a second remote to a full colour tradfri bulb. Set up went well and it integrates well with home assistant but the arrow buttons do not change colour with this bulb too

didiht commented 5 years ago

In my environment the IKEA remote control works very well with the IKEA bulbs, inclusive setting of the color temperature.

What I've done

zigbee2mqtt version 1.2.1 (commit #e5ca977) Coordinator firmware version: '20190223'

Great Job! Thanks to Koenkk and all contributors!

ripperle commented 5 years ago

@didiht So you don't paired the remote directly with the IKEA lamps? Are the remote working without the zigbee2mqtt coordinater?

didiht commented 5 years ago

@ripperle No, I did not pair the remote directly with the IKEA bulbs. Yes, the remote control works with the IKEA bulbs, even without the zigbee2mqtt coordinator.

I made following test:

With the 'bind' feature I had no success to set the color_temperature with the IKEA remote previously, but I didin't test this with the current version.

bjobo commented 5 years ago

@didiht I tried exactly your setup: reset everything, pair control and lights to cc2530 controller, sniff the group, add lights to group. Switching on/off and changing brightness works like a charm. However: setting the color temperature via IKEA remote control ist not working.

Can I help doing some sniffing? When I press the arrow buttons on the IKEA remote control I receive the following message in Wireshark: ZCL Scenes: Unknown Command, Seq: xx There ist no "response" from the "receiving" lamp.

Frame 581: 55 bytes on wire (440 bits), 55 bytes captured (440 bits) on interface 0
IEEE 802.15.4 Data, Dst: 0xa041, Src: 0xf909
ZigBee Network Layer Data, Dst: Broadcast, Src: 0xf909
ZigBee Application Support Layer Data, Group: 0xb62e, Src Endpt: 1
    Frame Control Field: Data (0x0c)
    Group: 0xb62e
    Cluster: Scenes (0x0005)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 7
ZigBee Cluster Library Frame, Mfr: Unknown (0x117c)
    Frame Control Field: Cluster-specific (0x05)
    Manufacturer Code: Unknown (0x117c)
    Sequence Number: 88
    Command: Unknown (0x07)
    Payload

zigbee2mqtt version 1.2.1 (commit #e5ca977) Coordinator firmware version for CC2530 (via USB): '20190223'

didiht commented 5 years ago

@bjobo Maybe I have to mention that before pairing to z2m all IKEA devices were paired to the IKEA bridge to get the newest firmware.

I also sniffed an arrow-left-click and identified two frames:

Frame 2: 115 bytes on wire (920 bits), 115 bytes captured (920 bits) on interface 0
Internet Protocol Version 4, Src: 192.168.1.3, Dst: 192.168.1.3
User Datagram Protocol, Src Port: 17754 (17754), Dst Port: 17754 (17754)
ZigBee Encapsulation Protocol, Channel: 11, Length: 55
IEEE 802.15.4 Data, Dst: 0x6e92, Src: 0x0409
ZigBee Network Layer Data, Dst: Broadcast, Src: 0x0409
Frame Control Field: 0x0248, Frame Type: Data, Discover Route: Enable, Security Data
ZigBee Application Support Layer Data, Group: 0x7a2a, Src Endpt: 1
    Frame Control Field: Data (0x0c)
    Group: 0x7a2a
    Cluster: Scenes (0x0005)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 25
ZigBee Cluster Library Frame, Mfr: Unknown (0x117c)
    Frame Control Field: Cluster-specific (0x05)
    Manufacturer Code: Unknown (0x117c)
    Sequence Number: 77
    Command: Unknown (0x07)
Data (4 bytes)

0000  01 01 0d 00                                       ....

Frame 4: 115 bytes on wire (920 bits), 115 bytes captured (920 bits) on interface 0
Internet Protocol Version 4, Src: 192.168.1.3, Dst: 192.168.1.3
User Datagram Protocol, Src Port: 17754 (17754), Dst Port: 17754 (17754)
ZigBee Encapsulation Protocol, Channel: 11, Length: 55
IEEE 802.15.4 Data, Dst: Broadcast, Src: 0x6e92
ZigBee Network Layer Data, Dst: Broadcast, Src: 0x0409
Frame Control Field: 0x0248, Frame Type: Data, Discover Route: Enable, Security Data
ZigBee Application Support Layer Data, Group: 0x7a2a, Src Endpt: 1
    Frame Control Field: Data (0x0c)
    Group: 0x7a2a
    Cluster: Scenes (0x0005)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 25
ZigBee Cluster Library Frame, Mfr: Unknown (0x117c)
    Frame Control Field: Cluster-specific (0x05)
    Manufacturer Code: Unknown (0x117c)
    Sequence Number: 77
    Command: Unknown (0x07)
Data (4 bytes)

0000  01 01 0d 00                                       ....

Maybe that helps.

If I can do any further investigation just tell me.

didiht commented 5 years ago

@ripperle @bjobo Now I had the same issue: Removing, and pairing again (6 x powercycle) lost the ability of changing the color_temp with the (grouped) remote.

But following procedure leads in my environment to the expected functionality:

It seems there is a (small?) difference of the initial states (reset with powercycle, reset by pairing and removing from IKEA bridge) that leads to the variance of functionality. Could you test this please?

@Koenkk Maybe we could give a hint in the documentation after others have tested this procedure and confirm that it works?

Koenkk commented 5 years ago

So it seems the tradfri hub does some special setup, could you sniff the zigbee traffic when pairing it to the hub? http://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

ripperle commented 5 years ago

@didiht I have no IKEA gateway or IKEA app 😁

didiht commented 5 years ago

@Koenkk Finally I could sniff the traffic during pairing. Involved components are IKEA hub, IKEA App, IKEA remote and IKEA bulb LED1545G12 (white spectrum). But I don't have the Khow How to analyze. What next? Shall I upload the WS file?

bjobo commented 5 years ago

@didiht Hooray! Today I finaly got time to test your procedure. I can confirm that color changing now ist working. I'd support your hypothesis that the key aspect is not to powercycle the bulb after removing it from the TRADFRI app. However, this evening I was not able to filter the IKEA TRADFRI connect from the zigbee traffic due to too much 'noise' of other zigbee devices (and missing experience with wireshark and the zigbee protocol). If necessary I'v to try again at the weekend.

But following procedure leads in my environment to the expected functionality:

* remove the bulb from the zigbee2mqtt bridge

* stop zigbee2mqtt bridge

* pair the bulb to the IKEA bridge with the IKEA remote via Tradfri app

* remove the bulb from the bridge via Tradfri app

* power off the bulb

* start zigbee2mqtt bridge

* power on the bulb nearby the CC253x (no powercycle!)

* add the bulb to the group of the IKEA Remote

* **SUCCESS** color_temp is working again with the IKEA remote

It seems there is a (small?) difference of the initial states (reset with powercycle, reset by pairing and removing from IKEA bridge) that leads to the variance of functionality.

Koenkk commented 5 years ago

@didiht could you upload it here?

didiht commented 5 years ago

@bjobo I am glad to be able to help :smile:

@Koenkk here it is: Ws.zip

djusHa commented 5 years ago

Hi, same problem here.

Is there an Solution without Tradfri Bridge?

Devices are LED1624G9 and LED1546G12.

coordinator_firmware 20190223

Zigbee2MQTT version1.3.1

After reset the bulbs and tradfri remote to factory and pairing with Zigbee2MQTT, no more ability to change colors / color temp with the remote.

After adding the bulbs to Tradfri remotes group, even no luck.

Same sniffer output like https://github.com/Koenkk/zigbee2mqtt/issues/1232#issuecomment-475870840

On/Off and brightness on Tradfri remotes working good.

Koenkk commented 5 years ago

I've did some further investigation but didn't manage to decrypt the network.

I think the only hope to ever solve this issue is that IKEA shares the required Zigbee commands. I've asked them here: https://www.reddit.com/r/tradfri/comments/bpx9qf/what_magic_setup_does_the_e1524_ikea_tradfri/, fingers crossed..

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

vogler commented 4 years ago

Does the coordinator know which bulbs the remote is paired to? Maybe introduce a device option for the remote to emulate the original behavior by sending commands to change the color temperature on left/right button presses?

BafHS commented 4 years ago

i have the two problems.

  1. Colortemp my steps:
  2. lamp state
    • in FHEM the power state not changing, when i switch the lamp with the remote control??? what can i do?
Koenkk commented 4 years ago

@vogler I think the whole idea of this is that it works when zigbee2mqtt is down, note that your solution can already be achieved via e.g. a home assistant automation.

@BafHS for 2 you can use the reporting feature: http://www.zigbee2mqtt.io/information/report.html

vogler commented 4 years ago

that it works when zigbee2mqtt is down

Would be nice, but you wrote it's not easy to do without information from Ikea?

be achieved via e.g. a home assistant automation

Of course everyone could fix it outside (what are the colors of the scenes?), but IMHO it's better to just make it behave as expected. Less confusion and bug reports. Is there anything speaking against it?

Koenkk commented 4 years ago

@vogler for that, first #1716 has to be implemented.

BafHS commented 4 years ago

thx, it works fine...

@BafHS for 2 you can use the reporting feature: http://www.zigbee2mqtt.io/information/report.html

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

groenmarsmannetje commented 4 years ago

My assumption has always been that this will select the next/previous scene that have been setup with the IKEA app on the Tradfri bridge. The 3 color Temp scenes are just the default. Not using IKEA app and Gateway anymore, so unable to verify this assumption myself.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jd1900 commented 4 years ago

I find your experiences quite awkward, since I got this working from the very first day just using zigbee2mqtt, and I never had the official Tradfri gateway.

As described here (https://github.com/Koenkk/zigbee2mqtt/issues/3485) I had this working, and suddenly (I can find the trigger, maybe there was one, but I can't recall which) it stopped working. However, I never had the official Tradfri gateway, so there must be something else.

didiht commented 4 years ago

With the latest firmware update of the remote and/or the bulb something has changed. I have bulbs paired before the upgrade where color temperature still can be controlled by the remote. With a newly paired bulb it is not possible to control color temp anylonger.

vogler commented 4 years ago

For me it's the other way around. Changing color temp did not work. Then I updated my remote and bulbs last week, paired the remote to the coordinator and then to the bulb, and it worked.

jd1900 commented 4 years ago

For me it's the other way around. Changing color temp did not work. Then I updated my remote and bulbs last week, paired the remote to the coordinator and then to the bulb, and it worked.

I'll try to re-pair the bulb and comment back to see if that works. Maybe is something related to pairing. I think that in one of my tests I did a direct pairing using the Ikea motion detector which "destroyed" my pairing, and I had to re-pair. Maybe that's the trigger which made me loose the functionality.

I repaired but with the coordinator a bit farther away than the first pairing, and maybe that had something to do. Well..., and I has an outdated firmware in the first pairing, and this pairing was with the newest pairing...

ngdio commented 4 years ago

I've set up zigbee2mqtt properly for the first time last week and it's not working for any of my bulbs. I haven't done firmware updates in weeks either.

jd1900 commented 4 years ago

I've tried repairing the bulb. Same thing.

And I think I know whats the problem. The older firmwares had included different scenes prebuilt. This latest firmware doesn't. So if you re-pair using latest firmware, you "loose" those scenes, that have to be set again into the bulb, probably using genScenes cluster, if that makes sense.

The thing is, how to "insert" / "add" scenes into the bulb?

EDIT: This should be enough to achieve what we are looking for: https://github.com/Koenkk/zigbee2mqtt/issues/2069

vide commented 4 years ago

After reading all the comments here and in #2069 looks like there is no solution right now :( Is there a way to downgrade the ikea bulbs firmware to get them back to its original settings with the scenes integrated?

vogler commented 4 years ago

@vide My bulb still has all its scenes and I can change them with the remote. Both updated to the newest firmware.

ngdio commented 4 years ago

@vogler Did you bind the remotes to the groups before or after the update? This problem only occurs in the latter scenario, as far as I can tell.

jd1900 commented 4 years ago

@vogler Did you bind the remotes to the groups before or after the update? This problem only occurs in the latter scenario, as far as I can tell.

I'd rather say when was the pairing. Binding shouldn't affect.

vogler commented 4 years ago

First I updated the remote which then didn't work anymore. So I paired it again: first to the coordinator (press 4 times), then to the bulb (pressed 10s). I could see messages from the remote on the coordinator and the bulb worked with it including left/right for changing scenes. Then I updated all bulbs. Did not have to pair them. Kept working with coordinator and remote.

vide commented 4 years ago

@vogler just tried to pair again the remote to the bulb (10 second reset button) and nothing. I would tell you if you want to risk to pair again the bulbs with the controller. The arrows should stop working (no more scenes to control)

vogler commented 4 years ago

Ok, thanks, than I will avoid re-pairing them :)

connesc commented 4 years ago

I'm facing the same problem with a color bulb (IKEA LED1624G9).

I have noticed exactly the same things:

  1. Pairing the bulb directly with the remote allows to control everything, including scenes.
  2. Pairing the remote and the bulb to the coordinator allows to control ON/OFF and brightness, but not scenes.
  3. Upgrading the bulb while already paired to the coordinator magically restores scene control.
  4. Re-pairing the bulb after an upgrade breaks scene control again (game over if no new firmware is available).

My guess is that factory reset (which is the only known way to trigger pairing mode) erases some kind of scene configuration from the bulb. This configuration may be initialized either by a firmware upgrade, or by the Tradfri remote itself when paired directly to the bulb.

If these assumptions are correct, there would be two options:

  1. Generate the same commands as the Tradfri remote does when configuring paired bulbs.
  2. Find a way to pair bulbs without factory reset.
jd1900 commented 4 years ago

If these assumptions are correct, there would be two options:

  1. Generate the same commands as the Tradfri remote does when configuring paired bulbs.
  2. Find a way to pair bulbs without factory reset.

I'd go for first option. As linked above it may be related to this: https://github.com/Koenkk/zigbee2mqtt/issues/2069

We need someone with sniffer and both gateways.

Dennis14e commented 4 years ago

We need someone with sniffer and both gateways.

I have both gateways (Tradfri & CC26X2R1) and could use a CC2531 as sniffer. How exactly can I help?

jd1900 commented 4 years ago

We need someone with sniffer and both gateways.

I have both gateways (Tradfri & CC26X2R1) and could use a CC2531 as sniffer. How exactly can I help?

The thing would be to sniff a pairing of the bulb with the latest firmware (reset and re-pair in the official gateway). But..., we would need someone with enough skills in zigbee2mqtt to implement it afterwards. Anyway, that would be useful anyway.

Another useful sniffing would be to add / remove scenes from the bulb in the official gateway.

dmak commented 4 years ago

Please can someone explain how scenes pay a role with regards to the issue? Is setting a color = a scene that needs to be present/initialized in a bulb (hence it is not an issue with IKEA E1524 remote control)?

sjorge commented 4 years ago

I recently added another puck remote and after updating it, the color selection was indeed working (it wasn't before)... so the upgrade must internally have the remote rebind to the old group and do the setup.

I sadly did not capture the upgrade, but I did just capture me left,right,left,left,right,right on it. Not sure it's helpful, @Koenkk should have the network key.

https://pkg.blackdot.be/cores/zigbee/ikea_scene_puck.pcapng

Koenkk commented 4 years ago

@sjorge the commands still seem to be the non standard commands like it used to send before. Perhaps the remote did some setup on the bulb side so that it now responds.