Integrating Lava Lamps to CruiseControl

By Pak-Tjun Chin, on 31-10-2008 10:51

Views : 836    

Favoured : 30


Overview

Over the past couple of weeks or so, I came across an article in the Internet, Pragmatic Automation, that showed how easy it was to integrate red and green lava lamps to radiate the status of their scheduled build for CruiseControl . This got me really excited as the idea of having a couple of hot bubbling lava lamps next to the continuous build server was cool!

In this article, I'd be sharing my experiences on getting the lava lamps to work, which was not as easy as I thought...read on.
 

What You'll Need

The first thing you'd need is X10 automation equipment. I went to the on-line store recommended by Pragmatic Automation but realised that they do not deliver to Australia. Thus, I Googled for local stores that stocked home automation products and came across Envious Technology that stocked up on all the X10 components that I needed:
  

Item Code

X10 Component

Price (incl.GST)

CM19 X10 Radio Frequency Transmitter/Receiver module for PC AUD $44.00
TM3 Radio Frequency Transceiver Interface Module AUD $37.40
LM12 Lamp Module Receiver - plug in AUD $37.40

The total amount worked out to be AUD$131.97, in which I happily paid with my Corporate Card (my people leader --> not so happy). The items were shipped the ext day and I got the package a few days later.
 

 
X10 Box X10 Transceiver Module
The delivery package
X10 Transcevier Module
 
X10 Lamp Module X10 RF Transmitter/Receiver
X10 Lamp Module X10 RF Transmitter/Receiver
 
Note that I do not receive any commission from Envious Technology. If you are able to source for similar products anywhere else, please feel free to do so.

Now, what are the above X10 automation devices for? Well, the RF Transmitter/Receiver module, a.k.a. FireCracker Computer Interface, sends and receives Wireless Radio Frequency (RF) signals from your PC to an X10 Transceiver. This device adheres to the FireCracker (CM17A) Communications Specification. However, I would like to stess that the model number of the device I bought is not a CM17A, but a CM19A model. CM19A is similar to a CM17A bar one difference. CM17A models have a Serial (RS232) interface whilest CM19A models have a USB interface.

The article from Pragmatic Automation uses a CM17A model that allows for code utilizing Java Communications API to send bits out over the serial port and into the Firecracker Computer Interface. So, why did I not purchase a CM17A model? Apparently, I have been informed that the CM17A model is not suited for usage in Australia due to different current frequency requirements of the model. Thus, I went for the CM19A model. Further in this article, I will share some of the issues I had with integrating to the FireCracker Computer Interface via a USB interface.

You would need to obtain a copy of the xfire software that contains a executable to a Windows application which allows for X10 device control.

The couple of other X10 devices are pretty self-explanatory. The X10 transcevier module interfaces up to 16 RF devices and remotes to your X10 system. It also doubles as a plug-in appliance Receiver module. The X10 lamp module allows for automated control to your plug-in lamps.
 

Next, I went looking for lava lamps. I went to a few lighting shops as well as some retail outlets like Target but could not find any. Finally, a work colleague asked me to go to a What's New chain. I went down to one of its outlets at Knox Shopping Centre and got myself a couple of lava lamps, one green and one red, AUD$29.95 each.

Note that I do not receive any commission from What's New. If you are able to source for similar products anywhere else, please feel free to do so.

Warning:  The lava lamps tend to get pretty hot. Do not touch the lamps until they have sufficiently cooled down.

 
  Green Lava Lamp Red Lava Lamp
Cool green lava lamp Cool red lava lamp

You'll need to download a copy of Open Object Rexx.

Finally, you'd need the follwing application package, x10.zip, that includes a CruiseControl publisher plug-in and an implementation of an X10 device controller via a Rexx programme.

That's all you'll need to get yourself started.
 

 X10 API

Burnt LCD Monitor
Burnt LCD monitor

Before we look at the fun part of getting the lava lamps hooked up to CruiseControl, I would like to share my experiences on developing a set of Java APIs that allowed for CruiseControl to publish build status to the lava lamps.

