Please login or register.

Login with username, password and session length

Author Topic: When I don't want motion sensor turn lights off.  (Read 11731 times)

Jollydodger

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 16
When I don't want motion sensor turn lights off.
« on: January 14, 2007, 07:53:55 AM »

I think this a Smart Macro question.

I have a motion sensor trigger my outside lights and one light right inside the front door.

After 8 minutes the outside lights are turned off by the motion sensor macro, two minutes later the inside light gets turned off by the same macro.

How am I supposed to set this up with flags or dummy switches. (or some other way) so that if I hit a button on a remote, the outside lights will stay on or off, no matter what the motion sensor tells it to do. Same thing with the inside light, if I turn the light on with a remote, I don't want the motion sensor to turn it off, and vice versa.

Yes I have searched for this type of set up in the forums, no I have not seen it. It may be here, it just didn't show up in any search.
« Last Edit: January 14, 2007, 08:18:42 AM by Jollydodger »
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: When I don't want motion sensor turn lights off.
« Reply #1 on: January 14, 2007, 12:04:22 PM »

Jollydodger: Using a Status Flag is the way to do this. You would need two sets of macros for your remote switch(s):


Lights on regardless of motion

macro1: Trigger (remote address1 ON); Condition: If Flag x is OFF
 - Set Flag (x)
 - Turn Light(s) on

macro1: Trigger (remote address1 OFF)
 - Clear Flag (x)
 - Turn Light(s) off


Lights off regardless of motion

macro1: Trigger (remote address2 ON); Condition: If Flag x is OFF
 - Set Flag (x)
 - (optional: turn the lights out here in case they are on initially)

macro1: Trigger (remote address2 OFF)
 - Clear Flag (x)


In your motion sensor macro, put in the condition "If Flag x is OFF".

Keep in mind that if you set one of these modes while the motion macro is already executing, the lights will still go out... but the motion macro won't start up again.

As a side note, what I find helpful, when remotely executing a macro that just sets or clears a flag, I have the macro either flick a light on & off or sound a chime... this way I know the flag got set or cleared.
Logged

Jollydodger

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 16
Re: When I don't want motion sensor turn lights off.
« Reply #2 on: January 14, 2007, 01:31:59 PM »

Thanks for the reply:

>>Keep in mind that if you set one of these modes while the motion macro is already executing, the lights will still go out... but the motion macro won't start up >>again.

This is the problem I was running into and I guess there is no way around it. It is too bad you can't use "Flag Status" condition in the middle of the macro execution, like you would and "if then else" statement in programming.

Then I was trying to figure a way to use a motion sensor macro to turn lights on and delay for 10 minutes. Then macro throws it to another macro that checks flag status. If I have set a flag by turning on the light manually with a remote keypad, then the macro does not turn it off. If I have hit any keypad "on" button, no flag set, and motion detection macro turns off lights on schedule.

I have not figured it out yet but it would seem like the second way should make it so the lights would not go out unless you happen to hit the keypad a half second after the second macro begins running.

If anyone knows that this won't work I will quit now. This is confusing stuff to work out in the head, or visualize sometimes, any help is always appreciated.

Thanks again Puck, I will use your tactic for now until (If Then) I can figure a better way.
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: When I don't want motion sensor turn lights off.
« Reply #3 on: January 14, 2007, 02:00:34 PM »

What you could do is split your motion sensor macro into 2 macros. One for motion ON & one for motion OFF.

Set the motion OFF delay of the motion detector for 8 minutes. Then you can stop the 2nd macro from executing if the remote switch gets pressed sometime in the middle.


Motion ON macro: Trigger MSxxA ON; Condition Flag x OFF
 - Outside Light ON
 - Inside Light ON

Motion OFF macro: Trigger MSxxA OFF; Condition Flag x OFF
 - Outside Light OFF
 - Delay 2 minutes
 - Inside Light OFF


This way you just have the 2 minute delay between outside light off & inside light off to be concerned with. You could just remove that delay or try calling a phantom module that will check for the Flag status and turn the light off based on it's current state.
Logged

Jollydodger

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 16
Re: When I don't want motion sensor turn lights off.
« Reply #4 on: January 25, 2007, 07:06:32 AM »

I ended up creating separate macros that turns on each individual light and sets a flag when remote button is pushed. Separate macros that turn each light off and clears flag when remote button is pushed.

Then separate macros trigger each light after checking conditions, flag status and time of day. This works better as I can have the outside light turning on and off all night, and the inside light stop (motion triggered) operation at midnight or whenever.

Separating all of this out instead of having it one macro was a pain in the neck but ultimately was the right way to do it since it does basically everything I wanted it to.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.