Dahua automation?

May 6, 2018
11
8
I was wondering if there was a way to automate Dahua cameras?

I'll explain what I am thinking - say for instance a camera is covering a garden with motion detection however I see no point in triggering the motion detection if you know you're going to be in that area. Due to this is there an API that one can tap into to remotely turn off/on the motion detection from an external source whether that be geolocation or a simple web page with an on/off switch?

I can't find anything from first glance that would enable one to achieve this.
 
I was wondering if there was a way to automate Dahua cameras?

I'll explain what I am thinking - say for instance a camera is covering a garden with motion detection however I see no point in triggering the motion detection if you know you're going to be in that area. Due to this is there an API that one can tap into to remotely turn off/on the motion detection from an external source whether that be geolocation or a simple web page with an on/off switch?

I can't find anything from first glance that would enable one to achieve this.

Back in the days, I did this "trick" with Zoneminder (which has APIs to turn on/off modect for example), however once, a burglar tried to enter from the backyard whilst I was upstairs, luckily I came downstairs to chase him away, the door was left open. Unfortunately, no cam footage although the IPC was hanging right in front of his face.

My opinion: unless you work out a "high resolution" geofencing grid (as in: being at home is not enough to turn off cams in garden), you should reconsider.

On your question: yes, Dahua IPC have API. Example:

Set record time to every Sunday all day. Record type is motion detection and alarm.
API URL should be: http://<ip> /cgi-bin/configManager.cgi?action=setConfig&name=Record[0].TimeSection[0][0]&table=6 00:00:00-24:00:00
In this example, “6 00:00:00-24:00:00” means motion detection and alarm record all day (6 = 4 & 2, alarm is 4, motion detection is 2.


Source: ftp://ftp.wintel.fi/drivers/dahua/SDK-HTTP_ohjelmointi/DAHUA_IPC_HTTP_API_V1.00x.pdf

Good luck!
CC
 
  • Like
Reactions: aristobrat
Back in the days, I did this "trick" with Zoneminder (which has APIs to turn on/off modect for example), however once, a burglar tried to enter from the backyard whilst I was upstairs, luckily I came downstairs to chase him away, the door was left open. Unfortunately, no cam footage although the IPC was hanging right in front of his face.

My opinion: unless you work out a "high resolution" geofencing grid (as in: being at home is not enough to turn off cams in garden), you should reconsider.

On your question: yes, Dahua IPC have API. Example:

Set record time to every Sunday all day. Record type is motion detection and alarm.
API URL should be: http://<ip> /cgi-bin/configManager.cgi?action=setConfig&name=Record[0].TimeSection[0][0]&table=6 00:00:00-24:00:00
In this example, “6 00:00:00-24:00:00” means motion detection and alarm record all day (6 = 4 & 2, alarm is 4, motion detection is 2.


Source: ftp://ftp.wintel.fi/drivers/dahua/SDK-HTTP_ohjelmointi/DAHUA_IPC_HTTP_API_V1.00x.pdf

Good luck!
CC

Oh yes I forgot about the likes of Zoneminder! I was initially thinking of interfacing with the cameras themselves.

That's very helpful indeed. Thank you.

Nah I'm thinking of scenarios whereby you'd be physically in the garden, say for a BBQ or something similar, however I heed your caution and I understand it could be easy to forget about turning back on.
 
Oh yes I forgot about the likes of Zoneminder! I was initially thinking of interfacing with the cameras themselves.

That's very helpful indeed. Thank you.

Nah I'm thinking of scenarios whereby you'd be physically in the garden, say for a BBQ or something similar, however I heed your caution and I understand it could be easy to forget about turning back on.
With a highly customizable VMS like blueiris you can disable recording or alerts with the push of a button on the mobile app... You can also adjust the temporary time that the camera will be in that state so that it reverts back even if you forget to do it yourself.
 
  • Like
Reactions: aristobrat
With a highly customizable VMS like blueiris you can disable recording or alerts with the push of a button on the mobile app... You can also adjust the temporary time that the camera will be in that state so that it reverts back even if you forget to do it yourself.
That's what I do to keep motion detection alerts from driving me crazy when I'm mowing the lawn. I use the mobile app to switch BI temporarily to another profile (that I setup to not send alerts for motion detection). This profile automatically switches back to the regular profile after two hours, so I don't have to worry about forgetting to do that myself. For $60, everything that BI does amazes me!