How to wait for two events in a period - similar to alarm system double pulse

Hi,
I have an alarm system with Konnected interface board attached.
In my legacy alarm system I can set the system to trigger an alarm only if 2 "active" events happen on the same sensor in a predefined period (say 10 seconds). This is called double pulse or double knock.
In HE I get the active action to trigger a stand alone siren,
Problem is I get lots of false triggers and I would to like to replicate the double pulse on the same sensor feature into HE but got lost. I crated a new virtual motion sensor to turn active for 5 seconds when double pulse happen on a certain sensor but could not find a way to do this using wait for event in RM

The logic is simple:
Trigger - motion is active
Action - wait for another active event for 10 seconds (period)
Case active happened within period - set a virtual motion sensor to active
else - exit rule

I know that the Zone Motion built in app can do this for 2 or more different sensors but in my case I want the event to trigger from a double pulse of a single sensor.

Any ideas?

Can your motion sensor detect double pulses. Most that I'm aware of have a cooldown period that is longer than 10 seconds. Mine, for example, will trigger and report active for about 45 seconds after motion has stopped.

You could make a virtual switch that triggers on the motion. That switch would then be set to turn off after 10 seconds. If the second event occurs while that switch is on you're good to go with your actions.

1 Like

As this is not a regular sensor but rather an alarm system sensor it has no cooldown period. It detects motion right after in turns inactive.

This is an idea. I’ll think it through. Thanks.

Here's an option to try using a local string variable.

Required Expression
Private Boolean is true

Local Variables
LastEvent

Trigger Events
Motion is active

Actions to Run
Set Private Boolean false
Wait for event: motion active --> timeout: 0:00:10
Set LastEvent to %device%
IF (Variable LastEvent <> 'timeout') THEN
  Set virtual motion sensor to active
END-IF
Set Private Boolean true

If the Wait is ended by the timeout then the IF will be false and nothing will happen. You could reverse the logic and use = instead of <> with the correct device name instead of timeout.

2 Likes

Thanks @pseudonym ,
I was not familiar with this logic but it seems to have solved my issue.
Thanks for your help.
Amit

1 Like