A while ago I read Ben's post about his own home automation suite called "HomeSweetHome".
And I am a developer, so I wanted to do the same, the moment I read it. 😄 But I dropped the plan because I had a lot of other stuff on my plate.
That's what the little voice in the back of my head kept saying. So long story short, yesterday I started to check if my IKEA Tradfri Gateway has an API.
While googling around, I found that there is a way to communicate with the gateway. But there is no official support for it (yet). The API uses CoAP as the protocol. I haven't heard of CoAP before. So I dived right into it. Here is a short description from Wikipedia.
Constrained Application Protocol (CoAP) is a specialized Internet Application Protocol for constrained devices, as defined in RFC 7252. It enables those constrained devices called "nodes" to communicate with the wider Internet using similar protocols.
No, I'm not. In fact, I just implemented the most basic code to create a new user on the gateway and request all the devices. No UI. No console output. Just a few unit tests that will execute my library. 🤷
Because this was so much fun to play with and to implement. Especially for something without official documentation. The best part: It worked.
And to be honest, my wife is not as enthusiastic as I am on that point. So I thought I might tell you (this nice community). 😄
I will share the code on GitHub some time in the future. So if you are interested, look out for my upcoming posts.