Years ago I replaced my IKEA TRÅDFRI gateway with a Rasbperry Pi with a Raspbee, running deCONZ. It allowed me to mix and match ZigBee devices from various brands and make flexible configurations. Plus the integration with Home Assistant is superb.
However, one thing I lost is the ability for the IKEA remote to control my lights directly when the deCONZ gateway is down, which was possible back when I used the IKEA gateway. Depending on who you ask, this is either not possible at all or should be taken care of automatically be deCONZ when you set up the remote. The latter didn’t work for me and it took me quite a few attempts to figure out how to set up the pairing manually.
Your mileage may vary, but what follows is what worked for me with an old 5-button IKEA remote. What you need to do is add your lights to the group that deCONZ automatically creates when you pair the remote. Unfortunately I needed all of Phoscon, the REST API and the GUI to get this done.
Step 1: Pair the remote and configure your lights using Phoscon Webapp
If the remote is already paired, delete it from the deCONZ GUI and pair it again using the instructions in the deCONZ GUI.
You can add the remote to the group with your lights. This allows you to control the lights using the configured button actions. It might work when the gateway is powered off. If so, you’re luckier than I was! If not, read on.
Step 2: Look up the group ID in the REST API
Get yourself an access token for the API as described in the documentation. If you use the deCONZ add-on for Home Assistant you can forward port 40850 in the add-on configuration.
One you have access to the API, get the list of groups. Using curl and jq you can do:
curl http://<deconz hostname>:40850/api/<user token>/groups | jq .
Among the list should be a group named after your remote:
"name": "TRÅDFRI remote control ",
Note the id of the group, in this case id 8. Notice there are no lights in the group, even though in deCONZ I already have a group with this remote and the lights.
Step 3: Add group membership to lights using the GUI
Now, open the deCONZ GUI. In the Home Assistant add-on this is conveniently available through VNC or even in the HA Web Interface.
For every light that you want to control, follow these steps:
- Locate the light in the mesh and click the rightmost radio button to open the cluster list
- Click the ‘groups’ cluster
- On the left side of the screen, open the ‘Cluster info’ panel
- In the ‘Add group’ section enter the group ID (8) in hexadecimal notation
- Click ‘exec’. For mains-powered devices this should respond with ‘SUCCESS’ pretty quickly
After following these steps, shut down Raspbee or Conbee and verify that the remote still works.
Step 4: Peace of mind asserted
I’m not sure why I had so much trouble getting this to work. Perhaps on a brand new out-of-the-box setup using the latest firmwares and software, things just work automatically as they should.
It’s important to always have a fall back when designing a smart home. Even when the gateway is down, you should be able to control your lights. By setting up proper group memberships in deCONZ, the IKEA remote does just that. Just like it did back when I was running a pure IKEA setup. Which was also great. Kudos to IKEA, Dresden Elektonik, Home Assistant an all the community members making our smart homes a little less dumb.
P.S. An earlier attempt had me setting up bindings between the on/off clusters of the remote and the lights, but that didn’t work. I recommend sticking with the multicast groups as described above.