Make your IKEA Trådfri bulbs change temperature like f.lux.
- Obtain the security key (on the bottom of the gateway) and IP address of your Trådfri gateway (use your router's control panel).
- Obtain your longitude and latitude (used for sunrise/sunset times). NASA has a tool for this.
- Clone tradfri-flux
git clone https://github.com/overwatchcorp/tradfri-flux.git
- Install npm dependencies
cd tradfri-flux && npm install
- Run
node bin/setup.js --host 127.0.0.1 --key a1b2c3d4e5f6g7h8i9j0 --lat 12.345 --long 3.141
to prepare the .env file, where hostname is the IP address of the gateway, and key is the security key found on the bottom of the gateway.- If you have a negative longitude or latitude, enclose the value in quotes and add a space before the negative sign so it doesn't interpret it as another argument:
--long " -122.670"
- If you have a negative longitude or latitude, enclose the value in quotes and add a space before the negative sign so it doesn't interpret it as another argument:
- Run
npm start
to start trådfri-flux
If you have a Raspberry Pi, setting up trådfri-flux is a cinch and can run on startup.
- Perform the installation
- In tradfri-flux's directory, run
sudo cp .env /.env
to copy the .env var to your root folder - If tradfri-flux is located in
/home/pi/tradfri-flux
, runecho 'node /home/pi/tradfri-flux/index.js &' >> /etc/rc.local
to add trådfri-flux to startup. - Reboot your pi with
sudo reboot