Dahua "Local Alarm" input is speed challenged?

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
All,

I need guidance from people who use the External Local Alarm feature of their NVR.

My Dahua NVR 4216 has inputs for External Alarms. I have a laser line connected to Local Alarm Input #1. (sensor = Enforcer, twin photobeam detector)

It was working reliably for weeks. Now, it's acting up.

Setup:
The laser line is aimed across a driveway.
When the photobeam is broken (car, person), the sensor output changes. (the NC line is opened)
When the NVR sees an "event", it normally:
1) sends an "Alarm Start" email w/ timestamp
2) sends an email with snapshot
3) sends an "Alarm End" email w/ timestamp

Recently, the system has been misbehaving. For some events:
1) sends an "Alarm Start" email w/ timestamp
2) sends an "Alarm End" email w/ timestamp
ie: no snapshot is sent by the NVR.

My conclusions:
- This isn't a laser line detector problem. The laser line event is captured in:
a) the NVR system log and
b) the "Alarm Start" and "Alarm End" emails are sent.
- This is unrelated to the "anti-dither" alarm config setting in the NVR.
- This isn't caused by "too-frequent" or "too many" laser line events. The system could be sitting for hours, and when I drive up the driveway, no snapshot is sent.

My Hunch:
The "Alarm Start" and "Alarm End" can't be too close to each other.
ie: if "Alarm End" occurs before the NVR has a) gathered the snapshot, b) attached it to an email, and c) begun transmitting it the email, then d) the snapshot email isn't sent. Or it gets bumped by the "Alarm End" email.

Clue:
If I walk really fast through the laser line, it's more likely the snapshot won't be sent.
Again, this is a new symptom. The laser line setup used to be bullet-proof, even for short events (like running through the laser line)

Any ideas?

Thanks in advance!
Fastb
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
put your anti-dither to 30s just to see if it helps..

Ive never hooked it up to anything really fast, most motion sensors hold on for a few moments at least.. mebe a time latching relay? Usually alarm inputs require a minimum pulse time, I dont think your always meeting that.
 

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
nayr,

Thanks for the reply.
Anti-dither: I've tried values from 0 to 30. No difference.
Note: Anti-dither stops multiple alarm input events from generating multiple emails. My problem occurs when there is a single alarm event. But I tested different anti-dither values anyway

Motion sensor speed: ie: fast signalsThe NVR isn't missing the event, due to an overly fast motion sensor.
The NVR recognizes the event just fine! I receive these two emails from the NVR:

1st email: Alarm Start Time(D/M/Y H:M:S): 7/8/2016 17:56:58
2nd email: Alarm Stop Time(D/M/Y H:M:S): 7/8/2016 17:57:03

But no snapshot!

Here's what I sometimes get from the NVR:
1st email: Alarm Start Time(D/M/Y H:M:S): 7/8/2016 20:54:30
2nd email: Contains the snapshot
3rd email: Alarm Stop Time(D/M/Y H:M:S): 7/8/2016 20:54:36

Success! A snapshot was sent!

nayr, a latching relay to lengthen the motion sensor output won't help anything, IMHO. The NVR recognizes the alarm event "Start" and "Stop" perfectly well. Also, i did a test. I passed a piece of cardboard in front of the laser line, breaking the line for less than 1 second. A snapshot was sent.
Curiously, the NVR recorded it as a 6 second event. I believe the laser line output is "stretched" longer than the actual event.

Below are 3 events. The 1st event was captured, but no snapshot was sent. The 2nd & 3rd events were captured, and a snapshot was sent.

Log file
AlarmdurationSnapshot?
11:22:47start
11:22:54end0:00:07missed
11:23:10start
11:23:17end0:00:07snapshot
11:25:27start
11:25:33end0:00:06snapshot

Conclusions:
The hardware and electrical signals seem fine. The NVR catches the signals.
Some short-lived events are handled correctly, and a snapshot is emailed
Some long-lived events are not handled properly. They're recognized, but no snapshot is emailed.
ie: event duration doesn't seem to be a factor.

