I didn't know anything about BlueLava -- I was just thinking of the CPAN
X10 modules, which include FireCracker support:
http://cpansearch.bulknews.net/markup/X10-0.03/README
'yum' couldn't find any Fedora (or ATrpms?) packages for these, so I
installed them with the old 'perl -MCPAN -e shell' technique. It was a
little rough... X10 was OK, but it depended on Device::SerialPort which
I had to use 'force' to install (web searches turned up email
discussions about glibc bugs and other unfun stuff). I haven't tried it
on Windows (I don't have a Windows system with a serial port.)
Anyhow, here's some simple Perl to turn a device off and on. Please let
me know if you can get it working after changing the variables, etc.
#!/usr/bin/perl
use X10;
use X10::FireCracker;
use X10::Event;
my $dev = '/dev/ttyS0';
my $house_code = 'A';
my $device_num = 2;
my $fc = new X10::FireCracker(
# some of the following might not be required:
serial_port=>$dev,
port=>$dev,
controller_type => 'X10::FireCracker',
controller_port=>$dev,
devices => 'devices.x10',
debug => 1,
);
print "on:\n";
my $e = new X10::Event("$house_code $device_num ON");
$fc->send($e);
print "off:\n";
my $e = new X10::Event("$house_code $device_num OFF");
$fc->send($e);
--
peterw
------------------------------------------------------------------------
peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=24065
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins