HueJS is a Javascript library to work with Philips Hue 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.
src
.babelrc
.env
.gitignore
README.md
package.json
webpack.config.js

README.md

HueJS

HueJS is a Javascript library to work with Philips Hue Api.

Get started

Generate File

npm run build

Import

<script src='dist/hue.js'></script>

Setup

huejs.bridge.setIP("<bridge-ip>");
huejs.bridge.setAPIKey("<api-key>");

Example

huejs.lights.modify('1', 'state', {'on': true});

huejs.groups.modify('1', 'action', {'on': false});

Lights & groups as objects:

var group = huejs.group("<group-name or group-id>");
group.modify("action", {"on": true});
group.turnOff();

var light = huejs.light("<light-name or light-id>");
light.modify("action", {"on": true});
if(light.isOn()){
    alert(light.lightName + " is on");
}