Building a Device Handler for IKEA 5 button remote?

So I’m looking at making my first Device Handler for a zigbee device. I have the Ikea 5 button Remote paired with ST and it is sending data (somewhat, I’ll get into that later).

I’ve looked all over the forums and it looks like a lot of people have attempted this and either they gave up, I can’t find it, or they are hoarding the treasure like some greedy dragon…

Here is my beginning device handler. I simply have a configure tile/method that binds an action to the hub (I think).

    metadata {
    definition (name: "Tradfri Remote", namespace: "w.york", author: "Will York") {
        capability "Configuration"


        fingerprint endpointId: "01", 
                    profileId: "C05E", 
                    deviceId: "0830", 
                    deviceVersion: "02", 
                    inClusters: "0000, 0001, 0003, 0009, 0B05, 1000", 
                    outClusters: "0003, 0004, 0006, 0008, 0019, 1000"
    }


    simulator {
        // TODO: define status and reply messages here
    }

    // UI tile definitions
     standardTile("configure", "device.needUpdate", inactiveLabel: false, decoration: "flat", width: 1, height: 1) {
            state "NO" , label:'', action:"configuration.configure", icon:"http://cdn.device-icons.smartthings.com/secondary/configure@2x.png"
            state "YES", label:'', action:"configuration.configure", icon:"https://github.com/erocm123/SmartThingsPublic/raw/master/devicetypes/erocm123/qubino-flush-1d-relay.src/configure@2x.png"
        }
        main (["configure"])
        details(["configure"])
}

def configure() {
    log.debug "Config Called"
    "zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}"
}

def parse(String description) {
    log.debug "description is $description"
}

What I get in the logs when I push the configure button is

That is also from only pushing it once, so for whatever reason it gets called twice.

Since there is a parse method in there (stolen from another device handler) it just logs the description which is:

And no matter how many times I push the button it only logs that one description once. I can push any button on the remote and it does not do anything.

What are my next steps here?
Do I have the fingerprint correct?

Here are the logs from my hub when it was connected:

Displayed Text - “zbjoin: {“dni”:“2F2B”,“d”:“90FD9FFFFEE3128D”,“capabilities”:“80”,“endpoints”:[{“simple”:“01 C05E 0830 02 06 0000 0001 0003 0009 0B05 1000 07 0003 0004 0005 0006 0008 0019 1000”,“application”:“11”,“manufacturer”:“IKEA of Sweden”,“model”:“TRADFRI remote control”}],“parent”:“0000”,“joinType”:1}”