Initially, I was hoping that I could easily re-use some code that was readily available in the cyberspace. I looked and looked but could not find any API that catered for the RF Transmitter/Receiver module (CM19A model). All catered for the CM17A model. As mentioned before, the major difference between the two models was that the CM19A had a USB interface whilest the CM17A could interface via either Serial or USB.

I then attempted to write some code that transmitted a series of bits to the RF Transmitter/Receiver module. I must have sent some wrong sequence out as the next thing I knew, I heard a pop and one of my LCD monitors got burnt. For the sake of not burning my second LCD monitor (and then having to explain to my people leader why I need a couple of new LCD screens), I stopped my experimentation in this.

Sitting at my cubicle grumbling out loud and wallowing in self-pity, one of my colleagues at nab, Michael Tanzer, popped his head over and asked me if he could help. I was more than happy with whatever help I could get. After explaining the problem statement to Michael, he proposed developing a script based off Open Object Rexx that would allow for it to take control of the xfire application as a Windows object.

Thereafter, all I had to do was to write code that implemented the net.sourceforge.cruisecontrol.Publisher interface and some other code that translated build status into its visual representation via the lava lamps.
 
X10 Class Diagram
X10 API Class Diagram
 
 
X10 Sequence Diagram
X10 API Sequence Diagram
 

Ready, set, bubble!!!

Now for the fun part. How do we get the lava lamps to bubble?!!

 
X10 Transceiver Module X10 Lamp Module

Step 1: Transcevier Module

Step 2: Lamp Module

 

 

xFire Software X10 RF Transmitter

Step 3: xfire software

Step 4: RF Transmitter

 

  1. Plug the red lava lamp into the Transcevier Module. Ensure that the device Housecode is set to 'A'. Now, the Housecode could be set to any alphabet from A-P. You just need to ensure that any Housecode that you set is consistent across all your X10 devices for the purpose of the exercise. Note that the device's unit code is hard-coded to 1. Thus, this device 'listens' on A1. Thus, you would be able to send on and off signals to A1 that would trigger the red lava lamp on and off.
  2. Plug the green lava lamp into the Lamp Module. Set the device Housecode to 'A', it it's not so. Then, set the device's unit code to 2. Viola! The green lava lamp would now be 'listening' on A2. Easy-peazzy!
  3. Install the xfire software. Follow the prompts accordingly.
  4. At some point during the installation, you would be prompted to plug in the USB RF Transmitter/Receiver.
  5. Ensure that evertyhing is working by playing around with the xfire application. You should be able to switch the lava lamps on and off. Cool, eh? Well, there's just a bit more to do.
  6. Install Open Object Rexx.
  7. Unzip the x10.zip package to your C:\ drive.
  8. Copy the x10.jar from the dist folder to your \lib directory.
  9. Updated your CruiseControl config.xml file to have the following entries:
  • Within the <project> element, include a new <plugin> element, '<plugin name="x10publisher" classname="com.thenational.edia.x10.X10Publisher"/>'.
  • Within a project's <publishers> element, include a new <publisher> element, '<x10publisher passDeviceCode="A2" failDeviceCode="A1"/>'.
  1. Restart CruiseControl.
 

Now that we have completed setting up, it's time to see what this whole article is all about. Once a build request is triggered, you'll see some log entries like the following in the CruiseControl DOS console:

[cc]Aug-09 13:23:51 Project - Project vol2-build: now building
[cc]Aug-09 13:23:51 jectController- vol2-build Controller: build progress event now building
[cc]Aug-09 13:23:51 ScriptRunner - Buildfile: projects\cc_vol2_main_view\eda_vol2\build.xml
[cc]Aug-09 13:28:10 jectController- vol2-build Controller: build result event: build successful
[cc]Aug-09 13:28:10 Project - Project vol2-build: merging accumulated log files
[cc]Aug-09 13:28:10 jectController- vol2-build Controller: build progress event merging accumulated log files
[cc]Aug-09 13:28:11 Project - Project vol2-build: build successful
[cc]Aug-09 13:28:11 Project - Project vol2-build: publishing build results
[cc]Aug-09 13:28:11 jectController- vol2-build Controller: build progress event publishing build results
[cc]Aug-09 13:28:12 X10Publisher -
Turning pass device (A2) on; fail device (A1) off...

