A Node.js lib for the yeelight blue and yeelight blue lightstrips.
Yeelight Blue Message Interface
npm install yeelight-blue
var YeelightBlue = require('yeelight-blue');
YeelightBlue.discover(callback(yeelightBlue));
// connects + discovers services and characteristics
yeelightBlue.connectAndSetUp(callback(error));
yeelightBlue.disconnect(callback);
yeelightBlue.turnOff(callback(error));
yeelightBlue.turnOn(callback(error));
var red = 255; // 0 - 255
var green = 255; // 0 - 255
var blue = 255; // 0 - 255
var brightness = 100; // 0 - 100
yeelightBlue.setColorAndBrightness(callback(error));
Enables/disables gradual fading when setting colors and brightness
var on = true; // true (default) | false
yeelightBlue.setGradualMode(on, callback(error));
yeelightBlue.on('disconnect', callback);