node package manager

lumen

node-lumen

Analytics

Node.js lib for the Tabu Lumen

Install

npm install lumen

Usage

var Lumen = require('lumen');

Discover

Lumen.discover(callback(lumen));

Connect and setup

lumen.connectAndSetUp(callback(error));

Disconnect

lumen.disconnect(callback);

Device Info

lumen.readDeviceName(callback(error, deviceName));
 
lumen.readSystemId(callback(error, systemId));
 
lumen.readSerialNumber(callback(error, serialNumber));
 
lumen.readModelNumber(callback(error, modelNumber));
 
lumen.readFirmwareRevision(callback(error, firmwareRevision));
 
lumen.readHardwareRevision(callback(error, hardwareRevision));
 
lumen.readSoftwareRevision(callback(error, softwareRevision));
 
lumen.readManufacturerName(callback(error, manufacturerName));

Turn off

lumen.turnOff(callback(error));

Set modes

lumen.coolMode(callback(error)); // cycles cool colors 
 
lumen.warmMode(callback(error)); // cycles warm colors 
 
lumen.disco2Mode(callback(error)); // cycles RGB quickly 
 
lumen.disco1Mode(callback(error)); // cycles RGB slowly 

White

// 0 - 100 
var percentage = 100;
 
lumen.white(percentage, callback(error));

Color

// 0 - 99 
var r = 99;
var g = 0;
var b = 0;
 
lumen.color(r, g, b, callback(error));

Events

Disconnect

lumen.on('disconnect', callback);