[cc]Aug-09 13:28:12 ControllerRexx- rexx c:\x10\rexx\FireCracker.rex A2 ON
[cc]Aug-09 13:28:14 ControllerRexx- rexx c:\x10\rexx\FireCracker.rex A1 OFF
[cc]Aug-09 13:28:16 Project - Project vol2-build: idle

In no time, you'll be feasting at the sight of green lava bubbling:

Build Successful

Build successful


Cool?!! Now, I will be naughty and break the build:

[cc]Aug-09 13:33:08 Project - Project vol2-build: now building
[cc]Aug-09 13:33:08 jectController- vol2-build Controller: build progress event now building
[cc]Aug-09 13:33:09 ScriptRunner - Buildfile: projects\cc_vol2_main_view\eda_vol2\build.xml
[cc]Aug-09 13:37:22 jectController- vol2-build Controller: build result event: build failed
[cc]Aug-09 13:37:22 Project - Project vol2-build: merging accumulated log files
[cc]Aug-09 13:37:22 jectController- vol2-build Controller: build progress event merging accumulated log files
[cc]Aug-09 13:37:22 Project - Project vol2-build: build failed
[cc]Aug-09 13:37:22 Project - Project vol2-build: publishing build results
[cc]Aug-09 13:37:22 jectController- vol2-build Controller: build progress event publishing build results
[cc]Aug-09 13:37:22 X10Publisher -
Turning pass device (A2) off; fail device (A1) on...

[cc]Aug-09 13:37:22 ControllerRexx- rexx c:\x10\rexx\FireCracker.rex A2 OFF
[cc]Aug-09 13:37:24 ControllerRexx- rexx c:\x10\rexx\FireCracker.rex A1 ON
[cc]Aug-09 13:37:26 Project - Project vol2-build: idle


Oh...oh...we're in trouble...who broke the build???

Build Failed

Build failed

Conclusion

Getting the lava lamps to work gave me a great sense of joy and satisfaction. What was perceived to be a straight-forward implementation became somewhat of a challenge. Now, to convince my people leader to approve funding for one of those large one-line electronic LED signs...

Credits

I would like to thank Michael Tanzer whom developed an Open Object Rexx programme which allowed for the control of a Windows-based application. This allowed me to implement a X10 device controller interface that was able to turn a lava lamp on or off.


Last update: 03-11-2008 15:02

Favoured Print Send to friend
Print

Quote this article on your site

To create link towards this article on your website,
copy and paste the text below in your page.




Preview :


Friday, 31 October 2008

