Hi there!
I am using openHAB since a few weeks, but without going too much into the fine tuning. That’s what I am doing now. I completely threw away my IKEA Gateway and now use the MQTT2ZigBee approach.
First off: this works fine and it still does with most of my Things & Channels > Items. There was also no issue with using the IKEA remote controls up until a point today where they just stopped working after changing a few things. First I thought: stupid brain, the issue must be something you changed in the last minutes, but after intensively checking everything I just wrote a few simple things:
THINGS file:
Bridge mqtt:broker:broker "MQTT Broker" @ "ZigBee" [ host="localhost", port=1883, secure=false, clientID="openHAB2", username="TESTING", password="YOUNAMEIT" ]
{
Thing topic zigbeeBridge "Zigbee2MQTT Bridge" @ "ZigBee" {
Channels:
Type switch : permit_join [ stateTopic="zigbee2mqtt/bridge/config", transformationPattern="JSONPATH:$.permit_join", commandTopic="zigbee2mqtt/bridge/config/permit_join", on="true", off="false" ]
Type string : log_level [ stateTopic="zigbee2mqtt/bridge/config", transformationPattern="JSONPATH:$.log_level" ]
}
// IKEA remotes
Thing topic zigbee_tradfri_remote_01 "Ikea Tradfri Remote (001, Spielremote)" @ "ZigBee" {
Channels:
Type string : action [ stateTopic="zigbee2mqtt/0x12b457f1fe6d78d4", transformationPattern="JSONPATH:$.action", trigger="true", retained=true]
}
Thing topic zigbee_tradfri_remote_02 "Ikea Tradfri Remote (002, Schlafzimmer)" @ "ZigBee" {
Channels:
Type string : action [ stateTopic="zigbee2mqtt/0x020d6ffefe068c5f", transformationPattern="JSONPATH:$.action", trigger="true", retained=true]
}
Thing topic zigbee_tradfri_remote_04 "Ikea Tradfri Remote (004, Badezimmer)" @ "ZigBee" {
Channels:
Type string : action [ stateTopic="zigbee2mqtt/0x001d6ffffe169be5", transformationPattern="JSONPATH:$.action", trigger="true", retained=true]
}
... etc.
ITEMS file
Group ZigbeeTradfriRemote (Zigbee)
String ZigbeeTradfriRemote001Action "Action [%s]" (ZigbeeTradfriRemote) { channel="mqtt:topic:broker:zigbee_tradfri_remote_01:action" }
String ZigbeeTradfriRemote002Action "Action [%s]" (ZigbeeTradfriRemote) { channel="mqtt:topic:broker:zigbee_tradfri_remote_02:action" }
String ZigbeeTradfriRemote004Action "Action [%s]" (ZigbeeTradfriRemote) { channel="mqtt:topic:broker:zigbee_tradfri_remote_04:action" }
So far, so good.
RULE file
rule "TEST"
when
Item ZigbeeTradfriRemote001Action received update or
Item ZigbeeTradfriRemote002Action received update or
Item ZigbeeTradfriRemote003Action received update
then
logInfo("TEST", "UPDATE REMOTE")
end
Now clicking on those fancy IKEA remote buttons exactly nothing is being written into the event log. But: the channel (see the THINGS file) is gettings event logs (from all remotes):
2020-01-06 19:25:15.718 [vent.ChannelTriggeredEvent] - mqtt:topic:broker:zigbee_tradfri_remote_02:action triggered toggle
Changing the rule file to a “channel trigger” (e.g. Channel “mqtt:topic:broker:zigbee_tradfri_remote_02:action” triggered) works. But not using dedicated items which should be mapped to the things/channels correctly. As I said: it works for everything else (motion sensors, led bulbs, … but not for my remotes).
I also shut down openHAB, cleared the cache and restarted. Also restarted the whole system. To no avail.