States supported - UNKNOWN, MOTION, STILL
A Motion device is a motion detector. Motion
detectors are generally connected to the system via a WTDIO hardwired
device or a wireless X10 device such as a MS16a.
Examples:
# Lets define two motion detectors connected to different interfaces.
# X10 MS16A Wireless motion detector via a W800RF32 interface
hall_motion = Motion(address='E1',
devices=w800 )
# A standard wired motion detector connected to a WTDIO board
stairs_motion = Motion(address='A4',
devices=wtdio )
Providing a retrigger delay to the device. Often
a motion detector will switch on and off rapidly and may not be what
is required. Using the retrigger_delay attribute one can add a
delay to the off or STILL state to solve this problem.
# Define a motion device but give it a bit of debounce because it
# is hardwired and will go on and off rapidly.
hall_motion = Motion(address='A4',
devices=wtdio,
retrigger_delay={
Attribute.SECS: 20,
}, )
|