From: Paul Lutus Date: 2006-10-26T01:05:12+09:00 Subject: Re: x10 and ruby? Ian Morrison wrote: > hi all, > > i'm interested in using x10 and a home automation project to play around > with ruby. i see that a couple of years ago there was talk on this list > about that, and before that hal fulton had some experimental code to > talk to a cm11a controller. i found the cm17a firecracker module, but > that's a very primitive subset in x10 - i'm more interested in having > sensors around the house that run ruby methods in response to events. > is this something that anyone here has experimented with? aside from > the firecracker module which is very minimal, i've not found anything > that i could hook up to a cm12a (i'm in the UK) to take a picture when > someone climbs in through the window. I've done a version of this with both the RS232 and USB versions of the X10 computer interface, but in neither case did I fully implement the protocol. The information about both interfaces is available online, and it turns out that the USB interface is much more difficult to get going (because of the complexity of the USB interface and driver requirements). I ended up using the serial computer interface (the CM11A) and I can get all sorts of interesting information from it, most of which I don't actually use. The CM11A interface description is here: http://www.smarthome.com/manuals/protocol.txt The other advantage of the CM11A (the RS232 version), apart from the fact that it caters to my laziness, is that it puts out a somewhat more powerful 120KHz line signal than the 1132U (the USB version). This ended up deciding the issue for me -- I couldn't reach certain units in my house with the 1132U, notwithstanding that I put in isolators to give it a boost, and a crossover feed in my electrical panel (that shares the 120KHz signal to both legs of typical house wiring). I've written my interface code in years past in C++, Perl, Java and PHP -- only Java had an actual, formal RS232 interface class, the others required preliminary external RS232 setup -- but I'm sure the code would be easy to write in Ruby as well, and of course, once written there, much easier to expand. But I want to tell you -- watch out for SmartHome, the primary online vendor for X10 stuff. It's been my personal experience that if they get your e-mail address, they will never let go. In years past, I have had to change e-mail addresses after placing an order with them. I've since adopted the practice of creating a throwaway e-mail address when placing orders with them -- one order, one e-mail address. They try to get around this by mailing catalogs to your shipping address, regardless of your expressed wishes. One final note. I personally see the X10 technology as rather marginal, and sometimes, during power-line glitches, the interface will get into a zombie state, where I have to unplug and replug it to bring it back to life, which is a disaster for my primary use (making my house look lived in while I am away). I look forward to some better technology, maybe one that relies on 802.11, rather than a 120KHz power-line signal that I can scarcely make travel 60 feet. HTH. -- Paul Lutus http://www.arachnoid.com