|
Garage Door ON -- Whether to open or close the door, we need to -- hit the button and let go quickly... turn off "Garage Door" |
Garage Door OFF --We leave this script empty, but it might -- be useful for something later ? |
--This script runs when you're leaving the house -- and the house will be empty --Unlock the garage door for a while and -- give ourselves some time to get out... turn on "Garage Lock" turn on "Garage Door" 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...) --in this example, we control the garage door, so -- we have important things to do. --IS the garage door open ? if status of "Door Open" is true then -- IS there motion in the area ? if status of "Front Walk Motion" is false then turn on "Garage Lock" turn on "Garage Door" end if set value of "Verify Count" to 0 execute script "Verify Garage" in 2 * minutes else -- the door is closed, we need only lock it. turnoff "Garage Lock" block unit "Foyer Chime" unblock unit "Rear Porch Motion" write log "All sensors are now armed" -- end if |
Verify Garage --This script will try to close the garage door -- But it will try only three times... --IS the garage door still open ? if (status of "Door Open") is true then -- IS there motion in the area ? if (status of "Front Walk Motion") is false then turnon "Garage Lock" turnon "Garage Door" end if set value of "Verify Count" to (value of "Verify Count") + 1 if (value of "Verify Count") is less than 4 then execute script "Verify Garage" in 2 * minutes else -- we're having trouble closing the door ...let someone know. beep write log "Unable to close the garage door ? " end if else turnoff "Garage Lock" write log "The garage door is now down and secure" end if |
Verify Count --This 'unit' doesn't need any scripts, it is just a -- way of counting things .... |
Back to Home Page |
Tutor Index |
Lasers and Magnetics ! |
Copyright 2007, Sand Hill Engineering All rights reserved.
Last modified: May 8, 2002
Michael Ferguson, webmaster@shed.com