IPC-HDB4300C HTTP API - Get current alarm state

Joined
Mar 22, 2017
Messages
12
Reaction score
2
I was looking at a newer API doc (which is from 2014): DAHUA_HTTP_API_FOR_IPC&SD-V1.40
It's in section, 15.1.1 GetVideoAnalyseRule page 105.
I can't seem to find 1.40, any chance you could share it?
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,422
Reaction score
3,656
I can't seem to find 1.40, any chance you could share it?
I had the file downloaded I didn't remember the source (pretty sure it's been posted here before), and I was hunting for a newer version before posting/sharing 1.40 again. You found the newer version faster than me :D
 
Joined
Mar 22, 2017
Messages
12
Reaction score
2
I have 2 trip wire rules, one for entering and one for leaving. But the output from this command:

Code:
wget 'http://admin:admin@192.168.1.108/cgi-bin/eventManager.cgi?action=attach&codes=[VideoMotion,VideoLoss,VideoBlind,AlarmLocal,CrossLineDetection,CrossRegionDetection,LeftDetection,TakenAwayDetection,VideoAbnormalDetection,FaceDetection,AudioMutation,AudioAnomaly,VideoUnFocus,WanderDetection,RioterDetection,ParkingDetection,MoveDetection,MDResult]' -O events.log
Looks like this:

Code:
-- myboundary
Content-Type: text/plain
Content-Length:46
Code=CrossRegionDetection;action=Start;index=0
Which rule is that? - the index is always 0 it seems no matter what. Grr. Why is it so difficult to just get a stream of events from a camera... - each rule has a name, why not just list the name Dahua...
 
Last edited:

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,422
Reaction score
3,656
I have 2 trip wire rules, one for entering and one for leaving. But the output from this command:

wget 'http://admin:admin@192.168.1.108/cgi-bin/eventManager.cgi?action=attach&codes=[VideoMotion,VideoLoss,VideoBlind,AlarmLocal,CrossLineDetection,CrossRegionDetection,LeftDetection,TakenAwayDetection,VideoAbnormalDetection,FaceDetection,AudioMutation,AudioAnomaly,VideoUnFocus,WanderDetection,RioterDetection,ParkingDetection,MoveDetection,MDResult]' -O events.log​

Looks like this:

-- myboundary
Content-Type: text/plain
Content-Length:46
Code=CrossRegionDetection;action=Start;index=0
Which rule is that? - the index is always 0 it seems no matter what. Grr. Why is it so difficult to just get a stream of events from a camera... - each rule has a name, why not just list the name Dahua...
use code bb tags for nicer formatting :)
Start by running this:
Code:
http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
You probably have to set EventHandler for your rules using 15.1.2 SetVideoAnalyseRule, and then subscribe to the events.

Several API versions ago, you could specify an alarm server and the cameras could be set to just push events out but they deprecated that functionality.
 
Joined
Mar 22, 2017
Messages
12
Reaction score
2
use code bb tags for nicer formatting :)
Start by running this:
Code:
http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
You probably have to set EventHandler for your rules using 15.1.2 SetVideoAnalyseRule, and then subscribe to the events.

Several API versions ago, you could specify an alarm server and the cameras could be set to just push events out but they deprecated that functionality.
Ah, thank you for the tip. I have IVS set up like the attached (ignore the lack of live image, I set it up on WIndows, now booted to mac).

I tried to set codes to "Exit" "Intrusion" etc, as specified in my rule names, but this has no effect, I see the CrossLineDetection, etc, but not my specific rules, so it's impossible to tell which event applies to which rule, hmm. Any ideas?

e.g.

Code:
-- myboundary
Content-Type: text/plain
Content-Length:38
Code=LeftDetection;action=Stop;index=0


-- myboundary
Content-Type: text/plain
Content-Length:44
Code=CrossLineDetection;action=Start;index=0


-- myboundary
Content-Type: text/plain
Content-Length:45
Code=CrossRegionDetection;action=Stop;index=0


-- myboundary
Content-Type: text/plain
Content-Length:43
Code=CrossLineDetection;action=Stop;index=0


-- myboundary
Content-Type: text/plain
Content-Length:46
Code=CrossRegionDetection;action=Start;index=0


-- myboundary
Content-Type: text/plain
Content-Length:39
Code=LeftDetection;action=Start;index=0


-- myboundary
Content-Type: text/plain
Content-Length:45
Code=CrossRegionDetection;action=Stop;index=0


-- myboundary
Content-Type: text/plain
Content-Length:38
Code=LeftDetection;action=Stop;index=0
 

Attachments

Putimir

n3wb
Joined
Nov 9, 2016
Messages
20
Reaction score
7
suck, I get a 400 bad request response.. on all my Dahuas.. this must be something new.
Hi, nayr, do you have anything new on this subject? I'm currently having a support ticket open with Synology support team (i'm using Synology Surveillance Station and if I set up my Dahuas with the "supported" "native" profile, none of the alarms are picked up by the SS - it's working though if I'm using ONVIF profile), they concluded, that the problem lies in the fact, that the Dahuas respond with HTTP/400 after a /cgi-bin/eventManager.cgi?action=attach&codes=[VideoMotion] query...
 
Joined
Mar 22, 2017
Messages
12
Reaction score
2
NodeJS Module: node-dahua-api :p

P.S. I've found my google-fu again and 1.56 above from 2015 is the latest version I can locate as well
Note the latest version of this document is 2.11 from 2017-03-06. In order to get it, you need to contact a Dahua reseller, which will then send you an NDA document to sign, once signed, they will send you the latest version. Might be worth the slight hassle of doing this as they have changed a few things.
 

Mufasa

Young grasshopper
Joined
Jan 24, 2017
Messages
34
Reaction score
11
Was there a good way to find out which HTTP API my camera is running?

Like was there a endpoint for version or something similar?

TIA
 

Putimir

n3wb
Joined
Nov 9, 2016
Messages
20
Reaction score
7
Hi, nayr, do you have anything new on this subject? I'm currently having a support ticket open with Synology support team (i'm using Synology Surveillance Station and if I set up my Dahuas with the "supported" "native" profile, none of the alarms are picked up by the SS - it's working though if I'm using ONVIF profile), they concluded, that the problem lies in the fact, that the Dahuas respond with HTTP/400 after a /cgi-bin/eventManager.cgi?action=attach&codes=[VideoMotion] query...
Bump
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,422
Reaction score
3,656
I tried to set codes to "Exit" "Intrusion" etc, as specified in my rule names, but this has no effect, I see the CrossLineDetection, etc, but not my specific rules, so it's impossible to tell which event applies to which rule, hmm. Any ideas?
Did you ever figure out a way to identify which rule of the same type is triggered?
Looking at API 2.12 and I don't see any way to get this info either. Thought I'd ask before I dust off wireshark.
 
Joined
Mar 22, 2017
Messages
12
Reaction score
2
Did you ever figure out a way to identify which rule of the same type is triggered?
Looking at API 2.12 and I don't see any way to get this info either. Thought I'd ask before I dust off wireshark.
Unfortunately no :(
 
Top