Skip to content

William1444/yeelight-lamp-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

nodejs client for the yeelight lamp

Resources

License

Stars

Watchers

Forks

Packages