Philips Hue - Light
The Phillips Hue Light is a wireless-controlled light bulb. You need a Phillips Hue Bridge to control Phillips Hue Lights.
How To Connect
Cylon.robot({ connections: { hue: { adaptor: 'hue', host: '192.168.1.101', username: 'XXX' } }, devices: { bulb: { driver: 'hue-light', lightId: 2} } });
How To Use
var Cylon = require('cylon'); Cylon.robot({ connections: { hue: { adaptor: 'hue', host: '192.168.1.101', username: 'XXX' } }, devices: { bulb: { driver: 'hue-light', lightId: 2} }, work: function(my) { every((1).second(), function() { my.bulb.toggle(); }); } }).start();
Commands
turnOn
Turns the light on.
Also sets this.isOn
to true
.
Returns
- (
undefined
)
turnOff
Turns the light off.
Also sets this.isOn
to false
.
Returns
- (
undefined
)
toggle
Toggles the light on or off
Returns
- (
undefined
)
alert
Sets the light to an 'alert' state
Returns
- (
undefined
)
longAlert
Sets the light to a longer 'alert' state
Returns
- (
undefined
)
white
Sets the light to white
Params
-
colorTemp (
Number
) the color temperature to use for "white" -
brightPercent (
Number
) 0-100 brightness percentage to use
Returns
- (
undefined
)
brightness
Sets the light's brightness
Params
-
percent (
Number
) 0-100 brightness percentage to use
Returns
- (
undefined
)
hsl
Sets the light's color via HSL
Params
-
hue (
Number
) (0-359) -
saturation (
Number
) (0-100) -
brightPercent (
Number
) (0-100)
Returns
- (
undefined
)
xy
Sets the light's color via the Philips Color coordinate system
Params
-
x (
Number
) (0-1) -
y (
Number
) (0-1)
Returns
- (
undefined
)
rgb
Sets the light's color via RGB
Params
-
r (
Number
) red (0-255) -
g (
Number
) green (0-255) -
b (
Number
) blue (0-255)
Returns
- (
undefined
)