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):

    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:


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 if given proper coordinates.








Jason Sharpee

Special Thanks to: Bruce Winter - MH




This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.