Web app to manage and control IKEA Trådfri lights using your browser or smartphone.
The IKEA app that you can download from the App/Play store has some basic functionality. I want to do custom fancy stuff, so I decided to create a web app to do some experimentation.
Based on the node-tradfri-client from AlCalzone.
Rename default.config.json to config.json and fill in your connection details.
When everything is set up, run a server that connects with your gateway:
npm run server
The server has some REST endpoints:
-
GET /tradfri/deviceGet all devices -
GET /tradfri/device/1Get device with id 1 -
PUT /tradfri/device/1Update device with id 1 -
PUT /tradfri/device/control/1Control device with id 1 -
GET /tradfri/groupGet all groups -
GET /tradfri/group/1Get group with id 1 -
PUT /tradfri/group/1Update group with id 1 -
PUT /tradfri/group/control/1Update group with id 1 -
GET /tradfri/moodGet all moods (scenes)
The WebSocket channel is on /updates.
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run all tests
npm testFor a detailed explanation on how things work, check out the guide and docs for vue-loader.
