peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

Support using group 0 with setLightState() #5

Closed drifkin closed 11 years ago

drifkin commented 11 years ago

Currently, we can't use group 0 as a shortcut to set the light state of all lights at once.

For example the following would display an error:

api.setLightState("0", state, true).fail(displayError).done()

The error reads: Api Error: The group id '0' is not valid for this Hue Bridge.

peter-murray commented 11 years ago

Thanks for the pull request, but I had a major update to the library for version 0.2.0, which already removes this issue, by moving the group light status requests to a new setGroupLightState() rather than being mixed up in the setLightState() function. The updated version of the library was publish in npmjs.org today, but it does unfortunately break the existing use of the library, but this was necessary to clean up the library to make it easier to support, the changes to users should be minor (i.e. mostly in the require calls).

drifkin commented 11 years ago

Great, looking forward to trying the new version out.