-
Notifications
You must be signed in to change notification settings - Fork 130
Items Door_Item
See original
Defined in items.mht
as
# First, define your actual door object
RF, E1, rf_front_door
STARGATEDIN, 7, sg_patio_door
# Object 'front_door' attached to existing object 'rf_front_door'
DOOR, rf_front_door, front_door
Using from your user code:
# Attaching to a Light_Item (automatically turns light on)
$auto_entry_light->add($front_door);
Input states:
on/open/alert*: door opened
off/closed/normal*: door closed
("*" is a wildcard here; values of "alertmin", "alertmax",
and "alertbattlowmin" will all indicate "door opened", for example)
Output states:
open: door opened
closed: door closed
check: Inactivity timeout has occurred -- batteries may be dead?
Optional Door-Open Alarm: If you want to be alerted when the door is left open too long, you can set an alarm (time is in seconds; an optional repeat_time can force repeat actions):
$front_door->set_alarm(300, "speak('front door left open');",120);
Optional Inactivity Alarm:
If you want to be alerted when the door hasn't been opened for a period of time (i.e. the batteries in the transmitter may be dead) then do this (time is in hours):
$front_door->set_inactivity_alarm(
48, # hours
"speak('front door battery may be dead');" # command
);
An abstract object that represents a door that you can add to a Light_Item
. You typically associate a real door item (i.e. an RF door sensor or a digital input or the like) to this object. It will also indicate the state of the door on the web-based floorplan.pl
.
When attached to a Light_Item, it will cause the light to be turned on whenever the door is opened. Typically you attach several objects to the same Light_Item. See Light_Item.pm for various ways to control when the light turns on and for how long.
Method | Description |
---|---|
set_alarm($time,$action,$repeat_time) |
If an alarm is set, the specified action is executed if the door was left open for the specified amount of time |
set_inactivity_alarm($time,$action) |
If an inactivity alarm is set, the specified action is executed if no notification of the door being opened has occurred for X hours |
None
Jason Sharpee - [email protected]
Kirk Bauer - [email protected]
Special Thanks to: Bruce Winter - MH
None