Node.js library to use Osram Lightify REST API
$ npm i node-lightify-rest
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);
Osram Lightify REST API official documentation
Name | Data type | Description | Example |
---|---|---|---|
apiVersion | string | API version | 1.0.0 |
color | string | Hex Color | FF0000 |
ctemp | number | Color temperature | 1000 to 8000 |
hue | number | Hue | 1.000 to 360.000 |
idx | number | Index of the device | 1 |
level | number | Dimming level | 0.000 to 1.000 |
onoff | number | On/Off state | 0 or 1 |
recallSceneId | string | Recall Scene Id | 1, 2-1 |
saturation | number | Saturation | 0.000 to 1.000 |
time | number | Transition time in 1/10th of a second | 100 |
All API methods are available using corresponding method of Lightify
class.
Examples may be found in examples
directory.
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.
Make sure that the firmware version of your gateway is WLAN 1.1.2.101
or greater.
Published under the GPL License.