Skip to content

Continuous Integration build light controller

License

Notifications You must be signed in to change notification settings

smber1/build-light

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build-light

Continuous Integration build light controller.

Monitors Jenkins CI and provides visual indication of the build status via LED strip.

Features:

  • Monitors Jenkins web API directly.
  • Monitors Jenkins via AWS SQS.
  • Plays sound when build finishes.
  • Automatically divides LEDs to each build.

build-lights

Hardware

You'll need:

The Pi is fitted with a polyfuse at the USB 5V rail. You'll need to tap the 5V from the input side of the polyfuse.

pre-polyfuse 5V

top

Refer to images in build-light/docs. When soldering the 4-pin JST SM Plug to the LED strip, make sure to solder it on the input side of the strip (input is marked with DI, CI). If you want protection for the Pi SPI pins, include the schmitt trigger buffer along the 2 SPI lines and power the buffer from the 5V that was tapped earlier (before the polyfuse).

Software

You'll need:

  • Your favourite Pi distro, as long as there is userspace access to spidev (e.g. /dev/spidev0.0). If you don't have a favourite distro, check out this minimal Raspbian install: https://github.com/jmattsson/raspbian_base
  • Python 2.7

Installation

First of all, get the build-light source.

$ git clone https://github.com/jasaw/build-light.git

If using AWS/SQS you'll need to:

$ git clone git://github.com/boto/boto.git
$ cd boto
$ sudo python setup.py install

You'll need to install AWS/SQS plugin on Jenkins too: https://github.com/jkelabora/snsnotify-plugin

If you want to play sounds (mp3's only):

$ sudo apt-get update
$ sudo apt-get install alsa-utils
$ sudo apt-get install mpg321

If you are using device-tree, enable SPI driver from raspi-config.

raspi-config

otherwise you'll need to add "spi-bcm2708" to /etc/modules to automatically load the SPI driver on boot.

Assuming you have a standard setup of 32 lights connected to spidev0.0, you can test the lights by running (as root):

$ cd build-light/lights
$ python test.py

Create config.json based on one of the sample files in build-light/config/

Test it by running build-light/light_controller in the foreground first (as root).

Copy build-light/scripts/build-light to /etc/init.d/build-light

To automatically start on boot (as root):

$ insserv /etc/init.d/build-light

To remove automatically start on boot (as root):

$ insserv -r /etc/init.d/build-light

About

Continuous Integration build light controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Shell 1.6%