Something is suppressing the email that contains the snapshot!
I'll play with the "interval" parameter in "Network", "Email" screen. The interval is intended to not overwhelm the email server with too-frequent emails. It was set to 5 seconds. I lowered to 1 second, and even more snapshots were missed. Curious...

Fastb
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
try another outbound mail server? it could be trying to send it, but its erroring at the server level.. if you have it save a snapshot locally instead of emailing does that appear?

I dont use the snapshot feature built into the cameras, I actually use Domoticz for emailing snapshots and just use the alarm triggers for triggering domoticz.. this way I can modify email templates if nessicary.. so I cant say I have done much with the built in email snapshot option.
 

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
nayr,

Thanks for the suggestions re: email server.
My tests with email "interval" indicated something funny was happening in the email domain;
- I reduced the email interval from 5 sec to 1 sec, and more snapshots were lost.
- I increased email interval to 10 sec, and it looks like the problem is solved.

Interesting tidbit:
The NVR log shows the same 5 to 6 second event duration between "Start" and "End".
But now the email time info, which state the "start" and "end" times, show a 10 to 11 second event duration.
So with email "interval" increased, the end event email time stamp is delayed. The "end event" time in the email doesn't match the "end event" time stamp in the NVR log.

Just an interesting tidbit. I don't use the event duration info for anything.

Good news: The actual snapshot isn't postponed by the email "interval". Important, because in 10 seconds the departing vehicle isn't visible in the driveway anymore!

Conclusion:
I believe this was a problem at the Gmail server.
I changed email "interval", to slow down my outgoing email traffic, and problem went away.

What I'd really like:
Dahua to enhance their firmware. Give me the ability to not send the "alarm start" and "alarm end" emails.
They're worthless to me.
I only need the email with the actual snapshot!
I don't need 3 emails for every alarm!
I use Gmail filters. I only forward the emails with snapshots to my cell phone. This is a workaround.
I wish the NVR could be configured to suppress the "start" and "end" emails in the first place.....
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
glad you figured it out, thats pretty much the reason why I offloaded the emailing options to my automation server.. the NVR alerts are noisy and pointless.. for example I get an email saying a camera is offline, but it does not specify which camera is offline.. bah.. so I use ServerMon to watch all my cameras and alert me if one goes down.

agreed, the entire emailing features needs a complete re-think from the ground up.
 

ipnoob

Young grasshopper
Joined
Nov 10, 2016
Messages
56
Reaction score
0
I dont use the snapshot feature built into the cameras, I actually use Domoticz for emailing snapshots and just use the alarm triggers for triggering domoticz.. this way I can modify email templates if nessicary.. so I cant say I have done much with the built in email snapshot option.
How hard is it to set that up? I looked at that software briefly, but it seems very robust if someone only wanted it for this. Any other recommendations for completing the same function?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
Here's a screenshot of my front door ptz configured to take snapshots
Screenshot 2016-11-29 11.14.42.png
and I got a bunch of emails in my gmail titled Front Door Mat Status: On, and here the attached file of my wife coming home with a Pizza and typing in her code to unlock the front door
snapshot.jpg
 

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
@nayr,

Domoticz looks cool, capable and flexible. Suitable for switches (door mat, gate, mailbox, etc). And ideal for sending commands to a PTZ.

But: I don't have ptz cams. And my laser lines and Bosch [PIR + Radar] sensor connected to my NVR provide a good "heads up" for people & vehicles approaching my house. So using Domoticz to solve email inconsistency means another project, learning curve, and delving into programing scripts. (I'm an EE, not an SE or IT guy)

In summary, my NVR-centric system is workable, with the major exception of inconsistent snapshot email delivery.

One Solution:
Some suggested a local SMTP email server in my house might solve the email problem. I'm not so sure. I believe the NVR drops the snapshot emails, and the cameras drop the snapshot emails. (Granted, emails generated by a camera have to squirt through the NVR to reach the internet, so maybe the NVR is the single point of problems). My point is: Dahua's snapshot email is undependable, whether NVR based or camera based.

So I'm skeptical that an on-site SMTP server would improve snapshot email delivery.

