One thing I'd say is I'm OCD and would want it looking tidier!
Where is it located in the house, in the basement? Do you find it gets warm in there?
Where is it located in the house, in the basement? Do you find it gets warm in there?
Do you find it gets warm in there?
Looks great!
Can I just ask what you use 4 Galaxy alarm panels for, is it all alarm and if so would it not be better to have rio's (remote input output). I am starting out on a similar project in a good sized house and would love to know more.
Bob,
Interfacing the galaxy is easy. Honeywell don't provide the spec, but it's easy to decide if you can do hex. Each zone is just a resistance meter, and the value in ohms is broadcast from each Rio for each zone every second. The rios have an ID, and that's it. Extra points if you can decide the keypad comms, it's not too tricky. Setting outputs etc... Can be done I'm sure, but I'm not there yet.
#!/usr/bin/perl
system( "logger 'HAL - dmx_prod_rebooted' ");
$inc_up = 5 ;
$inc_down = 5 ;
$min_intensity = 70 ;
while (true)
{
use Device::SerialPort ;
my $port = Device::SerialPort->new("/dev/ttyAMA0") ;
$port->baudrate(9600) ; $port->parity("none") ;
$port->handshake("none") ; $port->databits(8) ;
$port->stopbits(1) ; $port->read_char_time(0) ;
$port->read_const_time(1) ;
#Set Status's
@files = <dmx_set_*.txt> ;
foreach $file (@files) {
$channel = $file ; $channel =~ s/.txt// ;
$channel =~ s/dmx_set_// ;
chomp($channel) ;
open (FILE, $file) ;
$intensity = <FILE> ;
close (FILE) ;
chomp ($intensity) ;
if ( $intensity > 255 ) { $intensity = 0 } ;
if ( $intensity < $min_intensity ) { $intensity = 0 } ;
if ( ${variable_."$channel"} != $intensity )
{
if (${variable_."$channel"} < $intensity )
{
$set_intensity = ${variable_."$channel"} + $inc_up ;
if ( $set_intensity < $min_intensity )
{
$set_intensity = $min_intensity ;
}
}
if (${variable_."$channel"} > $intensity )
{
$set_intensity = ${variable_."$channel"} - $inc_down ;
}
$port->write( pack "C", $channel ) ;
$port->write( pack "C", $set_intensity ) ;
system( "logger 'HAL - dmx_lighting_set $channel - $set_intensity' ");
${variable_."$channel"} = $set_intensity ;
select(undef, undef, undef, 0.05) ; #Sleep a bit
}
}
$port->close() ;
select(undef, undef, undef, 0.1) ; #Sleeep 100 mS
}