Jump to content

Keep lights on as long as there is motion


hchucky

Recommended Posts

Posted

I currently have an X10 motion sensor that I use to turn on a mudroom and closet light. This works well as is but I would like to enhance it so the lights stay on as long as there is motion. In other words every time motion is detected I would like to reset the timer to 10 min. Currently the lights get turned off after a 10 min wait but if you are still in the room you have to hit the switch or move around a bit to turn them back on.

 

Thanks,

HC

Posted

Hello hchucky,

 

If your mudroom lights are set to respond directly to the X-10 ON and OFF commands sent by the X-10 motion sensor, then you have described exactly how the X-10 motions work. Unfortunately, many of the X-10 motion sensors do not re-trigger the timer, so when the set time has expired, the sensor sends an OFF command. And every time the motion sends a command, it goes dead for approximately 10 seconds before it will send another command, even if there is motion throughout the entire period.

 

But, you can work around this by having ISY act upon the X-10 motion ON command and turn on the mudroom lights with an INSTEON command (or an X-10 command with a different address than the motion sensor). The trick is to ignore the motion's OFF command, and let ISY do the timing.

 

It could be as simple as:

 

Program 'Mudroom Motion Timer'
If
       X10 M1/On (3)' is Received

Then
       Set 'Mudroom Lights' On
       Wait  10 minutes
       Set 'Mudroom Lights' Off

Else
  - No Actions - (To add one, press 'Action')

Each time the X-10 motion sensor ON command is received (approximately every 10 seconds if there is continuous motion), the program runs, starting the timer anew.

 

The problem with this, though, is that the command to turn on the lights will also be sent every time motion is detected, even when the lights are already on. This will place unnecessary traffic on the power-line. If there is frequent motion, you can eliminate this extra traffic by breaking the program apart into two programs:

 

Program 'Mudroom Motion Start'
If
       X10 'M1/On (3)' is Received
   And Status  'Mudroom Lights' is Off

Then
       Set 'Mudroom Lights' On

Else
  - No Actions - (To add one, press 'Action')


Program 'Mudroom Motion Timer'
If
       X10 'M1/On (3)' is Received

Then
       Wait  10 minutes
       Set 'Mudroom Lights' Off

Else
  - No Actions - (To add one, press 'Action')

When motion is detected, the first program turns the lights on, but only if they are currently off. The second program runs every time motion is detected, resetting the timer, until motion stops, the timer expires, and the lights are turned off.

 

One final note. When using ISY for timing as above (either version), the motion sensor's OFF command is no longer required, and can therefore be set to its longest possible duration (several hours). This will reduce power-line traffic by eliminating the unneeded OFF command every 10 minutes.

Posted

The only thing missing in this example is some code to disable the timer program whenever the mud room light is turned on manually from the switch, and enabled again when the switch is turned off.

Posted
Thanks for the posting. I set that up and it works perfect.

 

HC

 

hchucky, my pleasure. Thanks for the update; I'm so glad it fits your needs.

 

UpstateMike, you're absolutely correct. That would be an excellent addition to the code.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...