September 20, 2019

HomeKit bridge with IKEA Trådfri, Blinds


         Updated 2019-09-20 !

This Blogpost was initially made before the IKEA outlets was enabled in the Apple Home app. They could then just be reached via a Tradfri Homebridge plugin

Since a while blinds are supported by this plugin but not by the IKEA Gateway and app so maybe its time again to install it ?

Another post covers the installation of the Trådfri gateway with a HomeKit approach. (Without Homebridge)

Other HomeKit posts on this Blogg


With HomeBridge up and running You can use the homebridge-ikea-tradfri-gateway plugin to control the IKEA devices in the Apple Home app.

Log on to the RPi in a terminal/ssh session and issue the command

sudo npm install -g --unsafe-perm homebridge-ikea-tradfri-gateway

edit the config.json and add the platform "Ikea Trådfri Gateway"

"platforms": [
    {
        "platform": "Ikea Trådfri Gateway",
        "name": "Ikea Trådfri Gateway",
        "host": "192.n.n.n",
        "securityCode": "DqxxxxxxxxxxxxsH2",
        "expose": ["blinds"]
    }
]

"host" is the IP adress of Your IKEA Gateway. Set it up in Your router so it will have a fixed IP.
"securityCode" is located on the bottom of the gateway. If You don't want to type it manually, scan it with Your QR-code reader and then copy and paste.
The line with "expose": ["blinds"] is used to just expose the IKEA blinds, not the lamps and outlets. This is because the lamps/outlets, in my case is, exposed direct via the IKEA gateway to the Home app. If You want to expose all, just change to  "expose": ["lightbulbs", "outlets", "blinds"]

If You have used my autostart with systemd, stop the homebridge server with 

sudo systemctl stop homebridge

and to check that everything is OK, with the new plugin, start HB manually

homebridge

and something like this will appear

[2019-2-4 17:17:41] Loaded config.json with X accessories and X platforms.
[2019-2-4 17:17:41] ---
.
.
[2019-2-4 17:17:41] Loaded plugin: homebridge-ikea-tradfri-gateway
[2019-2-4 17:17:41] Registering platform 'homebridge-ikea-gateway.Ikea Trådfri Gateway'
[2019-2-4 17:17:41] ---
.
.
[2019-2-4 17:17:43] Loading X platforms...
[2019-2-4 17:17:43] [Ikea Trådfri Gateway] Initializing Ikea Trådfri Gateway platform...
.
.
[2019-2-4 17:17:43] Loading 2 accessories...
[2019-2-4 17:17:44] [Ikea Trådfri Gateway] didFinishLaunching
[2019-2-4 17:17:44] [Ikea Trådfri Gateway] Loading devices...
[2019-2-4 17:17:44] [Ikea Trådfri Gateway] Loading groups and scenes...
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] Done.
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] The following device is ignored.
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] {"isProxy":true,"options":{},"firmwareVersion":"1.2.214","manufacturer":"IKEA of Sweden","modelNumber":"TRADFRI motion sensor","power":3,"serialNumber":"","battery":16}
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] Updating power to OFF on outlet 'TRADFRI control outlet'
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] Updating active status to ALIVE on outlet 'TRADFRI control outlet'
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] The following device is ignored.
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] {"isProxy":true,"options":{},"firmwareVersion":"1.3.002","manufacturer":"IKEA of Sweden","modelNumber":"TRADFRI bulb E27 CWS opal 600lm","power":1,"serialNumber":""}
[2019-2-4 17:17:45] [Ikea Trådfri Gateway] Initializing platform accessory 'TRADFRI control outlet'...
.
.
[2019-2-4 17:18:45] [Ikea Trådfri Gateway] Ping OK.

Stop with Ctrl + C and restart the server with 

sudo systemctl start homebridge

Now You are up and running and can check the function via the Home app.

If You want to use RGB LED strips together with Trådfri this Bloggpost will guide You.

No comments:

Post a Comment

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !