Since my article about connecting IKEA TRÅDFRI devices to a Philips Hue bridge got pretty popular, everything should be way easier in the future when the Matter smart home standard becomes the default. Nevertheless, old devices must be connected manually via the method described in my old article linked above.
The Problem
In order to pair a new device to a Philips Hue system, Touchlink must be activated. Touchlink allows us to link Zigbee devices (like Philips Hue or IKEA TRÅDFRI devices) when they are physically close. But activating Touchlink in a Philips Hue bridge is challenging because it is not possible via the official app (which makes sense: why should Philips implement a feature in their apps to connect devices from other manufacturers?).
In the past, I used apps like all 4 hue to enable Touchlink. Unfortunately, almost all apps are not free anymore, and activating Touchlink is a premium feature (via a one-time payment or a regular subscription, depending on the app). I was not able to find a free app, so I decided to build my own solution, which is easier than expected.
Manual Touchlink Activation (via Terminal)
We will use cURL, a small terminal tool that is shipped with almost all operating systems (like Windows, macOS, various Linux distributions).
As a prerequisite, a computer with a Terminal open and cURL installed is needed that is on the same network as the Philips Hue bridge. To go on, find out the IP address of your Philips Hue bridge. If you do not know it, log in to your router and find the device. To verify it, just open your browser and test it by visiting the IP address (e.g., http://192.168.1.10/). You should see a website listing all open source tools used by your Philips Hue bridge.
If the IP address is correctly identified, the following steps are needed to activate Touchlink:
- Press the big link button on your Philips Hue bridge
- Run to a PC (only 30 seconds of time) and make a POST request against
http://[YOUR-BRIDGE-IP]/api, e.g.,http://192.168.1.10/api(replace the IP in the command):
curl -X POST http:///[YOUR-BRIDGE-IP]/api \
-H "Content-Type: application/json" \
-d '{"devicetype":"my_script#touchlink"}'- The command will be answered by the Philips Hue bridge with a username (
[{"success":{"username":"[USERNAME]"}}]). Copy this[USERNAME]and fill it in a PUT request which will activate touchlink (remember to adjust the placeholders in the URL):
curl -X PUT http://[YOUR-BRIDGE-IP]/api/[USERNAME]/config \
-H "Content-Type: application/json" \
-d '{"touchlink":true}'- Touchlink is successfully activated if the request is answered with
[{"success":{"/config/touchlink":true}}]
Keep in mind that Touchlink is activated only for a very short time. If it is still unable to connect a device, try again with step 3 (only the PUT request, because the username is valid for multiple requests).