Name - zbjoin: {“dni”:“2F2B”,“d”:“90FD9FFFFEE3128D”,“capabilities”:“80”,“endpoints”:[{“simple”:"01 C05E 083

Value - zbjoin: {“dni”:“2F2B”,“d”:“90FD9FFFFEE3128D”,“capabilities”:“80”,“endpoints”:[{“simple”:“01 C05E 0830 02 06 0000 0001 0003 0009 0B05 1000 07 0003 0004 0005 0006 0008 0019 1000”,“application”:“11”,“manufacturer”:“IKEA of Sweden”,“model”:“TRADFRI remote control”}],“parent”:“0000”,“joinType”:1}

Also here is the Zigbee classification document for the Ikea Tradfri Remote:
(Had to host on Google Drive since it is not an image) https://drive.google.com/file/d/1r23g1bBN1z1uvlBKomXefmgJd9jt0-S5/view?usp=sharing

Here is the View of the Device:

I’m also aware of this device handler, but it seems to only work with Ikea Bulbs that are also already paired with ST. https://github.com/RichMercer/SmartThings/blob/master/ikea-tradfri-remote.groovy

There is code in there to make me think that it is supposed to work with buttons, but that isn’t that true, not unless it is in webcore which I haven’t tried yet.

Anyway I think I have all the pieces here, just need someone to help me put them together.

Thanks in advance

This is the device

My intended purpose is to have this as a light switch in my closet. I have some LED that turn on when the door is opened and turn off after x amount of seconds. I wanted to option to turn them back on (Big Power Button) or just turn them off or on if I wanted. The dimmer would be to dim or brighten and the left and right would be to change the White Level that are predefined in the light’s device handler.

A controller is not a bulb, so no surprise that those are different.

Did you get a chance to read the following thread?

Yeah I tried that one. It looks to only function is to pair the remote with smartthings and then control Ikea Lights on your Smartthings Network, or so I gathered. The other DTH in there also refers to the dimmable swith/knob thing that Ikea sells.

What do you mean by this? Maybe I worded something wrong. I am not trying to control bulbs, just trying to control the 5 button switch described in post 3

That’s correct, that’s all you are going to be able to do at the present time. It bypasses the hub when it sends its instructions.

What do you mean by this? Maybe I worded something wrong. I am not trying to control bulbs, just trying to control the 5 button switch described in post 3

My bad, I’m sick today and I misheard the following.

I’m also aware of this device handler, but it seems to only work with Ikea Bulbs that are also already paired with ST.

No worries I have the sickness today as well, kind of why I looked in to this :slight_smile:

I am getting data when I push a button though, so it looks like it is going to the hub. I guess it is only going to the hub for one call though, for whatever reason a button press only registers once and then I cannot do anything with it after that.

I tried using this device handler for the OSRAM Lightify Dimming Switch just to see if that would work with multiple buttons and it is catching all of the Clusters.

I know I am missing something. Also if I assign the “Zigbee Switch” or “Zigbee Button” generic handler, can’t remember which one, the button will send a command to the hub. Again it only does it once though…

Which model hub do you have? It looks like that device is certified under zigbee 3.0, not ZLL, and only the newest V3 hub has zigbee three so far.

I have the v2…

Crap

Well actually not Crap…
https://support.smartthings.com/hc/en-us/articles/115003226203-SmartThings-Hub-Miscellaneous-FAQ

Does the SmartThings Hub work with Zigbee 3.0 devices?

The newest generation of the SmartThings Hub supports Zigbee 3.0. Zigbee 3.0 is backwards compatible, which means that Zigbee 3.0 devices can connect to other versions of the SmartThings Hub (such as SmartThings Wifi, Hub v2 (2015), and Hub v1 (2013)), but these other versions of the Hub do not support QR code onboarding.

So it says the devices are backwards compatible, so it should work with the V2 hub

Is there a reason that anyone can think of that the button only sends logs once? I would assume every time I click the button it would send an event to the parse function. That and no matter which button I press it seems like it sends the same call. Meaning I could press + and it is the same as Power.

I’m assuming I need to register the hub with each button pressed and tell it to wait for an event, but I don’t know how to do that. Again all the information I have is above and just need a nudge in the right direction.

I can’t read your logs, but it’s entirely possible that when you wake up the device, which is what you do when you press any button at all, it does a check in with the hub.

Everything I’ve read about this device says it will not send individual button presses to the hub, it sends the commands directly to the linked end devices.

Anyway, good luck with it. But I would not make any assumptions about how it is going to work because the efforts that other people have already put in, both in this forum and others, indicate that it is not at the present time going to work as a button controller. For example, no one seems to have been able to make that happen with the hue bridge yet, either. You can add it to the zigbee network and then you can use it as a parallel means of control for the bulbs that you link to it, but that’s it.

I would also note the the device, unlike the Tradfri bulbs and pocket socket, Does not work with HomeKit. So there have been people reporting on it in the Hue forums, the HomeKit forums, the Vera forums, the Zipato forums, and others, and no one has been able to get individual button presses from it. If you can, that will be great, but I wouldn’t assume it’s going to be anything easy. :sunglasses:

Thanks for the help so far. I think I’m going to fiddle with it for a couple more days and see what happens. If I make progress then Yay, otherwise I guess I can look in to other options for buttons.

Thanks again for the help :slight_smile:

1 Like

There are lots of options for buttons that are known to work with SmartThings. :sunglasses: See the FAQ:

I have a ST Hub 2, and I am not developer.
Is there anywhere github with solution where IKEA 5 remote button works with Smartthings or not?
I get it connected and is just visible “as a Thing” without any function.

Or this is not even possible to have code for this device?

No, not that I am aware of still. The remote still only talks directly to the bulbs, not the hub for button clicks, so there’s no way we can handle these in SmartThings. I heard they had updated them but I’m still seeing the same behavior.

1 Like

I have connected IKEA Tradfri button (with current latest firmware) with SmartThings Hub v2 and is visible “as a Thing”. But it does not have any function. Did anybody managed that to work?

1 Like

Unfortunately with the way the button currently works I can’t find a way to make it send commands to the Smart Things hub. It will send commands to lights, and that is just the functionality of the device. I think it is up to IKEA to make it function in a different way, or if someone has enough experience out there to put new firmware on it to make it work a different way.

If I ever get mine to work the way I want it to, have the buttons send commands to smartthings I’ll post it on the forums, but as for now I think it just works with IKEA stuff.

1 Like

Since I do not have IKEA gateway, I am unable to check for firmware update. Can you please check and write your latest firmware version of IKEA Tradfri 5 button remote? tx

1 Like

Ok,
there was a recent IKEA gateway update - https://ww8.ikea.com/ikeahomesmart/releasenotes/releasenotes.html

This includes the firmware update to IKEA 5 button remote device to version 1.2.223.

Can somebody try now if the device is sending some data over zwave after pairing and pushing the button?