|
|
|
|
--This script monitors the front driveway sensor -- If it goes ON, something is moving there. -- If it's status is true, there may yet be motion? if time delta of "Front Walk Motion" is less than 30 then turn off "Driveway Floods" in 20 else turn on "Foyer Chime" turn on "Driveway Floods" for 2 * minutes write log "Someone entering driveway" end if |
--when the motion sensor 'relaxes', we get an OFF -- this means 'no motion seen for a while'. -- We need to make sure we didn't miss the ON ! if status of "Front Drive Motion" is false then if time delta of "Front Walk Motion" is less than 30 then turn off "Driveway Floods" in 20 else turn on "Foyer Chime" turn on "Driveway Floods" for 2 * minutes write log "Someone entering driveway - missed the ON" end if end if |
--If motion is sensed at the front walkway turn on "Front Walk Light" --maybe someone's driving in? if time delta of "Front Drive Motion" is greater than 30 then turn on "Foyer Chime" write log "Movement on the front walkway" else write log "Someone has arrived" end if |
--things get still again, we get an OFF -- this is a backup, did we miss the ON ? if status of "Front Walk Motion" = false then turn on "Front Walk Light" --maybe someone's coming in? if time delta of "Front Drive Motion" is greater than 30 then turn on "Foyer Chime" write log "Movement on front walk, missed the ON" else write log "Someone has arrived, missed the ON" end if end if |
--This is an appliance module which controls -- power to the motor for the door opener. -- If this is not enabled, the door cannot open. --There should be a wireless transceiver on the same -- house code so that the door can be enabled -- without the computer, but can be controlled -- by XTension and your scripts write log "The garage door is unlocked" |
--Someone has sent a command to lock the door write log "The garage door is locked" |
--This script monitors the Garage Door -- If it goes ON, the door is OPENing -- Whenever it's status is true, the door is open if time delta of "Door Open" is greater than 20 then write log "The Garage Door is opening" turn on "Foyer Chime" -- if the door is locked, then what's up ? if status of "Garage Lock" is not true then write log "Someone is forcing the garage door open" end if end if |
--whenever the garage door closes, we get an OFF -- this says that the door has just closed. -- if the status tests False, the door is closed if time delta of "Door Open" is greater than 20 then write log "The Garage Door is now closed" -- if the door is locked, then what's up? if status of "Garage Lock" is not true then write log "Someone is forcing the garage door" end if end if |
--This script runs when you're leaving the house --Unlock the garage door for a while and --let's give ourselves some time to get out... turn on "Garage Lock" execute script "Guard the Home" in 10 * minutes |
--This script will set the house into "ARMED" mode -- It should only be set when the house is empty. -- ( pets are another item...) write log "All sensors are now armed" block unit "Foyer Chime" unblock unit "Rear Porch Motion" -- --in this example, this is all we will do. --later we will also want to close the garage door turnoff "Garage Lock" |
Back to Home Page |
Tutor Index |
Let's go for another one ! |
Copyright 2007, Sand Hill Engineering Inc. All rights reserved.
Last modified: May 8, 2002
Michael Ferguson, webmaster@shed.com