Skip to content

Items Photocell_Item

ggodart edited this page Jan 5, 2021 · 1 revision

Photocell_Item

See original

SYNOPSIS

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.

INI PARAMETERS

Items.mht

Defined in items.mht as

 # 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

INHERITS

Base_Item

METHODS

AUTHOR

Jason Sharpee jason@sharpee.com

Special Thanks to: Bruce Winter - MH

SEE ALSO

None

Clone this wiki locally