TODO: Write a gem description

Fetches Jobs from a Jenkins CI via the REST JSON API and sets LEDs of an Extreme Feedback Device to the status of the corresponding Job.

Tested with Ruby v2.0.0p247 running on Raspberry Pi with Raspbian "wheezy" / Debian GNU/Linux 7 "wheezy".


To get read-write permissions for the SPI-Device with udev you can add the following rule:

# /etc/udev/rules.d/99-spidev.rules
SUBSYSTEM=="spidev", GROUP="spidev", MODE="0660"

For this you first need to create a group spidev (as root):

$ groupadd spidev

Add your user to the new group (as root):

$ adduser foo spidev

After this, do a restart or run the following commands (as root):

$ udevadm control --reload-rules
$ udevadm trigger --subsystem-match=spidev


Add this line to your application's Gemfile:

gem 'extreme_feedback_device'

And then execute:

$ bundle

Or install it yourself as:

$ gem install extreme_feedback_device


TODO: Write configuration instruction here

The default location for the settings file is: $HOME/.extreme_feedback_device.yml

  • jenkins.*: ...
  • infinite_loop.sleep: the time (in seconds) to sleep between each request.
  • pi.num_leds: the number of LEDs on your attached Extreme Feedback Device.
  • pi.map_leds: the mapping of LEDs (with LED's index) to Jenkins Jobs (with Job's name).
  • spi.devive: the SPI Device to write on.


    user: api
    token: 0123456789ABCDEF
    url: http://jenkins.example.com/
    sleep: 5
    num_leds: 2
      i_1: Jenkins - Master
      i_0: Jenkins - Production
    device: /dev/spidev0.0


Output of extreme_feedback_device --help:

extreme_feedback_device [OPTION] ...

-h, --help:
  show help.

-m, --mode [run]:
  set mode 'run' for a single run or 'loop' for infinite loop.

-n, --namespace [default]:
  settings namespace.

-p, --pid [~/.extreme_feedback_device.pid]:
  pid file.

-s, --settings [~/.extreme_feedback_device.yml]:
  settings file.

-v, --version:
  show version.


Copy the example init.d script and change it for your needs (as root):

$ cp `gem contents extreme_feedback_device | grep vendor/init.d/extreme_feedback_device` /etc/init.d/extreme_feedback_device
$ chmod u+x /etc/init.d/extreme_feedback_device
$ vim /etc/init.d/extreme_feedback_device

If you want to start the daemon automatically on boot (as root):

$ update-rc.d extreme_feedback_device defaults


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request