[EN] IKEA Tradfri and Apple HomeKit

EDIT: This post is obsolete. IKEA Tradfri now has a native HomeKit Connection.

IKEA starts selling worldwide his new smart light bulbs. And their price is very budget if you compare it to Philips Hue. But there is no native support for HomeKit, so you don’t have an iOS integration, only the IKEA app. But there is one workaround, and here is the way to do it:

What you need

  • IKEA Tradfri Light Bulb
  • IKEA Tradfri Gateway
  • IKEA Tradfri Remote
  • Raspberry PI (any, tested on Pi 3 B)

Step by step tutorial

  1. Firstly, you must install light bulbs and the gateway the classic way IKEA recommends, don’t forget to add you Light Bulbs via Remote Controller (Here is how)
  2. Install and prepare Raspberry with Raspbian OS (Here is how)
  3. Open Terminal in Raspbian and paste this command one by one:
$ sudo apt-get update  
$ sudo apt-get upgrade  
$ sudo apt-get install git make  
$ curl -sL [[https://deb.nodesource.com/setup\_7.x](https://deb.nodesource.com/setup_7.x)](https://deb.nodesource.com/setup%5C_7.x]%28https://deb.nodesource.com/setup_7.x%29) | sudo -E bash -  
$ sudo apt-get install -y nodejs  
$ sudo apt-get install libavahi-compat-libdnssd-dev  
$ sudo npm install -g --unsafe-perm homebridge  
$ sudo npm install -g homebridge-tradfri  
$ sudo apt-get install libtool git build-essential autoconf automake  
$ git clone --recursive [https://github.com/obgm/libcoap.git](https://github.com/obgm/libcoap.git)  
$ cd libcoap  
$ git checkout dtls  
$ git submodule update --init --recursive  
$ ./autogen.sh  
$ ./configure --disable-documentation --disable-shared  
$ make  
$ sudo make install  
$ cd ..  
$ homebridge
`"

Press CTRL + C after command is done:

$ cd .homebridge4. `"

Now we have installed all software we need for Bulbs controlling (HomeBridge with Tradfri plugin). The last command you type gets you to. Homebridge folder where is config, we need to edit to connect Bridge. Now you must read Secret Code at the back of your IKEA Gateway. Don’t forget its Case Sensitive.

image

Now you have everything you need. So open the terminal again and paste this command to edit the config of the HomeBridge connection.

" $ nano config.json"

This command opens the editor. Delete all text if there is any and paste this:

" { "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:22", "port": 51826, "pin": "123-45-678" }, "platforms": [ { "platform": "Tradfri", "name": "Tradfri", "psk": "Security Code from GateWay", "coapClientPath": "/usr/local/bin/coap-client" } ] }"

Now press ctrl + x, Y, and ENTER to save this file. Now call this last command.

" $ homebridge"

HomeBridge starts and shows the code you use for pairing in the Home iOS app.

If you find any error, you can tweet me here or make a new Issue in developers GitHub.


Martin Kaše

422 Words

2017-05-15 00:02 +0000