Powered by QuoteThis © 2008


Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!
Attachments:
FileDescriptionFile sizeLast Modified
Download this file (x10.zip)x10.zipJava package that contains a CruiseControl publisher plug-in and an implementation of an X10 device controller via a Rexx programme.774 Kb31/10/08 21:41
Comments
Add New
+/-
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
Please input the anti-spam code that you can read in the image.
wer   |222.125.192.xxx |2008-12-30 04:07:49
???????????. ?????? ??????. ???? ??????????????. ?????? ??????????. ?? ????. ???? ???????????. ?? ??????????????????. ?? ??????????????????????????????????????. ??????????. [url=http://www.zhanshenbb.com]???? ???????????????????????. ???? ????????????. [url=http://www.zhanshenbb.c... ????????????????. ?????? ????????????????. ???? ??????????????????. ???? ????????????. ????????. ????. ??????. ????????.
wer   |222.125.192.xxx |2008-12-30 04:07:10
e can also reverse. 20gb mp3 player this observation. buy cheap wow gold One question we might ask about successful nongame uses of. buy eve isk virtual worlds is. cheapest wow gold whether they too are . Cheapest wow gold special cases. digital mp3 player One obvious example. gamecard world of warcraft is erotic imagery. guild wars gold The zaftig avatar has. guild wars gold been a trope of 3D rendering . lord of the rings online gold since designers have been able to scrape. lotro gold together enough. lotro gold polygons to model a torso. lotro po but examples start far. powerleveling earlier than virtual worlds. powerleveling wow In fact, visual representation. serveur wow of voluptuous womanhood. world of warcraft 60 day predates the invention. world of warcraft time card of agriculture by the. wow game card same historical. wow game cards interval as agriculture. wow gold predates the present. wow gold This is a deep pattern. wow gold cheap It is also a ...
wer   |222.125.192.xxx |2008-12-30 04:06:38
After three hours it. 1GB MP3 PLAYER became apparent that. 1GB MP3 PLAYER in a world as vast. 1gb mp3 players as WoW there seemed. 2GB MP3 PLAYER to be something. best mp3 player for everybody to do. buy mp3 player Out subject had little. buy mp3 players time for the actual. cheap mp3 player core values of the game. cheap wow power leveling becoming a more powerful. des po wow character etc and instead. gold wow focussed on activities. gold wow that made her happy . wearing clothes. and picking flowers. mp3 mp4 player A stereotype of a. female in a male. mp3 player 2gb video dominated gameworld. mp3 player wholesale perhaps stereotypes. exist for a reason.  Interestingly. mp4 players our subject was reluctant. po wow to interact with other. power level characters and . world of warcraft card was moderately intimidated. WOTLK LEVEL by those ranked higher than her. wow leveling service Everyone else seem. wow lvl to know what they are doing. wow lvl 60 ...
wer   |222.125.192.xxx |2008-12-30 04:06:06
Saving up the gold. 2GB MP3 PLAYER to get a mount. 4GB MP3 PLAYER was a real challenge. 8GB MP3 PLAYER for me and I started. buy cheap wow gold saving when I was. canon digital camera level 39 and. carte wow finally had enough . cd key gold at level 41. cheap mp3 players So off I ran to. cheap world of warcraft gold the Easvale logging. dvd player camp east of Goldshire. gold wow to pay for. karte wow my training and. mp3 player to buy my horse. mp3 player I chose the Chestnut Mare. mp4 player which I love. play war games If you are an. world of warcraft buy gold alliance player. world of warcraft card you are familiar. wotlk with Goldshire. wotlk It is the place. WOTLK Power leveling where you play the. wow account early game. wow europe You are a level 5 running . wow geld around discovering this. wow gold wonderful world of warcraft. wow gold You fight your first. wow gold verkaufen wolves here, and adventure. wow kaufen into your first mines here. wow le...
wer   |222.125.192.xxx |2008-12-30 04:05:32
World of Warcraft mods. buy wow gold are extensions to. buying gold world of warcraft World of warcraft. cheap wow gold WoW Mods serves many purposes. cheap wow gold from giving you a. cheap wow gold new look to your interface . cheapest wow gold to displaying additional. clé cd info to help you in raids. compte wow Mods also makes your life. eve isk easier giving you. free online war games options that Blizzard. mp3 players never dreamed of. portable mp3 player The authors. portable mp3 players of WoW mods are. sell wow gold fans of the game. world of warcraft gold taking it upon themselves. wow to create modifications. wow for World of Warcraft and. wow acc sharing it with the. wow authentication online community. wow card Most of the WoW Mods. wow compte on this website are . wow gold standalone mods meaning . wow gold you need nothing other than. wow gold the game itself. wow gold to get it to work. wow gold Others are addons to. wow gold an already existin...
qanlyp  - 123456   |123.145.172.xxx |2008-12-23 22:13:09
wrath of the lich king power leveling,wrath of the lich king power leveling,wrath of the lich king power leveling,wrath of the lich king power leveling,wrath of the lich king power leveling,wrath of the lich king power leveling, wrath of the lich king power leveling,WOTLK Power LevelingWOTLK Power Leveling,WOTLK Power LevelingWOTLK Power LevelingWOTLK Power LevelingWOTLK Power Leveling,WOTLK Power Levelingwlk Power Levelingwlk power leveling,wlk power levelingwlk power levelingwlk power levelingwlk power levelingwlk power leveling

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."