
247
Chapter 11, Keyless Entry Welcome Home
Exhibit A: Bill of Materials
Item Quantity Part number
KwikSet TitanOne keyless remote
deadbolt lock
1 Model 886
X10 keychain remote 1 Smarthome #4004
X10 plug-in RF base 1 Smarthome #4005X
X10 CM11A PC interface 1 Smarthome #1140
X10 lamp modules Optional, as needed Smarthome #2000
X10 wall switches Optional, as needed Smarthome #2031
Exhibit B: Script Source Code
#!/usr/bin/perl
use lib './blib/lib','./lib';
# Configure user-modifiable codes. "hc" means "housecode"
my $lights_hc = "B";
my $entry_lights_unit = "4";
my $kitchen_door_lights_unit = "5";
my $downstairs_hallway_lights_unit = "6";
my $uptairs_hallway_lights_unit = "7";
# Events generated by door lock
my $events_hc = "A";
my $door_lock_event_unit = "2";
# Key hours of the day (24 hour time format)
my $daytime_hour = "8";
my $evening_hour = "18";
my $bedtime_hour = "22";
# Door lock events
my $door_locked_event = $events_hc.$door_lock_event_unit.$events_
hc."K";
my $door_unlocked_event = $events_hc.$door_unlock_event_unit.$events_
hc."J";
my ($door_locked, $data)
my (@before, @now);
my ($OS_win, $serial_port);
# Load the proper SerialPort module based on platform
BEGIN { $| = 1;
$OS_win = ($^O eq "MSWin32") ? 1 : 0;
if ($OS_win) {
eval "use Win32::SerialPort";
die "$@\n" if ($@);
$serial_port = Win32::SerialPort->new ("COM1",1);
}
Exhibit B
hhpg.indb 247
11/24/2004 1:56:23 PM