# node-lightify-rest

> Node.js library to use Osram Lightify REST API

Latest version **1.0.2** (published 2016-08-28) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install node-lightify-rest
pnpm add node-lightify-rest
yarn add node-lightify-rest
bun add node-lightify-rest
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-08-28 |
| First published | 2016-08-07 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Massimiliano Cannarozzo |
| Maintainers | maxcanna |
| Keywords | lightify, osram, node, rest |

## Links

- npm: https://www.npmjs.com/package/node-lightify-rest
- Repository: https://github.com/maxcanna/node-lightify-rest
- Homepage: https://github.com/maxcanna/node-lightify-rest#readme
- Issues: https://github.com/maxcanna/node-lightify-rest/issues
- npm.io page: https://npm.io/package/node-lightify-rest

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.74.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.1.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-08-28
- 1.0.0 — 2016-08-07

## README

# node-lightify-rest
[![](https://img.shields.io/npm/dt/node-lightify-rest.svg?maxAge=2592000)](https://www.npmjs.com/package/node-lightify-rest) [![](https://img.shields.io/npm/v/node-lightify-rest.svg?maxAge=2592000)](https://www.npmjs.com/package/node-lightify-rest) [![](https://www.versioneye.com/user/projects/579f48ef72d75c0039f7a287/badge.svg)](https://www.versioneye.com/user/projects/579f48ef72d75c0039f7a287) [![](https://img.shields.io/travis/maxcanna/node-lightify-rest.svg?maxAge=2592000)](https://travis-ci.org/maxcanna/node-lightify-rest/) [![](https://img.shields.io/codeclimate/github/maxcanna/node-lightify-rest.svg?maxAge=2592000)](https://codeclimate.com/github/maxcanna/node-lightify-rest) [![](https://img.shields.io/npm/l/node-lightify-rest.svg?maxAge=2592000)](https://github.com/maxcanna/node-lightify-rest/blob/master/LICENSE)

Node.js library to use [Osram Lightify REST API](https://eu.lightify-api.org/lightify/)

## Install

``$ npm i node-lightify-rest``

## Usage

```javascript
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](https://eu.lightify-api.org/lightify/)

### 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](https://github.com/maxcanna/node-lightify-rest/tree/master/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](https://github.com/maxcanna/node-lightify-rest/blob/master/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](https://github.com/maxcanna/node-lightify-rest/blob/master/LICENSE).

---
_Source: https://npm.io/package/node-lightify-rest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
