Lava Lamp Notifier

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID LavaLampNotifier Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.4
Nov 13, 2010
1.355
Source Code
Issue Tracking
Maintainer(s)
Subversion
Open Issues
Ed Randall (id: edrandall)
Usage Installations 2013-Apr 143
2013-May 150
2013-Jun 148
2013-Jul 152
2013-Aug 154
2013-Sep 151
2013-Oct 146
2013-Nov 143
2013-Dec 130
2014-Jan 144
2014-Feb 136
2014-Mar 138

Indicate Job status using a Lava Lamp

Circuit Design

The lamp which I used was a "USB Glitter Light" available at low cost from your favourite online auction site, local market or pound store.
Unfortunately programmatic control of this type of lamp is not possible in the as-purchased state, when plugged in it is always on.

Therefore I designed a simple circuit around an FTDI MM232R module and some MOSFET drivers to accomplish this, also adding a piezo-beeper to alert developers when a build fails. The prototype was simply built on old-fashioned stripboard (0.1" pitch).

I used a self-drive piezo-electric beeper to provide an audible alert.
It would have been nice to fit the board inside the base of the lamp, but my prototype was too large, so the completed board was fitted in to a small plastic box with a DC power socket for the lamp. I cut the USB plug off the the lamp cable and replaced it with a matching DC power plug. An LED in parallel with the socket provides an additional on/off indication.

All of the documentation (including full resolution .svg diagrams) is contained within the Jenkins plugin LavaLampNotifier.hpi as LavaLampElectronics.zip.
You will need to use your favourite .zip tool, jar or unzip to extract it.


Lamp Control Software

Since the Jenkins server is back in the server room, the lava lamp module is attached to USB on a desktop machine and a simple socket server runs to listen for build results.

FTDI provide free USB drivers for a number of operating systems. Higher level code still has to interface with the driver - a SourceForge project, FTD2XXj, has already done this, so writing a Java program to control it becomes very straightforward.

The lamp control software is also zipped up inside the released Jenkins plugin as LavaLampController.zip. Extract it from LavaLampNotifier.hpi , then unpack it to a directory on your Windows or Linux machine. An example Windows batch file lavalamp.cmd is provided which should get you up and running.

LavaLampServer arguments used within the script are:

LavaLampServer TCPPort UDPPort MCAddr MCPort
     TCPPort - Port to listen for TCP connections (or 0 to disaable TCP) (default:1999)
     UDPPort - Port to listen for UDP connections (or 0 to disable UDP) (default: same as TCPPort)
     MCAddr -  Multicast Address to listen on (default: multicast disabled)
     MCPort -  Port to listen for Multicast (default: same as UDPPort if multicast enabled)

TODO: Make the lamp controller work with the more generic Notification plugin as an alternative to the one below.


Lamp Notifier Plugin

The notifier plug-in talks to this server across the network. (I could have used an existing RSS notifier, but didn't want the lamp to be polling Jenkins constantly, I rather preferred the immediacy of the result being "pushed" to a known listener.) It consists of a "global" module which allows configuration of any number of different LavaLamp host/port combinations (to support different jobs or projects).


A "per-job" module then allows selection of the lamp you want to notify with the status of each job.

Theoretically alternate "lamp server" modules could be developed which might not necessarily use a hardware lamp at all - listening on an IP-multicast address to pop up an icon in everybody's windows tray is one idea.


Version History

Version 1.4 (13th November 2010)

  • 1.3 messed up due to incorrect Maven POMs, fixed and re-released.

Version 1.3 (12th November 2010)

  • Documentation completed. 
  • Incorporated sub-projects as .zips within the .hpi.
  • Supports notification / listening using IP multicast.

Version 1.2 (30th October 2010)

  • Avoid NullPointerException when no lamp selected in job configuration

Version 1.1 (28th October 2010)

  • Support choice of UDP and TCP communications between notifier and server

Version 1.0 (26th October 2010)

  • Initial Release.

Labels

Edit
plugin-notifier plugin-notifier Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment