Inspired by Bubble, Bubble, Build's in Trouble over at Pragmatic Automation, I set up something at my client that is extremely cool. And by “cool” here, I mean “almost painfully nerdy”.
Basically, I've hooked up a series of colored lights to our CruiseControl.NET build. Via X10 automation, I turn on red, green, and/or yellow lights based on the status of the build. It looks like this:
Since I put them up on top of my cube, the lights are visible across most of the part of the floor where my team sits. I already find myself looking up to check the status whenever I arrive in the morning.
The reason that two lights are on in this picture has to do with the semantics I attached to the signals. The red and green lights indicate whether the last build was successful or not. The yellow light indicates that a build is in progress. I could have shut off the red or green light while a build was running, but I thought this way added a little more information while still being very easy to understand at a glance.
It was actually pretty impressive how easy this setup was to get going. After ordering an automation kit ($99 from http://www.x10.com), downloading the free SDK, and stopping off at Target for some cheap lamps and some bulbs (about $25), some simple perusal of the samples showed that it's basically one line of very easy-to-understand code to turn each light on or off. Monitoring the build was only slightly harder: I just used cctraylib.dll from the CruiseControl distribution to poll the build state. That was maybe 20 more lines of code. Rolling it all up into a service (so it will continue to work when I'm not logged on) took me about 90 minutes total.
The kit came with a bunch of other stuff that I'm not using, like remote controls and a motion sensor, so I probably could have gotten off a little cheaper. But when I finish my gig here, I'll take the whole thing home and find a use for it around the house. Hopefully something equally nerdy. :)
Careful with that Axe, Eugene!
ReplyDeleteMy most requested presentation for the .NET user groups I present at has been "Home Automation with .NET". You just arrived at the entrance to a very deep rabbit hole. Welcome!
I'm presenting my Home Automation with .NET presentation next month, I'm definitely going to share this idea with them.
I use my setup with Media Center to turn the lights on and off and to set the thermostat from the MCE remote. You'll never sleep again. Especially when you can control your sprinklers from your MCE Extender. ;)
Truthfully, I'm having a hard time figuring out more than a few simple uses for automation at my home. I never touch the thermostat, and with one or two exceptions, the lights switches are in reasonably easy-to-get-to locations already. I don't have a home theater, and the problem of "where's the damn remote" seems to be a major one.
ReplyDeleteWhat sorts of things am I failing to think of? What kinds of cool stuff can I do?
So are you going to post the code to integrate with CCNET? That's pretty sweet.
ReplyDeleteCool post Craig.
ReplyDeleteOn the NxOpinion project, we have used the Ambient Orb:
http://blogs.msdn.com/mswanson/articles/169058.aspx
I'll see what I can do about getting the source up. I have to ask permission, because I did it on a client's time, so they own it.
ReplyDeleteI've heard about Ambient Orb, and it's pretty cool. This approach had the dual advantages of being very slightly cheaper and being usable for lots of other purposes afterwards.
Sweet
ReplyDeleteYou are SUCH a nerd. :)
ReplyDeleteGuilty. ;)
ReplyDeleteIf you can't get permission, let me know and I'll post some that I wrote. I'm not fortunate enough to have clients that pay me to goof off with X-10. ;)
ReplyDeleteMaybe the client will want to buy the lights since they own the code.
ReplyDeleteI smell a future cable show...
Home Automation for the extreeme nerd:
1. Water your plants (killer robots optional)
2. Start the dishwasher when you forgot, or use a scale and trigger washer's start based on wait load, send status information to the web for remote monitoring.
You sick, sick man...
ReplyDeleteOn the consulting front, if you're having a hard time coming up with ideas for household uses for X10, consider what it could do for the pr0n industry. I'm sure you could make a buck or two there with your innovations ;)
Thanks for all the "suggestions" everyone. :p
ReplyDeleteClint: why on earth would you think the killer robots are *optional* ?
Excellent! I'd love to post some .NET code over on http://pragmaticautomation.com.
ReplyDeleteOK, I got the go-ahead. I'll pull the code together and post a link to it in the comments here. Might take me a day or two.
ReplyDeleteDarn. Having only email notifications of build results feels *so* lame now... Sigh.
ReplyDeleteHeh. It's just a fancier version of cctray, really. You *do* run cctray, right?
ReplyDeleteCode has been posted.
ReplyDeletehttp://pluralsight.com/wiki/default.aspx/Craig.BuildLightsCode
Enjoy.
I agree with the statement "Truthfully, I'm having a hard time figuring out more than a few simple uses for automation at my home. I never touch the thermostat, and with one or two exceptions, the lights switches are in reasonably easy-to-get-to locations already. I don't have a home theater, and the problem of "where's the damn remote" seems to be a major one. "
ReplyDeleteJust give me something that will bring me coffee in the morning! Oh and a remote finder!
Craig I have a few suggestions on HA projects.
ReplyDeletewater sprinklers- I program for a living, and I still cant get the sprinkler controller to work correctly.
Dog Feeder/waterer- I never get home at a decent hour, and my dogs look like its there last meal if Im a few hours late.
Alarm Clock - I have a dent in my alarm clock from hitting the snooze button so many times, If I have get up and go to my computer in my office
I might as well get dressed :)
Those are all good suggestions. However:
ReplyDelete1) Our lawn is about 10' by about 15', and we get enough rain that I don't need to water it basically ever.
2) I don't have any pets.
3) If I'm tired enough not to get up, I'd rather oversleep.
In other words - none of those help *me*. :)
That's got to be the crazy-coolest integration system i've yet seen ;o)
ReplyDeleteI think the one that uses lava lamps is slightly cooler, but thanks!
ReplyDeleteI know it's been a while, but I was just researching a very similar idea recently, and your posts and code sample helped me make my decisions, and get the small side-project done. Thanks!
ReplyDeleteI just posted about it on my blog, if you're interested in what I did: http://aaronlerch.blogspot.com/2005/09/x10-ified.html
so at the top you said it was about 125 to make the lights and the system but i would like to know how much the system will sell for because say i made it and then desided to see how much it sells for and if its more then it took to make then i just earned what ever i got extra so how much do you supose it sells for?
ReplyDeletePersonally, I would pay you about $125 for it, since everything you need to put the system together (except the hardware) is available for free.
ReplyDeleteSetting up build systems, on the other hand, would be a fairly lucrative consutling business.
Great post. Thanks for posting the code. In my office, we took the red/yellow/green concept one step further and bought an actual traffic light (~$200). I adapted your code to the latest version of CCTray and hung the traffic light up on the office wall just now. Awesome.
ReplyDeleteThat is fantastic. I'm glad I played a small part. :)
ReplyDeleteWow, that is, on one hand, incredibly nerdybut on the other hand, I really, really like it. I generally use a big dry erase board to keep track of builds and whether or not they were successful, but thats not something that can be seen as easily as your lights. In fact, it can get to be a little convoluted with different people marking things on the board and stuff accidentally getting erased. Your light system looks to be much more efficient, and it doesnt sound like it was very hard to set up at all. The price isnt even that bad. I wonder if you could really trick this out, thoughlike forget just a green light for a good build. I want strobes, some blaring music, you knowlets celebrate when the build goes off like it should! For those really annoying builds that seem to take forever to get to compile, maybe some optional confetti could be included.
ReplyDeleteCheck this Agile Lamp out.
ReplyDeleteAlso at:
http://gitorious.org/projects/agile-lamp
and
http://agileville.myshopify.com/collections/frontpage
What a unique and colorful way to handle the progress of projects. I can’t wait for the source code.
ReplyDelete