1.0.0 • Published 10 years ago
milight v1.0.0
Nodejs-Milight
Nodejs for Milight RGB lights
Beware: there is no acknowledge from the milight module !
Installation
$ npm install milightAPI Usage
var Milight = require("milight");
var milight = new Milight({
host: "192.168.0.255",
broadcast: true
});
// All zones on
milight.on();
// Zone 1 : red color
milight.zone(1).rgb("#FF0000");
// Zone 2 and 3: white light 50%
milight.zone([2,3]).white(50, function(error) {
// Command sent !
});##Configuration Milight constructor accepts an optional configuration object. At the moment, the following is supported:
hostString Hostname of milight module. Default : '255.255.255.255'portNumber Specifies the port of milight module. Default : 8899broadcastBoolean Use broadcast udp socket. Default : 'true'delayBetweenMessagesNumber Delay between messages in milliseconds. Default : 200ms
Author
Olivier Oeuillot
Contributors
https://github.com/oeuillot/node-milight/graphs/contributors