Multiple Ikea Trådfri Gateway dirty hack

Start by configure you computer so you can install apps offline:

Then download the zip from:

Unpack this and go inside this dir with either CMD och Terminal then dont forget to issue the command:
npm install --target_arch=arm --target_platform=linux

After that edit app.json and change ID to something else like “myapp.ikea.tradfri.gateway”
also change name to something else so you know which app goes to which gateway like “IKEA Trådfri Gateway 2”

I also changed the id in files package.json and package-lock.json dont know if you have to do that though.

When you are done all you have to issue is “homey app install” and the app will be installed in your homey.

I have alot of lamps and wanted to be able to control all my gateways so this was the solution i came up with (im no developer) until the main app supports multiple gateways.

4 Likes

Hi, thanks for this tip! I have come as far as getting the second version of the app installed on my Homey, and I can save the Gateway details. But no devices appear - is there any extra tip to get this to work?

I should say that the authentication works, I add the ip and security code and the app obtains the identity and PSK. It just doesn’t find any devices, which I seem to remember happened automatically for my Gateway #1.

Also, Terminal threw up a couple of error messages when installing, don’t know if they can cause any issues?

✓ Pre-processing app…

Error in app.json:

SyntaxError: Unexpected token m in JSON at position 9

Fam-Andersen-Home-iMac-2:rep famandersen$ homey app install

✓ Pre-processing app…

✓ Validating app…

✓ Homey App validated successfully against level debug

✓ Packing Homey App…

✓ Pruning dev dependencies…

:heavy_multiplication_x: Error occurred during npm prune TypeError: prunePathsJson.removed.map is not a function

at Function.getPrunePaths (/usr/local/lib/node_modules/homey/lib/Modules/NpmCommands.js:88:49)

at processTicksAndRejections (node:internal/process/task_queues:96:5)

at async /usr/local/lib/node_modules/homey/lib/App/index.js:642:26

— App size: 1.92 MB

✓ Installing Homey App on Homey (https://192-168-1-44.homey.homeylocal.com)…

✓ Homey App myapp.ikea.tradfri.gateway successfully installed