Rule : Stopping false positives on outdoor movement sensor

I have two hue outdoor sensors that I want to use for security at night..

The issue I have is that sometimes they can be triggered by ghosts.. to combat this I want a rule like the below:

If movement is detected on either sensor then
If in the next 30 seconds there is another movement detected (on either sensor) or if at the 30 seconds mark either sensor is still "active" then trigger alerts at whichever is first..

I just can't figure out how to do it and any help would be appreciated.

Additional Question: If I have a delay in a rule, does that keep running as an instance before executing the following lines, even if the rule is re-triggered? (assuming no cancel timers is called)

This doesn't answer your question directly but have you considered using a motion zone with 'False Motion Reduction'?
image

I think this might do what you want. I haven't tried it but maybe it will give you some ideas. The trigger would be any of your sensors going active.

test1

[edit]You need to add at the end if still active.

Thanks, I didn't know about this, but I think from what I've just read that it wouldn't trigger if only one sensor was active (both sensors cover two different nearby areas)

It doesn't because there isn't a notification after 30 seconds, but I think adding that to the end as cancellable might solve that?

This is what I came up with before your suggestion (I haven't tested either, but I think yours is better!):

image

Just realised dropping in another alert with a delay at the end wouldn't work.. as it would trigger regardless of the state still being active on any sensor.. I'll give my rule a go, but realised mine doesn't cancel the timer and if I swap the rule around the else-if can just be an if..

Edit: This is what I have ended up with, will have to test it tomorrow now..

image

Hmm..

Maybe something like:

Trigger: any sensor becomes active

IF any of sensors is active then

Wait for event; any sensor becomes active (timeout 30 sec)

IF any sensor is active then

Do alert stuff

ELSE-IF both sensors is inactive then

Exit rule

END-IF
END-IF

Can't test right now, but maybe this could get you going..?

You can just add a 30 second delay as opposed to a delay to set the Boolean as in my original rule.

If the rule is triggered again before the delay is complete anything after the delay will be canceled. If you make the delay cancelable.

This simple example when triggered will never give you an alert as long as you keep triggering the rule before the 1 minute delay is over.

1 Like

Thanks, I guess Iā€™ll still need to add the second if to check the current state of the sensors like in mine though, although in mine Iā€™ve put the Boolean reset in the wrong place too! Will update this morning and test it

Marking as solved, as the help you have provided has been exceptional.. didn't get a chance to test today, but will do at the weekend.