Adventures in Philips Hue

I recently picked up a set of the Philips Hue light bulbs.  These bulbs are 600 lumen RGB LED lightbulbs, that can be controlled wirelessly through ZigBee Light Link.  That in and of itself is pretty awesome, but what really sold me on the steep price tag is the open REST API that enables users to write custom scripts to interact with their lighting.

So what was first? Once I got past “on” and “off”, and various other color and brightness settings, I began to play with fading colors smoothly and figuring out what neat stuff I could do.  I quickly went off the deep end.  The first sprint was a Twister game, based on a script my roommate had previously written for a party years ago.  The python script called out random limbs and colors, in lieu of the spin board from the Milton Bradley game box.  Adding in some hooks for Philips Hue, we were able to have the color of the room change depending on the called out color.

After my roommate had enabled Siri voice commands for the controlling the system, I was curious as to how it recognized abstract colors.  Delving into the source code provided a great example of using a simple API from, which I then implemented and improved upon for our program.  The biggest improvement was the more accurate representation of color, which the Hue light bulbs are not the greatest at.

The weirdest one yet though is a small script that takes advantage of Twitter’s REST API  to set the color of our entryway light bulb to anything tweeted at one of my twitter accounts.  Simply by mentioning the account and including a color, anyone could change the color of my entryway!  Example command, try it yourself:

@PentHome15 dark red

I’ve assembled our work so far on GitHub, check it out!