My Question:
Do you see a simple solution I haven't considered? Easier than going the Domoticz route?

Thanks in advance!
Fastb
 

ipnoob

Young grasshopper
Joined
Nov 10, 2016
Messages
56
Reaction score
0
Just had another snapshot dropped, really not acceptable to me. I rely on these :/
 

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
Root cause of the problem isn't really clear.
I'd like to know where the snapshot email was dropped. ie: did the snapshot email get sent by the NVR? Or was it dropped by the email server?
Once the root cause is understood, we may be better able to find a solution or workaround.
Maybe a very basic Domoticz implementation, that only handles snapshot emails.
Or another system that receives the "Alarm Start" email, and then it grabs an image from the NVR for emailing directly...
 

Bridger

n3wb
Joined
Dec 22, 2016
Messages
2
Reaction score
0
Got the same problem with my setup. Dahua NVR4216 using PIR to trigger alarm. Sends start and stop emails but no snapshot. When I was using motion video detection on the cameras themselves, they would send snapshot emails. To many false alarms so I switched to using a PIR connected to the NVR. My email will filter based on using file size so I was just filtering out all the small emails(start and stop), but can't do that now that the snapshots don't come. I have a different type of Dahua camera on a distant detached garage(connected via wifi bridge) that has alarm input that is connected to a PIR. It sends the snapshot emails just fine. I just checked the settings and they were exactly the same except the anti dither for the alarm input on the NVR was 15 instead of 2 like the camera that works. I don't think that makes a difference but I just made them the same to see.
 

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
Bridger,
Welcome to the forum!
Let's make sure I have the symptoms straight;
-Two cameras could send email previously. One camera still does. Meaning the SMTP configuration of the cameras confirmed that you were correctly setting up the camera SMTP parameters.
- Two cameras could send snapshots.
- The SMTP configuration of the NVR was also set up correctly for sending SMTP emails. The NVR can send emails.
- The NVR doesn't send snaps.
- The PIR sensor is correctly wired to the NVR. PIR events are recognized by the NVR, based on the fact the NVR sends start and stop emails (however, no snaps)

If the above is correct, here's my hunches on what might be the problem.

A) Did you define which camera would be used for the snapshot? After checking the box for "snapshot", click on "setting" and define which camera to use. See below.

IVS.jpg

B) Did you also enable snapshots in the camera? Yes, it may be redundant to check the box for "snapshot" in both the NVR and IP Camera. But it works for me. See below.

IP Cam IVS.jpg

C) For the NVR, is snapshot resolution defined? Is "mode" set to timing?

Timing.jpg

D) For the camera, same thing.
Type.jpg

E) Did you check the box to add an Atachment to the email? (In NVR, "Network" section, "Email" screen)
email.jpg

After the above, I'm out of hunches....

My problems with emails, and the reason I started this thread, was intermittent emails. You problem isn't intermittent.

I've since decided the intermittent problem couldn't be solved, even with many folks helping me. So I've settled on relying on Push Notifications using gDMSS Plus on my Android phone. Notifications are much more dependable. And the Push Notification is almost immediate, unlike emails which would have inconsistent delays in reaching my phone.

Good Luck,
Fastb
 

Bridger

n3wb
Joined
Dec 22, 2016
Messages
2
Reaction score
0
I had all those settings configured. Finally found what was missing while looking through one of your other posts on the problem. On the NVR settings->storage->schedule there is a tab to set the snapshot recording schedule, that was not scheduled at all before. I now get emails triggered by a local alarm that include snapshots. Oddly though, if I choose to receive snapshots from cam 1 & 2, I receive only cam 2, If I choose 1,2 & 3, I get all three cams. I never get cam 4 snapshot triggered by local alarm, but it has it's own alarm input on the cam itself which is used and the cam sends snapshots on its own just fine. I just don't see why it won't send the snapshot if selected. If I have cams 1, 2 & 4 selected, I get snapshots from cams 1 & 2 only. Odd.
 

Tic

