1.0.2 • Published 8 years ago

node-lightify-rest v1.0.2

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
8 years ago

node-lightify-rest

npm.io npm.io npm.io npm.io npm.io npm.io

Node.js library to use Osram Lightify REST API

Install

$ npm i node-lightify-rest

Usage

var Lightify = require('node-lightify-rest');

var lightify = new Lightify({
    'username': 'user@example.com',
    'password': 'thisisaverylongandsecurepassword',
    'serial': 'OSR0000000A',
    'region': Lightify.Regions.eu, //For Europe or Lightify.Regions.us for US, CA, AUS
});

lightify
    .getDevices()
    .then(console.log)
    .catch(console.error);

Documentation

Osram Lightify REST API official documentation

Parameters

NameData typeDescriptionExample
apiVersionstringAPI version1.0.0
colorstringHex ColorFF0000
ctempnumberColor temperature1000 to 8000
huenumberHue1.000 to 360.000
idxnumberIndex of the device1
levelnumberDimming level0.000 to 1.000
onoffnumberOn/Off state0 or 1
recallSceneIdstringRecall Scene Id1, 2-1
saturationnumberSaturation0.000 to 1.000
timenumberTransition time in 1/10th of a second100

API

All API methods are available using corresponding method of Lightify class.

Examples may be found in examples directory.

Contributing

Contributions are very welcome!

Note that submitting a PR you agree to license your contribution to this project under the GPL License.

Code style are enforced using automated checks.

Troubleshooting

Make sure that the firmware version of your gateway is WLAN 1.1.2.101 or greater.

License

Published under the GPL License.