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 Motion_Item and attach to the real object:

  MOTION, x10_motion_master_bedroom, motion_master_bedroom

Using from your user code:

  # Attaching to a Light_Item (automatically turns light on)

Input states:

  on/motion: motion detected
  off/still: motion no longer detected

Output states:

  motion: motion detected
  still: motion timer expired
  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.


An abstract object that represents a motion detector that you can add to a Light_Item. You typically associate a real motion detector (i.e. a hard- wired one or an X10 Hawkeye) to this object. It will also indicate the state of the motion detector on if given proper coordinates.

When attached to a Light_Item, it will cause the light to be turned on whenever motion is detected. Typically you attach several objects to the same Light_Item. See for various ways to control when the light turns on and for how long.





If an inactivity alarm is set, the specified action is executed. if no notification of motion has occured for X hours




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.