ELK M1 rule question

vbdino

Member
I have a problem to solve with a rule. This is my situation.
 
I have photobeams at the entry that when the house is secured, start a rule to turn on a relay that triggers an alert on I/O port, on a DVR. Then the DVR sense this alarm and send camera snapshot to an e-mail.
 
So my rule sends an e-mail to my cell and turns on a relay for 3 seconds. That makes the DVR send one picture. I would like to be able to send a second picture by turning on againt the relay, but the execution between the first relay action and the second is to fast for the DVR to pick up a second alarm. I tried to insert between, an action to turn off the relay but that didn't help.
 
Is there a way to create a delay between two "then" actions?
 
Thanks
 
I take it that your DVR doesn't have a 'pre' and 'post' buffer (for pics) associated with the trigger?  Why do you keep the relay on for three seconds?  What is the minimal time you need for a contact closure to trigger a DVR action (you could always test this if you are not sure by trying a few times, say 1, then 2 seconds and see if the rule fires)? 
 
If one second is good enough you could do something like;
 
Create a rule (pseudo-code):

When Photobeam contact closure
Then turn relay on for one second
Then turn output 200 on for three seconds (this would be the delay between captures)
 

 
Create another rule:

When output 200 turns off
Then turn relay on for one second
 
 
 
I'm pretty sure this would work; but, someone may have a better idea in subsequent posts. ;)
 
You can always play around with the time in the two rules to get the buffer between captures that you want.
 
My DVR was set to 2 seconds, now it is set at 1 second. I will try your idea tomorrow.
 
Update:
 
It works well. First time, I tried 4 seconds for the output to create a pause. That was too fast for the dvr probably because it has to complete the first alert and doesn't queue alerts. I changed it to 15 seconds and it worked.
 
Thanks
 
Glad you got it working! :)  Fifteen seconds sounds like a lot of time though as being the minimum needed in-between captures.  What DVR model do you have (would like to look at the manual online if possible)?
 
Could also do what I've done in the past for LED status indicators...basically trigger an on/off based on time. Don't have RP on this laptop otherwise I'd post the example rules.
 
The DVR is set a one second. Let say it takes 4-5 seconds to send the e-mail. During that period, my understanding from my first test, is that it overlooks any I/O alarms. My dvr is a gadspot GS2003V.
 
I choosed to set timer to 15 seconds so that the second e-mail will include a picture with more significant changes. Meaning that if a car enters the driveway only to change direction, the second picture will show no car in the driveway.
 
Update: Still not perfect. Even if I have a 15 seconds delay before turning on the dvr I/O, the dvr considered the second alarm as part of single event. The e-mail I received specified a sensor alarm at 19:14:34 and at 19:14:54. I guess I have to increase it to 30 seconds.
 
Back
Top