Dahua HTTP API

Crazykiller

Getting comfortable
Jan 30, 2017
542
316
Germany
Does anybody know where to get the latest Dahua HTTP API for IPC, DVR, NVR?
@EMPIRETECANDY do you have access to those PDF documents on your ftp maybe?
 
Interested as well!
 
This is the most current version I could find, it hasn't been updated in over 2 years (2015-9-16).

Thanks for the upload.
I was wondering if there’s nothing new, as they updated the firmware a lot of times and added features etc.
I would also like to have an API for the NVR. A lot of the functions are the same, but not all.
 
I'm getting a bit frustrated trying to modify OSD using the http api. The camera is a Dahua SD42212T-HN running the 2.600 firmware.

It all works fine in manual tests from a browser or using curl (7.54, on MacOS). But I want to have a script, small app or something on a small IOT device that reads environmental data from its sensors, formats it and writes it as OSD.

I have not been able to find a way for the camera to accept http api calls with anything less than Digest authorization. I would be happy with basic auth or no auth at all (it's behind a serious firewall and I'm using the camera's IP restrictions). But Digest auth would mean adding an MD5 crypto module to the IOT device, which I'd prefer to avoid if possible.

There is a "none/basic/digest" setting for rtsp streaming, but I can't find a similar setting for api calls.

Does anybody have any suggestions?

Alternatively, is there another way of modifying OSD, perhaps via telnet/ssh? (I'm also having problems with ssh access, but that's another story).

Thanks in advance
Sean
 
Search in Google api amcrest i'm at version 3 i use version 2

Thanks for the hint! The Amcrest API is working like a charm. I'm using a http call to download certain parts of a recording and it's working great.
 
I have not been able to find a way for the camera to accept http api calls with anything less than Digest authorization. I would be happy with basic auth or no auth at all (it's behind a serious firewall and I'm using the camera's IP restrictions). But Digest auth would mean adding an MD5 crypto module to the IOT device, which I'd prefer to avoid if possible.

There is a "none/basic/digest" setting for rtsp streaming, but I can't find a similar setting for api calls.

Does anybody have any suggestions?

Sean

That was my problem as well. I ended up having to go through my BlueIris server. I know that's not an option for everyone....but I'd still like to be able to do it on the camera.
 
I ended up implementing Digest auth. My code is in Lua for the Nodemcu environment; I have it running on a couple ESP8266 boards. I'm happy to post if that might be of interest to anybody.
 
Example Lua code attached.

I've only recently started experimenting with Lua so please forgive any bad style. Scope of locals in Lua seems to me to be slightly unconventional; if any implicit locals are odd or broken please let me know :)
 

Attachments

  • Like
Reactions: 7aman
Anyone get api to the NVR working. Hoping to get tripwire events from the NVR instead of visiting each camera.
I've seen this command for the camera http://{host}:{port}/cgi-bin/eventManager.cgi?action=attach&codes=%5B{events}%5D

I'd like to incorporate the events into home assistant (i.e. home automation).
 
any luck with this?

I have home assistant, but am yet to buy a couple of poe cameras and a NVR and I'm not sure whether to go with hikvision or dahua NVR for home assistant integration.
 
Hello, I need urgent help. I am not a pro and can't figure out how to get a snapshot using digest authorization in VB.net or c#. I have tried everything and i am still getting the username and password request while testing using a browser and no snapshot image in my program.

Thanks
 
I ended up implementing Digest auth. My code is in Lua for the Nodemcu environment; I have it running on a couple ESP8266 boards. I'm happy to post if that might be of interest to anybody.

Hi I try to control my Dahua IP camera by ESP32 http get request but I seem to do something wrong.
Could you give an example please?

I tried in Postman


and many other requests

with header Authorization Basic YWRtaW46RGFoaGFkQDAy

Thanks in advance