X10 and ruby?

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.

any pointers would be appreciated,

ian

On 10/25/06, Ian M. [email protected] wrote:

that i could hook up to a cm12a (i’m in the UK) to take a picture when
someone climbs in through the window.

any pointers would be appreciated,

I’m pretty sure that the cm12x is the same as the cm11a except for
voltage and plug type, i.e. it has the same computer interface
protocol.

I’m mildly interested in the same question about X10 support in Ruby.
I currently use Misterhouse for some primitive HA, but it’s a big
honking lump of perl code which I haven’t looked at since I installed
it several years ago.

A ruby based replacement for Misterhouse could be sweet, although I’m
not sure I want to spend much time getting such a thing started.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Ian M. wrote:

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.

Ian M. wrote:

someone climbs in through the window.
I’m happy that some people are interested in this. I tried 4 or 5
years ago to garner some interest, and there was little.

Let me know when you come up with something.

I realized ages ago that Domo would never happen, because no one
else wanted to work on it, and it’s a multi-person project.

What’s much more realistic is to get Ruby scripting working
with HomeSeer (www.homeseer.com) one way or another.
That’s my current dream.

Hal

Hal F. wrote:

/ …

What’s much more realistic is to get Ruby scripting working
with HomeSeer (www.homeseer.com) one way or another.
That’s my current dream.

Umm, I just looked into this, and HomeSeer is simply an application that
talks to whatever home controller you already have. If you have a CM11A
or
1132U for X-10, HomeSeer knows how to talk to it. So from a Ruby
perspective, we might as well simply write a home controller in pure
Ruby
that talks to the X-10 controllers.

What I mean is HomeSeer isn’t necessary – if we intend to write a Ruby
controller to talk to X-10 interfaces, we might as well do that
directly.

Also, a bit off our topic, it appears that HomeSeer is a Windows
program.
Not much use to me, assuming I wanted to go that route.

I have a very basic PC-based home controller that turns my lights on and
off
quasi-randomly when I am on the road (also I can dial into my house
remotely and control the house using my installed X-10 stuff, plus I can
look at some TV camera outputs, sort of check up on things). I could
easily
have created something much more ambitious if I had felt the need, but I
lost interest once I realize how annoyingly unreliable and tricky the
X-10
stuff is.

I think it wold be very easy to create an X-10 based home controller
using
Ruby and a GUI front end (I mean, if I were not so lazy). I think it
would
end up looking much like HomeSeer.

There’s also a linux command line interface to the cm11a called heyu2
(there was an earlier heyu). I don’t know if it’s portable to other
platforms, but it’s written in C.

I guess that might be a candidate to be wrapped.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Paul L. wrote:

Umm, I just looked into this, and HomeSeer is simply an application that
talks to whatever home controller you already have.

Yes, and Ruby is just for controlling your CPU. :slight_smile:

If you have a CM11A or
1132U for X-10, HomeSeer knows how to talk to it. So from a Ruby
perspective, we might as well simply write a home controller in pure Ruby
that talks to the X-10 controllers.

What I mean is HomeSeer isn’t necessary – if we intend to write a Ruby
controller to talk to X-10 interfaces, we might as well do that directly.

If that were true, I would agree. But that is about 2% of its
functionality.

It controls many kinds of hardware other than X10, including Z-wave,
Xantech, Slink-e, and others. It handles speech recognition and speech
synthesis (thru Microsoft Agent, but the integration is smooth and
seamless). It has a built-in scheduler, a built-in web server, a rich
API, telephone control, a COM interface, and a huge pile of code written
for it (thousands of user-contributed scripts – unfortunately in VB).

Also, a bit off our topic, it appears that HomeSeer is a Windows program.
Not much use to me, assuming I wanted to go that route.

True. That’s a thorn in my side as well.

That is why my plan was to wrap the COM interface with Ruby (half of
which is easy, the other half tricky), and then tie that to drb.

Then you’d not only have a Ruby interface, but a remote one. It could
be used to write controlling apps as Linux command line apps, web apps,
or GUIs.

end up looking much like HomeSeer.
It would if you do the other 98% also.

Don’t get me wrong. I don’t like Windows either. I use it for HomeSeer,
for Second Life, and for one or two other programs such as Spades.

But, considering it runs on Windows, HS is good software. It’s the best
home automation software I’ve seen – better than misterhouse,
smarthouse, Cyberhome, HAL, Home Director, the X10 thingy, or anything
else I’ve looked at. Just my opinion.

Hal

Hal F. wrote:

/ …

But, considering it runs on Windows, HS is good software. It’s the best
home automation software I’ve seen – better than misterhouse,
smarthouse, Cyberhome, HAL, Home Director, the X10 thingy, or anything
else I’ve looked at. Just my opinion.

Well, thanks for setting me straight on HomeSeer. I didn’t realize the
effort level they’ve gone to. It sounds quite powerful.

Too bad it’s married to Windows, as so much is these days.

Paul L. wrote:

Well, thanks for setting me straight on HomeSeer. I didn’t realize the
effort level they’ve gone to. It sounds quite powerful.

Too bad it’s married to Windows, as so much is these days.

Yes… I’d love to have a Linux equivalent.

I dreamed of using Festival for speech synthesis and Sphinx for
voice recognition… trouble is, I couldn’t get these to work
on their own, much less integrated with each other and a third
controller.

I once outlined something I called “Domo” – but it will never
be written. I removed the link from my page, but it’s still at
http://rubyhacker.com/domo.html

Some people were confused by my use of the word “server” – I
meant it in the software sense, not the hardware. Although
the processes could be split among boxes, they could also all
run on the same box.

Hal

Is there a way to use Ruby to control/monitor actions on a PC using a
RS-232 connection?
If so, that might be one way to build home monitoring devices without
having to pay for the homeseer products.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs