Dahua NetAlarm HTTP API - How to trigger it?

Strider

n3wb
Joined
Jan 4, 2018
Messages
1
Reaction score
0
Does anyone know how to trigger NetAlarm via the HTTP API on a Dahua NVR? I found version 1.67 of the API documentation but it doesn't address NetAlarm.

Background - I am trying to trip my NVR alarms from Z-Wave (SmartThings) door, window and motion sensors. I am hoping to configure SmartThings to interact with NetAlarm via the HTTP API.

My system is a Q-SEE 826 NVR (which I understand to be a re-branded Dahua) plus a number of QC 4mp POE cameras.

Poking around the API I can find the configuration for NetAlarm:

http://xxx.xxx.xxx.xxx:85/cgi-bin/configManager.cgi?action=getConfig&name=NetAlarm

But no way to trigger it.

The forums have been really helpful to me, hoping some of the experts are willing to share advice.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
I think NetAlarm could have been deprecated when they killed the alarm server. I'm not really sure. I'm am unable to find the string 'NetAlarm' in the 1.67 API document.
It's hard to know what API version corresponds with the software on your NVR or if all API functions are supported.

Maybe GetEventHandler and SetEventHandler can do what you want. I'm not sure I don't have a Dahua NVR.

You might want to look at GitHub - nayrnet/node-dahua-api: NodeJS Module for Dahua IPC HTTP API
and @nayr's threads here on it and home automation.
 
Last edited:

hdo27

n3wb
Joined
Mar 31, 2017
Messages
14
Reaction score
4
I've been there ;-)

Check that out:

GitHub - hdo/netalarm: Simple program which triggers Net Alarm on a Dahua NVR

How does 'Net Alarm' and/or 'Alarm Centre/Server' work? [SOLVED]

Note: You can only trigger NetAlarm if your NVR have physical alarm inputs


BTW: AlarmServer is pretty much the opposite of NetAlarm

Does anyone know how to trigger NetAlarm via the HTTP API on a Dahua NVR? I found version 1.67 of the API documentation but it doesn't address NetAlarm.

Background - I am trying to trip my NVR alarms from Z-Wave (SmartThings) door, window and motion sensors. I am hoping to configure SmartThings to interact with NetAlarm via the HTTP API.

My system is a Q-SEE 826 NVR (which I understand to be a re-branded Dahua) plus a number of QC 4mp POE cameras.

Poking around the API I can find the configuration for NetAlarm:

http://xxx.xxx.xxx.xxx:85/cgi-bin/configManager.cgi?action=getConfig&name=NetAlarm

But no way to trigger it.

The forums have been really helpful to me, hoping some of the experts are willing to share advice.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
I've been there ;-)

Check that out:

GitHub - hdo/netalarm: Simple program which triggers Net Alarm on a Dahua NVR

How does 'Net Alarm' and/or 'Alarm Centre/Server' work? [SOLVED]

Note: You can only trigger NetAlarm if your NVR have physical alarm inputs

BTW: AlarmServer is pretty much the opposite of NetAlarm
Sorry I forgot about that earlier thread.

Simplest suggestion would be to use wireshark to figure out what the compiled program using the SDK is sending to the NVR. It may not be http.

I can't find it right now, but I saw an NVR on dahua's website that didn't have alarm io instead there was an optional accessory module that had alarm io.
 

hdo27

n3wb
Joined
Mar 31, 2017
Messages
14
Reaction score
4
Simplest suggestion would be to use wireshark to figure out what the compiled program using the SDK is sending to the NVR. It may not be http.
Yeah i also did that. I can confirm that it's not http. It's raw TCP with some crippled authentication routines.
In the end for me it was much simpler to write a little console prorgram to trigger the NetAlarm.


I can't find it right now, but I saw an NVR on dahua's website that didn't have alarm io instead there was an optional accessory module that had alarm io.
That sounds interesting. I did some reverse engineering on an I/O module for the Synology Surveillance Station back then. However the Surveillance Station is much more expensive that
my Dahua NVR and also the NVR is more reliable.
 

Mufasa

Young grasshopper
Joined
Jan 24, 2017
Messages
34
Reaction score
11
@hdo, in your github link you mention "libavnetsdk.so" from dahua sdk is required, can you share where to find the said sdk? By the keyword dahua sdk I can't seem to find ip cam related sdk..

And, if this route does not work, I was thinking of doing it with esp8266. Does the alarm io just need a low signal to trigger?
 

Mufasa

Young grasshopper
Joined
Jan 24, 2017
Messages
34
Reaction score
11
Thanks!

Just a reminder for anyone who wants to try, the Makefile script looks for 'libavnetsdk.so' file at '../dahuasdk' folder.
Put it there before you run 'make', and put the libavnetsdk.so file in your library path after the binary is built and placed in user / system path.
 
Top