Photocell_Item.pm

Photocell_Item

SYNOPSIS

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

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.

INHERITS

Base_Item

METHODS

UnDoc

INI PARAMETERS

NONE

AUTHOR

Jason Sharpee jason@sharpee.com

Special Thanks to: Bruce Winter - MH

SEE ALSO

NONE

LICENSE

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.

 Photocell_Item.pm