SYNOPSIS - support for the Philips Hue devices


This module adds support for Philis Hue lights to MisterHouse. More info on the hardware can be found here:


In your items.mht, add the Hue gateway and Hue devices like this:

   PHILIPS_HUE, <ipaddress_bridge>:<api_key>:<lamp_id>, kitchen_light, hue_gateway, Lights


   PHILIPS_HUE,, hue_1, Living

Then in your code do something like:

   # Switch on the light if it is getting dark
   if (<condition_that_needs_to_be_met>) {

To control the brightness and the color of the lamp, use the ->bri(xx) and the ->ct_k(xx) or ->hs(xx,yy) functions.

E.g. to put the light in full brightness blue: $light->hs(46920,255); $light->bri(255);


This module communicates with the Hue lights through the bridge device. You need to detect the IP address of the bridge and you need to setup an API key to be able to access the bridge from MisterHouse. Detect the IP address of your bridge with the script that comes with Device::Hue. Follow the instructions presented in that script to setup an API key.





Sets the state of the Hue light. Passing arguments on or off sets the light on or off. Note that on restores the previous light state, both the color and the brightness.


Program an effect. This depends on what effects are supported by the firmware of the lamp. Currently this command takes as parameters:


Enable the color looping through all colors the lamp supports. Kids love it :-)


Disable the active effect


Control the brightness of a lamp in percentage. Supports values between 0 (off) and 100 (maximum) brightness. Note that value '0' does turn the lamp off.


Sets the color temperature in Kelvin. For 2012 lamps the value should be between 2000 K and 6500 K


Sets the hue/saturation values to determine the color of a lamp. The hue value is a wrapping value between 0 and 65535. Both 0 and 65535 are red, 25500 is green and 46920 is blue. For the saturation of the light, 255 is the most saturated (colored) and 0 is the least saturated (white).


Combined hue, saturation, brightness command. For supported values, see the respective functions above.

DEPENDENCIES: This code depends on the Perl module Device::Hue. This module is published on CPAN.

AUTHOR Lieven Hollevoet <>



Support for the Philips Lux devices


This module inherits from Philips_Hue and disables the features that are not available on a Lux light. Basically this means everything that has to do with color settings.