Dahua HTTP API

Crazykiller

Getting comfortable
Joined
Jan 30, 2017
Messages
544
Reaction score
317
Location
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?
 

Crazykiller

Getting comfortable
Joined
Jan 30, 2017
Messages
544
Reaction score
317
Location
Germany
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.
 
Joined
Nov 28, 2017
Messages
26
Reaction score
6
Location
London
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
 

hdo27

n3wb
Joined
Mar 31, 2017
Messages
14
Reaction score
4
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.
 

jrf

Getting the hang of it
Joined
Sep 12, 2017
Messages
169
Reaction score
93
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.
 
Joined
Nov 28, 2017
Messages
26
Reaction score
6
Location
London
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.
 
Joined
Nov 28, 2017
Messages
26
Reaction score
6
Location
London
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

Kinchyle

Young grasshopper
Joined
Aug 10, 2017
Messages
40
Reaction score
16
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).
 
Joined
Jul 14, 2018
Messages
28
Reaction score
7
Location
New Zealand
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.
 

Jemen2012

n3wb
Joined
Jun 27, 2020
Messages
1
Reaction score
0
Location
Ecuador
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
 
Joined
Dec 26, 2020
Messages
9
Reaction score
0
Location
Belgium
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
 
Top