Hello.

Currently, I am using motion detectors (MS13a and MS16a) to turn the lights on/off using timers in the various rooms in my house, but while its ok for turning lights on, its not too good for turning them off when, for example, I am reading and not moving. Then I came across the article on "Occupancy_Monitor" from the Wiki, and would like to implement it. 

While the article has some great information, I am having trouble grasping how to use it and have some questions.

1) Do I need one $om per sensor or is $om a "one per house"? For example, do I use for two items:

-----------------------------------------------------------------
X10MS, B13, x10_example_motion_detector, , MS13
X10MS, B16, x10_example_motion_detector2, , MS13
MOTION, x10_example_motion_detector, example_motion_detector
MOTION, x10_example_motion_detector2, example_motion_detector2
OCCUPANCY, om
-> OCCUPANCY, om2
PRESENCE, example_motion_detector, om, presence_example_room
PRESENCE, example_motion_detector2, om2, presence_example_room2
and
$om->set_edges($example_motion_detector, 1, 2, 3);
$om2->set_edges($example_motion_detector2, 1, 2, 3);
------------------------------------------------------------------
or
-----------------------------------------------------------------
X10MS, B13, x10_example_motion_detector, , MS13
X10MS, B16, x10_example_motion_detector2, , MS13
MOTION, x10_example_motion_detector, example_motion_detector
MOTION, x10_example_motion_detector2, example_motion_detector2
-> OCCUPANCY, om
PRESENCE, example_motion_detector, om, presence_example_room
PRESENCE, example_motion_detector2, om, presence_example_room2
and
$om->set_edges($example_motion_detector, 1, 2, 3);
$om->set_edges($example_motion_detector2, 1, 2, 3);
------------------------------------------------------------------

Also, I am unsure how to use said monitor in my user code.
Can anyone please send me some sample code (.mht, and.pl code) on it's implementation? 

Thanks in advance

Craig

PS. I am using version: 3.0 on Raspberry Pi
Perl: 5.14.2