Complete Hue API 1.4.0 (http://www.developers.meethue.com/philips-hue-api) as AngularJS service.
// Get all lights
var myHue = hue;
myHue.setup({username: "myuser", bridgeIP: "yourbridge", debug: true});
myHue.getLights().then(function(lights) {
$scope.lights = lights;
// Switch light 1 on
myHue.setLightState(1, {"on", true}).then(function(response) {
$scope.lights[1].state.on = true;
console.log('API response: ', response);
});
});
bower install angular-hue-service
Install Node.js and then
npm install
grunt build
Install Node.js and then
npm install
grunt