Motion sensors flow

Hi,

Hopefully someone can help me with the following;

I have 2 motion sensors which are placed in two hallways (groundfloor and first level). Currently they are triggering the lights in both places and turn off after these sensors do not register any movements within 2 minutes.

Ideally i would like to have a flow in place which turns on or off the lights depending on our movements. Example;

If we go upstairs we pass the groundfloor hallway which turns on the lights. when arriving on the second floor this hallway turns on and turns off the lights on the groundfloor (and vice versa).

I’ve done some tests using the motion sensors however they keep turning off the wrong lights (see attached picture). When going upstairs all lights go out rather than just one… I have two of these. If i have one than there is no issue. its the both of them which are conflicting each other.

any ideas what i am doing wrong :slight_smile:

much appreciated

What if you are upstairs and someone is still downstairs? Doing what you want, will turn off light on other floor and person will go through darkness.
Simple solutions are more solid and reliable. Do separate flows for each floor based on it’s own motion sensor. Don’t combine these flows together.

To have clear picture of what your flow really do I removed unnecessary blocks. I don’t know your language, but maybe this will help you to see what is going on:

The last step means “turn off” and “Gang Spots” are all lights on both floors?

its correct that there is a possibility that there are mistriggers due to presence up and down stairs, however i expect this to be an exception.

thats correct. idea is to check 5 seconds after the initial trigger if movement has been registered up stairs. (setting Motion sensors block new motion within 15 seconds and turn off after 60 seconds).

I believe this is your problem:

Let’s say you’re going from downstairs to upstairs and it takes you 3s from triggering the downstairs motion sensor to triggering the upstairs one. Here’s the sequence of events if you have both your flows active:

t = 0: ground floor sensor ON - triggers flow A and ground floor lights ON
t = 3: first floor sensor ON - triggers flow B and first floor lights ON
t = 5: first floor sensor checked by flow A and found to be on => ground floor lights off
t = 8: ground floor sensor checked by flow B and found to be on => first floor lights off
t = 120: ground floor sensor OFF
t = 123: first floor sensor OFF

Therefore by t=8 both lights are off, which is not what you wanted.

I think you can simplify this bit of your flow logic somewhat, so that:

WHEN upstairs motion on, turn on upstairs lights
AND if downstairs motion on AND downstairs lights on THEN turn off downstairs lights

also

WHEN downstairs motion on, turn on downstairs lights
AND if upstairs motion on AND upstairs lights on THEN turn off upstairs lights

One scenario you may find annoying with this (which would already have been a problem too with your original solution) is that if you go upstairs, forget something downstairs and go back for it within 2 minutes (it happens to us all) then the downstairs lights won’t come on since the motion timer didn’t time out yet but the lights were switched off already. So in fact I think you will need to consider other - possibly even simpler - solutions.

In general I have found with situations like this the temptation is to add complications to deal with more complexities whereas the solution is in fact to go simpler