traffic lights

After seeing the Hudson Bear Lamps, I felt that our Continuous Integration server at Softwire needed a little more omph to show the current build status.

I looked around for some bears of my own, but I couldn't find any at a reasonable price. Luckily, I found some traffic lights on eBay, which do the job just as well, I think:



When I got the set, the traffic lights had three transformers inside which were all fed from a single 240V mains input and which sent about 13V AC into each of the bulbs, which appear to be LEDs. There wasn't any controlling circuitry inside, so I guess in their previous life there must have been three separate 240V inputs. Anyway, this suited me just fine -- I broke out the 3 low volage light circuits using two long kettle leads and fed them through a relay board on my parallel port (from here, only €24). After finding a little app to set the pins on my parallel port, I could control the lights from my PC!

The only thing left was to set up a script to poll the build server and set the lights according to the build status (green for "OK", amber for "building" and red for "failed"). The first project I used these lights on used CruiseControl.NET, so I could use CCTray (although I had to patch CCTray to allow for calling command line apps when the build status changed -- this change should now be included in the current version).

I'm currently using them on a project which uses Bamboo for its buildserver. I couldn't find any sensible equivalent to CCTray, so I had to write a ruby script which polls the project's status page. Luckily, thanks to hpricot, that wasn't very hard.


I later fixed up the traffic lights with a more modern relay board (USB, rather than parallel) and made some other improvements. The details are on my blog post at