Post trigger latency

Posted on
Sat Apr 11, 2015 4:40 pm
thewinelake offline
Posts: 7
Joined: Apr 05, 2015

Post trigger latency

I've got a PIR triggering an email. However, I would like to say "once you've sent an email, don't do it again for at least 30 mins of quiet".
I guess I could do this with some kind of variable manipulation, but what's the recommended method? Must be quite a common issue.

Posted on
Sun Apr 12, 2015 1:41 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Post trigger latency

You can add an action to the trigger to disable itself for 30 minutes after it has been triggered:

Server Actions > Enable/Disable actions > Disable Trigger

Select your trigger from the list. Note: If you are setting up a new trigger (rather than editing an existing trigger), you will need to save it first in order to save the name of the trigger and then re-edit it (otherwise the trigger name won't appear in the selection list).

Tick the checkbox 'Auto Enable after' and set the time to 30 minutes.

Hope this helps :)

Posted on
Sun Apr 12, 2015 2:05 am
thewinelake offline
Posts: 7
Joined: Apr 05, 2015

Re: Post trigger latency

Brilliant- thanks!

Posted on
Sun Apr 12, 2015 2:10 am
thewinelake offline
Posts: 7
Joined: Apr 05, 2015

Re: Post trigger latency

...how about this?
A motion sensor in a room should alert if motion has been detected and it's been at least 30 mins since the last motion was detected?
Subtly different from a simple latency, and essentially avoids multiple alerts for when someone is in the room for more than 30 mins.

Posted on
Sun Apr 12, 2015 6:59 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Post trigger latency

Which sensor model it is might affect this, but in theory:

A condition on the same trigger above that says 'Last update' of 'Motion Sensor' is 'Greater than 30'.

This is assuming that the last updated value changes when motion becomes On and Off - thus the last updated value should equal the last time (30 and a bit minutes ago) that motion was no-longer detected.

Posted on
Sun Apr 12, 2015 7:13 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Post trigger latency

Off the top of my head (but briefly tested for you :wink:), you can do something like this:

Setup a variable 'PIR_Alert_Active' = 'false'

Setup a trigger to respond as:
'on/Off state' - 'Becomes On'
Condition 'Always'
Actions:
set variable PIR_Alert_Active to true
set variable PIR_Alert_Active to False and Delay By 30 minutes and override previous delay

setup another trigger to respond as:
Variable Changed
'PIR_Alert_Active'
becomes true
Condition 'Always'
Actions:
Whatever you want to do

I think this should do what you want if I have understood it correctly :)

Posted on
Sun Apr 12, 2015 1:16 pm
thewinelake offline
Posts: 7
Joined: Apr 05, 2015

Re: Post trigger latency

Mmm - I'll give that a go, thanks,

Posted on
Mon Apr 13, 2015 9:32 am
thewinelake offline
Posts: 7
Joined: Apr 05, 2015

Re: Post trigger latency

And - whaddyaknow - it works! Thanks ;-)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest