This instruction is to get all functions of the Ikea remote in combination with a light without using the Ikea gateway. Instead it uses openhab and zigbee2mqtt with the advantage not only to switch predefined color profiles but allows to create own color scenes and switch between them.
[NOTE] You will notice that the arrow buttons (left/right) are not working out of the box. I struggled a long time fixing this. Unfortunately with newer firmware for the devices the GROUP information does not work (it’s always NULL).
Here is a discussion on this Topic: https://github.com/Koenkk/zigbee2mqtt/issues/1232
Assuming you have openhab set up and running as well as zigbee2mqtt. I did the zigbee2mqtt setup using the official instruction from zigbee2mqtt.
https://www.zigbee2mqtt.io/guide/installation/
Make sure openhab has the needed transformation add-ons installed:
Javascript Transformation and JSONPath Transformation
My environment - Software/Firmware Versions:
Openhab: 3.2.0 (running in a linux virtual machine on a Synology NAS)
Zigbee2mqtt: 1.24.0, Conbee II USB Stick
Ikea Remote: Model: E1524/E1810, FW: 2.3.080
Ikea Light Model: LED1924G9, FW: 1.0.021
Zigbee2mqtt
[1] Pair IKEA remote and Light over the Frontend.
In my case I have the remote as “ZB_Ikea_Remote_6” and the light bulb as “ZB_Ikea_Licht_6” connected.
[2] To make the On/Off and Brightness to work (even when openhab and zigbee2mqtt is not running) you need to set some bindings for the device.
Devices > ZB_Ikea_Licht_6 > Bind
(make sure to wake up the Remote by pressing a button right before adding the binding)
[3] Creating a group for Light and Remote:
Add a new group in zigbee2mqtt “Ikea Licht 6” and added the remote and light to that group.
[4] Create scenes for the light
This is to store your preferred scenes for recalling them in openhab.
Devices > “ZB_Ikea_Light_6” > Scene
Doing so set the light to the wanted color and brightness for the scene. Then give it a scene ID (starting at 0) and a friendly name. Store all the different scenes for the group.
[5] Enable reporting for the remote arrow buttons through zigbe2mqtt. The setup should look like this and include “Scenes” in the binding…
Device “ZB_Ikea_Remote_6” > Bind
Including “Scenes” in the binding enables the report for “arrow_left_click” and “arrow_right_click” over mqtt.
Openhab 3:
[1] Add thing to openhab linked to your mqtt broker: “ZB_Ikea_Licht_6”
Administration > Settings > Things > Add > MQTT Binding > Generic MQTT thing
ZB_Ikea_Licht_6:
[2] Add the channels for the light.
- On/Off switch
- Dimmer
- Color
- Scenes
Here are the configurations I use:
ZB_Ikea_Light_6
ZB_Ikea_Licht_6_OnOff:
zigbee2mqtt/ZB_Ikea_Licht_6/state
zigbee2mqtt/ZB_Ikea_Licht_6/set
ON
OFF
ZB_Ikea_Licht_6_Dimmer:
zigbee2mqtt/ZB_Ikea_Licht_6/brightness
zigbee2mqtt/ZB_Ikea_Licht_6/set/brightness
0
255
ZB_Ikea_Licht_6_Color:
select “CIE xyY”
zigbee2mqtt/ZB_Ikea_Licht_6
zigbee2mqtt/ZB_Ikea_Licht_6/set
JSONPATH:$.color
{“color”:{“x”:%s, “y”:%s},“brightness”:%s}
ZB_Ikea_Licht_6_Scenes:
zigbee2mqtt/ZB_Ikea_Licht_6
zigbee2mqtt/ZB_Ikea_Licht_6/set
{“scene_recall”:%s}
[3] Add thing to openhab linked to your mqtt broker: “ZB_Ikea_Remote_6”
Administration > Settings > Things > Add > MQTT Binding > Generic MQTT thing
ZB_Ikea_Remote_6:
[4] Add the channel for the remote.
- Buttons left / right
Here are the configurations I use:
ZB_Ikea_Remote_6_LeftRight:
zigbee2mqtt/ZB_Ikea_Remote_6
JSONPATH:$.action
[5] Add a Rule to handle the left / right buttons to switch scenes. Make sure the variable “maxscene” matches the maximum scene ID you configured for the group in zigbee2mqtt.
In this example I have scenes 0, 1 and 2.
rule "Ikea Remote/Light 6 Color switch"
when
Item ZBIkeaRemote6_ZBIkeaRemote6LeftRight received update
then
logInfo("Rule", "message: " + ZBIkeaRemote6_ZBIkeaRemote6LeftRight.state.toString)
var Number maxscene = 2 //
var Number currentscene = ZBIkeaLicht6_ZBIkeaLicht6Scenes.state
if (currentscene < 0){
currentscene = 0
}
if (currentscene >= 0){
switch (ZBIkeaRemote6_ZBIkeaRemote6LeftRight.state.toString){
case "arrow_right_click" : {
if (currentscene < maxscene){
currentscene += 1
ZBIkeaLicht6_ZBIkeaLicht6Scenes.sendCommand(currentscene)
}
}
case "arrow_left_click" : {
if (currentscene > 0){
currentscene -= 1
ZBIkeaLicht6_ZBIkeaLicht6Scenes.sendCommand(currentscene)
}
}
}
}
end
That’s it - DONE !! You should now be able to turn the light on and off, set brightness and switch between your own color scenes.