December 2014
Open Lightin Architecture

A bit of fun at Christmas.

  • Raspberry Pi,
  • 50x WS2801 RGB LEDs
  • some random electronics (breadboard, resistors, old 5V3A power supply and a 7HC24851)
  • Cheesy Christmas party cover CD - Jive Bunny :-)
  • Open Lighting Architecture (OLA) – driving the LEDs
  • Python, Flask and bootstrap - for the frontend

The Open Lighting Architecture project makes it really easy to talk to WS2801 based LED strips, especially if you’re already familiar with DMX and the OLA python API (see Colour Commander). I built a generic effect executor service that took a configuration object that specified a speed and an initial colour for each LED. The executor then tweened each LED from its current colour to the colour of the LED next to it. I built about 10/15 of these initial configs including straightforward alternating red/green cheesy rainbow to a purple/straw random flicker.

I then added a bootstrap based front end web service using flask. This let the rest of the office pick which effect the lights were playing. Communication with the backend was via Zero Message Queue.

It was good, but needed a bit more cheese…

Enter Jive Bunny and the mastermixers – Ultimate Christmas Party and Music Playing Deamon (MPD). MPD’s python API meant it was a quick job to add a playlist control function to the front end. Only problem now was that the speakers were near my desk and someone kept playing S-Club 7’s “Reach”.