Lanfei / yeelight-led

A lightweight SDK to control Yeelight smart LED devices.

Home Page:https://www.npmjs.com/package/yeelight-led

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yeelight-led

A lightweight SDK to control Yeelight smart LED devices.

Documentation

Example

var yeelight = require('yeelight-led');

yeelight.discover(function (device) {
	console.log('Device found:', device.id);

	device.sendCommand('get_prop', 'name', function (err, result) {
		console.log('Device name:', result[0]);
	});

	device.sendCommand('toggle');
	setTimeout(function () {
		device.sendCommand('toggle');
	}, 1000);
});

About

A lightweight SDK to control Yeelight smart LED devices.

https://www.npmjs.com/package/yeelight-led

License:MIT License


Languages

Language:JavaScript 100.0%