-
Notifications
You must be signed in to change notification settings - Fork 130
Items Motion_Item
See original
Input states:
on/motion: motion detected
off/still: motion no longer detected
Output states:
motion: motion detected
still: motion timer expired
check: inactivity timer has expired -- batteries may be dead?
Optional Inactivity Alarm:
If you want to be alerted when motion hasn't been detected for a period of time (i.e. the batteries in the transmitter may be dead) then do this (time is in hours):
$motion_master_bedroom->set_inactivity_alarm(
48, # hours
"speak('master bed motion detector battery may be dead');" # command
);
The default is to log a message in the print log after 24 hours.
An abstract object that represents a motion detector that you can add to a Light_Item
. You typically associate a real motion detector (i.e. a hard- wired one or an X10 Hawkeye) to this object. It will also indicate the state of the motion detector on floorplan.pl
if given proper coordinates.
When attached to a Light_Item
, it will cause the light to be turned on whenever motion is detected. 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.
Defined in items.mht
as
# First, define your actual motion detector:
X10MS, B7, x10_motion_master_bedroom, Sensors, MS13
# Then define the Motion_Item and attach to the real object:
MOTION, x10_motion_master_bedroom, motion_master_bedroom
And in code attaching to a Light_Item (automatically turns light on)
$auto_master_bedroom_light->add($motion_master_bedroom);
Method | Description |
---|---|
set_inactivity_alarm($$$) |
If an inactivity alarm is set, the specified action is executed. if no notification of motion has occurred for X hours |
Jason Sharpee [email protected]
Special Thanks to: Bruce Winter - MH
None