IKEA Trådfri Gateway

Just starting up a thread about the IKEA Trådfri Gateway, already found some info about the protocol
https://bitsex.net/software/2017/coap-endpoints-on-ikea-tradfri/

4 Likes

Oh man, you’re lucky… only COAP :slight_smile: But very cool!

Is anyone working on a binding for it?

I think it’s worth mentioning it here as well as the other thread where the guys behind HA is announcing their support for these in an upcoming release.

What are the chances we can see a binding for these? I’m eager to pick them up, but it’s necessary for me to know that I can get them working in OH…

There was also a mention on the Eclipse forum, but as there is no further reply yet, I don’t think it makes sense to use the “generic CoAP binding” approach, but we should rather start a dedicated binding. I would suggest to create an issue at https://github.com/openhab/openhab2-addons/issues for it, so that work can be coordinated there. @tjwesterby, if you are interested in picking that up, it would be awesome, you have my full support - I expect it to be easily integratable into openHAB and we already have the Philips Hue and the Lightify bindings as similar examples. The cool thing about Tradfri is that it also supports event push, which is at least lacking in the Hue bridge (thus we have to do state polling there).

I think the best source for technical details of what people have found out so far about the protocol is this: https://github.com/bwssytems/ha-bridge/issues/570. For the CoAP protocol, we probably should use Californium.

1 Like

@Kai Do you mean just for me to log an issue to get it started? I’m happy to do so if so, but I have no experience or knowledge to develop anything like a binding myself. I’m quite adversed in technology, but the development side is not my strong suite :wink: I also see there are a few threads on here about Trådløs from IKEA, so a coordinated apporach might be smart :slight_smile:

Yes, as suggested in our contribution guide.

Ok, then I misunderstood you above - so maybe better to look for some other volunteer :slight_smile: Anybody in for it?

If i get a hand on a tradfri bulb and gateway, i might have a look at this.
Unfortunatley it is not availabe in a market nearby.

P.s.: Java isn’t the problem to develop… at this time it is the understanding of openhabs architecture and developing a binding for it :wink: I think i have to look at some tuts and docs :slight_smile:

Hi,
I got a few devices and have started to hack away on a binding. So far I got the discovery of the gateway via mdns and the discovery of the bulbs and controllers in place. Code wise it’s a mess at the moment since it is my first binding and a bit of learning by doing supported by the docs and other bindings as reference.

2 Likes

Hi @funberg,

thank you very much for working on an Ikea Trådfri binding.
Do you think it would be possible to get messages directly from the remote controls and the dimmers so that they could be used for any other purpose? That would be absolutely amazing as those controllers are fairly cheap.

Hi Daniel,

Great that you do a start with that - would you enter an issue at https://github.com/openhab/openhab2-addons/issues, so that it is documented that there is already some activity for such a binding? Thanks!

Will investigate what can be done with the controllers, also keen to get those signals into OpenHAB.

Good point, created one now. https://github.com/openhab/openhab2-addons/issues/2187

Hi @funberg,

If you are looking for a tester, maybe I can help.

Today I received my new gateway and some bulbs. Maybe you want to commit your current implementation or later intermediates to a branch in your openHAB2-addons fork. What do you think?

I’ll have a Tradfri bulb already and I’ll get a few more and the gateway today. The gateway mainly to play around (and see if it is better than the Lightify gateway), the bulbs to add support to my Lightify binding (and yes the first one already works so I’ll get a few more ;-)).

Just as a “quick” comparison:
The bulbs are way more affordable but also slower. The Lightify bulbs acts almost immediately, the Tradfri takes a few millis to activate but for the corridor this is totally acceptable. The white light (in my case 2700K) is great and with roughly 1000 lumen it is bright as hell :slight_smile: The lights are dimmable, even though the Lightify gateway thinks they’re not (the Lightify app won’t offer dimming though but my integration can do it).

In general if you just need white light, I can totally recommend the Tradfri bulbs.

Sorry, that was a bit offtopic but hope still helpful.

@funberg if you need some help, feel free to share your source :slight_smile:

1 Like

Here is the initial code https://github.com/dsundberg/openhab2-addons/tree/ikeatradfri, feel free to test :slight_smile: . Basic support for bulb controlling, on/off, dimmer and the 3 default color temperatures are implemented. Lots to be done still to make it properly stable, compliant and documented.

5 Likes

Hey Daniel,

thanks for sharing your code. Great work so far. First impressions are good. I post my testing result in the corresponding issue.

If you need any help, don’t hesitate to ask. I can write some lines of code if you like.

Great work Daniel! Big kudos!

Has anyone been able to get events from the sensor, the button or the dimmer?

I’ve just had little hacking time with these (some CoAP poking) - while as we know we get can UDP observe the states of the lamps (in 15001), observing the buttons in the same way seems to do nothing when clicking.

However, as an alternative, I tried observing a group (in 15004). It had a lamp in it, but it was disconnected from power (next would be to try without a lamp, or to define a “ghost lamp” in there).
I actually got the power events for this group (5850 alternating 1 and 0) when clicking the power button on the round button. Maybe this could work for the sensor alone in the same way?

I did not get notifications when clicking the dimmer/color buttons.

Feel free to continue this lead - It would be great to be able to use the IKEA actuators as well!

I’ve been testing the same thing, and so far just as you found the only info on the group is the on/off state.

When the pull request will be approved?