Jump to content

motion sensor program timing


robandcathy1

Recommended Posts

Posted

I have two motion sensors close together one for the drive way(#1) and one fro the front door(#2) I already set up programs for both of them now I would like to set up a third using the two original programs. Is there a way to trigger a event if #1 is tripped then #2 but not the other way around, my program looks like this at the moment.

 

program driveway is true

program front door is true

from sunset to sunrise

......

set load entrance hall light on

wait 3 min

........

set load entrance hallight off

 

they way it looks to me is all that need to be met is that both programs are true, which can easily happen since they are only 10 feet apart. I would like them in sequence that only if #1 is true THEN it sees #2 is true will it run my event. because in the morning when I walk out my door to go to car I dont want to turn on my hall light to wake family up, but if someone approaches the house then i want it on.

Thanks

Posted

My first instinct is to create a program "folder", with the conditions that program 1 be true. In that folder, put a program with only the condition that program 2 be true. The folder condition must first be true in order for the program to be enabled.

Posted

For ISY programs like this that require any sort of "memory" or sequencing, I usually diagram what I want and then translate that to ISY programs.

 

I find that if I try any sort of ad-hoc approach I end up with programs that do something like what I want, as well as a raft of weird things I don't want. And I inevitably spend hours trying to figure out why.

 

I wrote a post a while back to explain one method I use in (overly-excruciating) detail here:

 

http://forum.universal-devices.com/viewtopic.php?t=4650&postdays=0&postorder=asc&start=0

 

Though a little tedious at first, this method gives you what you want, and provides at least a little 'debuggability' - if there is such a word. It also makes it easier to enhance or change things later.

 

In your case, assuming I understand it, you have three states. One idle state (state0) where you're just waiting. A second (state1) where you've received the first (driveway) sensor. And a third state (state2) where the door sensor is tripped while you're in state1.

 

Something like this:

 

State0: (waiting)
 If Sensor Driveway is turned On then jump to State1

State1: (waiting for door sensor)
 If Sensor Door is turned On then jump to State2
 If Sensor Driveway is turned Off then jump to State0
 Or After 1 minute (or whatever timeout) jump to State0

State2: (both tripped)
 set load entrance hall light on 
 wait 3 min 
 set load entrance hallight off
 go back to State0

 

This will translate into 6 little ISY programs. One "condition" program and one "body" program for each of the three states.

 

The condition program for each state is just a collection of all the explicit jumps that can take you into that state. The body program sets all the other programs/states false and then does whatever you want to do in that state.

 

If you wade through the post you should get the idea.

Posted
can you possibly show a example of this?

Thanks

 

the program folder would contain your first condition and look something like:

 

if

from sunset to sunrise
and program driveway is true 

then
run the programs in this folder 

 

in this folder, add your program

 

if
program front door is true 

then 
run program "timer" (then condition) 

else

 

outside the program folder, create a program named "timer" (or whatever you like) that looks something like:

 

if

 

then

set load entrance hall light on

wait 3 min

set load entrance hallight off

 

else

Posted
can you possibly show a example of this?

Thanks

 

the program folder would contain your first condition and look something like:

 

if

from sunset to sunrise
and program driveway is true 

then
run the programs in this folder 

 

in this folder, add your program

 

if
program front door is true 

then 
run program "timer" (then condition) 

else

 

outside the program folder, create a program named "timer" (or whatever you like) that looks something like:

 

if

 

then

set load entrance hall light on

wait 3 min

set load entrance hallight off

 

else

Posted

You can have multiple programs tied to the same events. So to accomplish what you desire, I suggest writing two additional programs and tying them to the events, not the existing programs. The first should just be a state program "DrivewayMotionState" inidicating that the motion sensor in your driveway (#1) was tripped:

 

If
       Control 'Outdoor / Driveway Motion' is switched On
Then
       Wait 30 seconds
       Run Program 'DrivewayMotionState' (Else Branch)
Else
       - Nothing -

This program will become true when motion in the driveway is detected and stay true for 30 seconds after the last motion. Otherwise, it will be false. Your second program "HallLightonMotion" will use the first program and the second motion sensor (#2) to trigger the hall light:

 

If
       Control 'Outdoor / Front Door' is switched On
   And Program 'DrivewayMotionState' is True
Then
       Set 'Main Floor / Hall Light' On
       Wait 3 mintues
       Set 'Main Floor / Hall Light' Off
Else
       - Nothing -

Note that you may want to add an additional trigger to the timer program to cancel the pending Off for the hall light if the corresponding switch is touched. For instance, if you walk in the front door from the driveway (the hall light will be on) and then immediately turn the hall light off, or switch it on (even if it is already on), then you may want to cancel the pending Off command in the HallLightonMotion program after the Wait expires. For example:

 

If
        Control 'Outdoor / Front Door' is switched On
   And Program 'DrivewayMotionState' is True
    Or (
       Control 'HallLightSwitch' is switched On
   And Control 'HallLightSwitch' is not switched On
       )
Then
       Set 'Main Floor / Hall Light' On
       Wait 3 mintues
       Set 'Main Floor / Hall Light' Off
Else
       - Nothing -

Posted

Thanks so much guys, guess I have to do some more homework lol. I was hopeing for a much simpler solution, but I asm determined to make this work so I will try both your recomendations, also will read the topic posted. Thanks again to both.

Rob

Posted

I just read that topic can i suggest the two great minds make a you tube video probably eaiser, wow thats so much to take in at once, All my programs are very simple, turn lights on , turn lights off, sometimes dim, but you guys are like machines, man maybe in 2 years I migh know 1/2 of what you guys do. Keep up the good work :D

Posted

As you've discovered, writing programs is the easy part.

 

Getting them to work right is the challenge.

 

Unfortunately, you have to run back and forth to see what's happening, and you have to be there for that. Besides, where's the fun in having somebody else do it?

 

When I was building our new house, I put in the ISY and some webcams so I could program the system during construction over the Internet from where we were living and see what was happening while I did it. I did it in the AM so as not to irritate the crew any more than I already had.

 

So I get an excited call from my neighbor at about 2AM one morning. "You need to get over here NOW! Somebody's in your new house and they're TOTALLLY SCREWING WITH THE LIGHTS!!"

Guest
This topic is now closed to further replies.

×
×
  • Create New...