Skip to content
Lieven Hollevoet edited this page Sep 22, 2014 · 1 revision

Description: An abstract object that represents a photocell that you can add to a Light_Item. Currently I have only used this with the Hawkeye motion detector. It will also indicate the light level of the room on floorplan.pl if given proper coordinates.

Usage: Example initialization: These are to be placed in a *.mht file in your user code directory.

First, define your actual motion detector: X10MS, B7, x10_motion_master_bedroom, Sensors, MS13

Then define the Photocell_Item and attach to the real object: PHOTOCELL, x10_motion_master_bedroom, photocell_master_bedroom

Input states: on/dark : room is dark off/light: room is light

Output states: dark : room is dark light: room is light 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.

To disable the checking of this object, call:

$motion_master_bedroom->check(0);

Clone this wiki locally