IOTDB Bridge to connect and control Philips Hue Lights.
See the samples for details how to add to your project,
particularly model.js
for standalone
and iotdb.js
for HomeStar/IOTDB.
Then:
$ npm install -g homestar ## may require sudo
$ npm install homestar-hue
$ homestar configure homestar-hue
Code to set all lights to red:
const iotdb = require("iotdb")
iotdb.use("homestar-hue");
iotdb.connect("HueLight").set(":color", "red");
Control Philips Hue lights:
Functionality:
on
: true or false. iot-purpose:on
color
: a hex color ("#FF0000"). iot-purpose:color
e.g.
{
"on": true,
"color": "#FF0000"
}