| dist | ||
| src | ||
| .gitignore | ||
| gulpfile.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
node-red-contrib-node-tradfri
Node-RED node to interface with IKEA Tradfri lights without any external binaries thanks to node-tradfri.
- All operations (brightness, color temperature, color, etc.) supported by the gateway are available.
- Support for observation (i.e. reporting on changes to the light).
Usage
Only one node (besides the config node) are necessary for operation. After the configuration has been successful -- either by providing an existing identity and PSK or by generating new ones by providing the security code from the gateway -- simply select which light to target and check if the node should observe the device as well.
Controlling the node
Nodes can be programmatically controlled by sending a message with msg.payload set to one of the following strings:
"status"The node will output the current status of its target light.
Controlling the light
Lights can be controlled by sending an objet with one or more of the following properties as msg.payload to the node.
onbooleanTurn the light on or off.brightnessnumber[0,100]The brightness of the light.colorTemperaturenumber[0,100]The color temperature of the light.colorstringSets the color of the light. For WS-bulbs,F5FAF6,F1E0B5andEFD275will set the light to the default cold, normal and warm temperatures respectively.transitionnumberThe default transition time for operations. Will only work for single operation commands and not for on/off. Defaults to 0.huenumber[0,365]Sets the hue of the light. Only for CWS. (UNTESTED)saturationnumber[0,100]Sets the saturation of the light. Only for CWS. (UNTESTED)
Output
If the node is set to observe and the target light is updated or if triggered manually by sending a "status" request as msg.payload to the node, the node will send a msg.payload with the current status of the light.
idnumberThe id of the light.namestringThe given name of the light.modelstringThe model of the light.firmwarestringThe firmware of the light.alivebooleanTrue if the gateway can communicate with the light, false if not.onbooleanTrue if the light is on, false if not.brightnessnumber[0,100]The brightness of the light.colorTemperaturenumber[0,100]The color temperature of the light.colorstringThe hex-code for the color of the light. Only fully supported by CWS bulbs.colorXnumberThe x component of the xy-color.colorYnumberThe y component of the xy-color.transitionnumberThe default transition time for operations. However, since the default value of 0.5 makes it impossible to send temperature and brightness updates in the same command, this is overridden and set to 0 by default.creatednumberProbably when the light was paired with the gateway for the first time, measured in epoch time.seennumberWhen the light was last interacted with by the gateway (or similar), measured in epoch time.typenumberThe type of device where 2 is light.powernumberThe type of power source powering the light. Will most likely always be 1.
Changelog
0.1.2
- Moved output status object from
msg.payload.lighttomsg.payload. - Updated security code, identity and PSK to be saved as credentials in config.
- Updated info panels and tweaked node appearance.
0.1.1
- Published to NPM