node-lightify-rest

    1.0.2 • Public • Published

    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.

    Install

    npm i node-lightify-rest

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    GPL-3.0

    Last publish

    Collaborators

    • maxcanna