Skip to content
Node.js library to use Osram Lightify REST API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
lib
.codeclimate.yml
.eslintignore
.eslintrc
.gitignore
CHANGELOG.md
LICENSE
README.md
contributing.json
index.js
package.json
release.sh

README.md

node-lightify-rest

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

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

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.

You can’t perform that action at this time.