yeelight-lamp

0.0.1 • Public • Published

NOTE

This is a WIP. I will work on making this a little more pleasant for others to use and understand...

Thanks to sandeepmistry for his noble module and marcocanc for his reverse engineering efforts on the lamp that made this possible!

node-yeelight-blue

Analytics

A Node.js lib for the yeelight blue and yeelight blue lightstrips.

Yeelight Blue Message Interface

Install

npm install yeelight-blue

Usage

var YeelightBlue = require('yeelight-blue');

Discover

YeelightBlue.discover(callback(yeelightBlue));

Connect and Setup

// connects + discovers services and characteristics
yeelightBlue.connectAndSetUp(callback(error));

Disconnect

yeelightBlue.disconnect(callback);

Turn off/on__

yeelightBlue.turnOff(callback(error));
 
yeelightBlue.turnOn(callback(error));

Set Color and Brightness

var red        = 255; // 0 - 255
var green      = 255; // 0 - 255
var blue       = 255; // 0 - 255
var brightness = 100; // 0 - 100
 
yeelightBlue.setColorAndBrightness(callback(error));

Set Gradual Mode

Enables/disables gradual fading when setting colors and brightness

var on = true; // true (default) | false
 
yeelightBlue.setGradualMode(on, callback(error));

Events

Disconnect

yeelightBlue.on('disconnect', callback);

Readme

Keywords

Package Sidebar

Install

npm i yeelight-lamp

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • williamlacy