Utility to control Philips Hue light bulbs
For more information on the Philips Hue bulbs and wireless bridge system, visit meethue.com.
Initial concept and startup work inspired by Ross McKillop's post.
Once you've followed the instructions with your Hue starter kit and you have your lamps working through the web interface or smartphone app, it's time to configure your copy of hue.js.
For a full breakdown of what the Philips Hue API/SDK offers, check out the official developer site. Full details about how to register a new 'user' with the wireless bridge can be found at the SDK getting started page.
Generate and save your MD5 hash (any MD5 generator will do). Be sure to save your hash and the passphrase used to generate it in a safe place.
Find the IP address of your Hue wireless bridge. This can be gathered in a number of ways, including the meethue.com control panel, https://www.meethue.com/en-US/user/preferencessmartbridge, by clicking on the "Show me more" link. See screenshot for an example. Alternatively, you can browse to this URL, and use the value displayed in
To use the Hue library in a web application, make sure to call the
function, passing in the IP address and the API key value generated and registered with the hub.
Provides convenience functions to convert between CSS-style hex color values, their corresponding RGB color values, and the CIE 1931 X,Y color coordinates supported by the Hue lamp system.
Provides a map of CSS named colors and their corresponding hex color values.
Provides control functions to control either single lamps, groups of lamps, or all available lamps. Lamps can be toggled (on/off), flashed for a short or long time, and have their color changed.
Provides some simple properties to match JSON state responses.
nodeunit test suites for colors.js and hue.js. Note: Setup detailed above must be completed in the hue.js file to have tests run.
© 2013 Bryan Johnson; Licensed MIT.