You might have heard about the Philips Hue (http://www.meethue.com)? It is a connected light bulb controlled, locally or remotely, by an app for your iOS or Android device.
Lately people have shown interest in the product outside of its 'commercial use'. The aim of this post is to shed some light (pun intended) on the possibilities of the Hue as well as getting started implementing it in a project.
The Hue is exclusive to the Apple Store and can be bought as a Starter Pack (http://store.apple.com/us/product/HA779VC/A/philips-hue-connected-bulb-starter-pack) or Single Pack (http://store.apple.com/us/product/HA780VC/A/philips-hue-connected-bulb-single-pack?fnode=6f). The starter pack includes a bridge and three bulbs. A bridge can control up to 50 bulbs, hence the possibility to buy the single packed bulbs. These bulbs needs to be paired to the bridge of a starter pack. This is the way Philips intended its users to go about extending their collection of lights. However, if you for some reason have multiple starter packs, with bulbs connected to different bridges, it is possible to rewrite the pairing through a nifty little software called LampStealer (http://www.everyhue.com/?page_id=167). Note that while the app was made by Philips employees it is not an official Philips software.
The lamps plug into any standard light fitting and the bridge is connected to a local network. Lamps can be spread further away from the bridge due to the fact that they can communicate with each other through the Zigbee protocol. However, long distances may cause delay, since the signal needs to jump between bulbs. The easiest way to make sure the bulbs works is by downloading an app for a iOS or Android device. Play around with the colour picker or surprise the person next to you with a magic trick. While mesmerizing it gets old fairly quickly.
Programming the bulbs requires one part knowledge in setting up a server and one part knowledge of PHP. If you do not have this knowledge, fear not! Follow these steps to set up an Apache server using XAMPP for Mac OS X (http://www.apachefriends.org/en/xampp-macosx.html) or Windows (http://www.apachefriends.org/en/xampp-windows.html).
The Hue is still a young product. There is no official SDK, but the Hue Community (http://www.everyhue.com/) have open documentation of the API that can be of help. An example can be found Hue Example here (https://dl-web.dropbox.com/get/Public/index.php?w=AADgxx4AYH27m3r1QLCeY9BCbKiVsssozhQOP8oZZBbz6w). Note that details such as username and IP address have been replaced with “—————————————”.
The .php file is placed in the 'htdocs' folder(…/XMAPPP/htdocs/index.php). To test the setup use any browser and point to the URL (http://localhost/index.php//). The bulbs can be controlled saparately or in groups by extending the URL like such: http://localhost/index.php?l=X-R-G-B-A-T//
Turning the first bulb Red with half brightness over three seconds looks like this in Processing: loadStrings(“http://localhost/index.php?l=1-255-0-0-127-3”);
At last, the Hue lamps can come off as expensive light bulbs, but if trusting the dedicated development group they will last for “very long”. That is 50 years of very long. If you dream of a 'connected society' or just want to play around with behavior of light (http://www.meethue.com/en-US/blog/289151395) it is a great opportunity to be on the frontier.
Adam Henriksson 2013/04/30 — www.adamhenriksson.com
*Credits to Jurriën Gosselink and Niels Laute for providing the php script.