Getting the hang of it
Joined
Sep 24, 2016
Messages
144
Reaction score
32
Location
Florida, USA
Here's a screenshot of my front door ptz configured to take snapshots
View attachment 12767
and I got a bunch of emails in my gmail titled Front Door Mat Status: On, and here the attached file of my wife coming home with a Pizza and typing in her code to unlock the front door
View attachment 12768
Nayr, questions...

1. How high is that PTZ mounted at your front door?
2. Did you use a plate or wood behind the soffit for mounting?
3. Are you even concerned about vandalism or theft mounting it that low?
4. How did you get the temp and day indicators to display onscreen?

Thanks.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
its at the height of the door, 82in iirc.. plus a ~6in step up.

there is already wood behind my soffit, its an overhang actually the bedroom is directly above and it has plywood and old siding under the vynil since its an older house.

nope, surprisingly few even notice it.. the camera will soon be upgraded to a in-celing starlight ptz that has a dome over it but I may run it domeless if it looks okay.

my home automation system has a temp sensor and when the temp changes it triggers a script that does a http api request to update the custom text overlay.
 
Last edited:

Bryan

Getting comfortable
Joined
Nov 25, 2016
Messages
267
Reaction score
274
Bridger,
Welcome to the forum!
Let's make sure I have the symptoms straight;
-Two cameras could send email previously. One camera still does. Meaning the SMTP configuration of the cameras confirmed that you were correctly setting up the camera SMTP parameters.
- Two cameras could send snapshots.
- The SMTP configuration of the NVR was also set up correctly for sending SMTP emails. The NVR can send emails.
- The NVR doesn't send snaps.
- The PIR sensor is correctly wired to the NVR. PIR events are recognized by the NVR, based on the fact the NVR sends start and stop emails (however, no snaps)

If the above is correct, here's my hunches on what might be the problem.

A) Did you define which camera would be used for the snapshot? After checking the box for "snapshot", click on "setting" and define which camera to use. See below.

View attachment 13348

B) Did you also enable snapshots in the camera? Yes, it may be redundant to check the box for "snapshot" in both the NVR and IP Camera. But it works for me. See below.

View attachment 13349

C) For the NVR, is snapshot resolution defined? Is "mode" set to timing?

View attachment 13350

D) For the camera, same thing.
View attachment 13351

E) Did you check the box to add an Atachment to the email? (In NVR, "Network" section, "Email" screen)
View attachment 13352

After the above, I'm out of hunches....

My problems with emails, and the reason I started this thread, was intermittent emails. You problem isn't intermittent.

I've since decided the intermittent problem couldn't be solved, even with many folks helping me. So I've settled on relying on Push Notifications using gDMSS Plus on my Android phone. Notifications are much more dependable. And the Push Notification is almost immediate, unlike emails which would have inconsistent delays in reaching my phone.

Good Luck,
Fastb
Having the same issue now that I've started messing with emails. Having mine sent to my cellphone, but only getting the start and stop message, not the one with the snapshot.
 

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,401
Reaction score
980
Location
North Florida
Camera firmware and NVR firmware is pretty crappy for a lot of things, especially email. Domoticz is actually pretty simple to get up and running and for basic stuff you don't need to do any scripting. At most you could accomplish what you want with the blockly scripting, which is a graphical interface with puzzle pieces you fit to together, setting up a simple thing to pull a snapshot from the camera when the beam is broken should be pretty damn easy. I try not to rely on the camera firmware for anything other than sending the video stream out, pulling snapshots, etc. Though I may start trying to use the built in IVS features.
 

akoei

n3wb
Joined
Feb 27, 2017
Messages
9
Reaction score
0
I just got my new 4208 for a week, I have to say the email alert feature really sucks: 1 event for 3 emails?! Before I read this thread, I contacted Dahua China site (as their north america support is really faked) for the "issue" as I thought I lost half of the snapshot...now I know I am not alone :(
 

Fastb

Known around here
Joined
Feb 9, 2016
Messages
1,342
Reaction score
934
Location
Seattle, Wa
akoei,
Welcome to the forum!

gDMSS Plus on my android phone uses push notifications. They reach me about 5 seconds after the event, and it includes a 20 second video segment.

Fastb
 
Top