This page is all about the CM15A for Home Automation!


X10 ActiveHome Pro device.


The main goal is to get the CM15A working with MisterHouse
Let's look at some minimum requirements:
Neil Cherry has modified a LabJack driver to work with the CM15A. Install this first.


When you have installed the driver there are plenty of things you can do. For starters just try my minimal script.
Here is my minimal perl script that turns device A5 on and off:

#!/usr/bin/perl -w
# Written By Paul DeMarco
# Auguest 28, 2005
# CM15A Turns device A5 On or Off

use Fcntl;

sysopen( CM15A, "/dev/usb/cm15a0", O_RDWR |O_NOCTTY | O_NONBLOCK ) || die "Cannot open device $!";
syswrite CM15A, pack( "CC", 4, 0x61 ), 2;
sleep 1;        # can be less
#syswrite CM15A, pack( "CC", 6, 0x62 ), 2;      # ON
syswrite CM15A, pack( "CC", 6, 0x63 ), 2;       # OFF
close( CM15A );

Now I am working on getting a MisterHouse version working.
Check out this perl module CM15A.pm It follows the same syntax of the other two MisterHouse PLCs. (CM11 & CM17A)

#!/usr/bin/perl

use Fcntl;
use ControlX10::CM15A qw( send_cm15a 0.00 );

sysopen( CM15A, "/dev/usb/cm15a0", O_RDWR |O_NOCTTY | O_NONBLOCK ) || die "Cannot open device $!";

#send_cm15a( \*CM15A, "AO" );   # turn all lights on house code A ON
send_cm15a( \*CM15A, "AN" );    # turn all lights on house code A OFF
#send_cm15a( \*CM15A, "A5J" );  # turn A5 ON
#send_cm15a( \*CM15A, "A5K" );  # turn A5 OFF

#send_cm15a( \*CM15A, "A3J" );  # turn A3 ON
#send_cm15a( \*CM15A, "A3K" );  # turn A3 OFF

close( CM15A );
The most important thing here is that they have a 3rd "PLC" language that is PLC neutral. The language is pretty basic, but it accomplishes quite a bit. Certainly ON, OFF, ALL_LIGHTS_ON, ALL_LIGHTS_OFF, ALL_UNITS_OFF, DIM and BRIGHT. If you wanted to you could just use this from the command line or inside of crontab. You simply have to learn the meaning of little codes like: A1J means turn A1 ON, or A9K means turn A9 off. It's not bad, and certainly better than nothing.
Good luck.
Paul


Page Last Modified Aug 28, 2005