1.0.0 • Published 8 years ago

av-light-api v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

av-light-api

Avantek Light Bulb API

Structure

structure

Install

npm install av-light-api

Module

var avantek = require("av-light-api");
var connector = avantek.connector;
var finder = avantek.finder;
var storage = avantek.storage;

Connector

on(bulb) / off(bulb)

turn device on/off

color(bulb, r, g, b)

change color using rgb color space

brightness(bulb, lum)

change white brightness

update(bulb)

update device status (rgb color, lum, power)

Finder

find(cb)

find devices on local network

finder.find( bulb => {
  // do somethind with light bulb
});

find(cb, sid)

find specific device by sid

finder.find( bulb => {
  // do somethind with light bulb
}, "101512566e1fcea2ce6");

Storage

addDevice(bulb)

save new bulb to config file

deleteDevice(bulb)

delete bulb from config file

getDevices()

get list of saved devices

License

MIT