Today we’re open sourcing Lightbuild, which allows you to indicate Continuous Integration build status using Philips Hue light bulbs.

We’re a pretty curious bunch at Geckoboard, and we’re always looking for interesting ways of taking information and using it in a way that makes everyone aware of what's going on. So when we had some programmable
Philips Hue light bulbs delivered to the office, a light bulb instantly went off. (Yup, said it.)

Philips Hue light bulbs may look like normal light bulbs, and you screw them in and switch them on just like any other light bulb. But the wireless LED technology inside of them (you can turn them on and off, and change their colour remotely) is sort of awesome. So we decided to do a little experiment.

We instantly recognised the potential for connecting the light bulbs to Jenkins (a Continuous Integration server), and have them report whether a build was successful or not by changing the colour of one of our light bulbs in the office. In order to do so, we created Lightbuild.

Lightbuild was developed after a few node.js coding sessions (and some ample reading of the Hue documentation). Initially we’ve only added support for Jenkins, but other CI servers/services could easily be implemented.


Getting started

To get started with Lightbuild, just fill in your Jenkins configuration parameters (username, password, hostname) and save them as config/ci.json. Then all you need to do is launch Lightbuild by running:


./script/start


Depending on whether it's been run before, you may need to press the button on the top of the Hue bridge to grant Lightbuild the necessary permissions.

Once it's all set up and ready to go, Lightbuild will poll your Jenkins server every 30 seconds. If any of your builds are currently broken, your light will turn red; if all your projects are passing, then the light will turn a soothing shade of green. See the gif below for a demo of what it might look like next time your build breaks:

lightbuild

 

By default, Lightbuild will use whichever bulb has an internal ID of 1, but you can set a different number by setting the LIGHT_ID environment variable.

Note that as Philips does not expose their Hue API over the internet, you will need to run Lightbuild from within the same network as your light bulbs. For more installation and usage details, see the README. If you run into any problems or have any suggestions for future improvements, please open an issue on GitHub.

If you’re looking to share build information with your team then a combination of Hue lights and Lightbuild is a good way to achieve this.

Did you like this experiment? Drop your feedback in the comments, or head on over to the GitHub repoStay tuned for more engineering related posts from Geckoboard!



PS: We're hiring!