Disable/enable "Disarming" by API?

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,130
Reaction score
48,995
Location
USA
@wittaj do you use Home Assistant? I'm curious how your use of BI compares to my Home Assistant setup? Dahua cameras + Home Assistant + Deepstack seems to be the sweet spot for me. It gives me the ability to totally integrate any and everything. As an example, at night, if a human is detected by my cams, all my outside lights turn on for 5 minutes. I only record on motion to my NAS so in general, I don't have a central server processing all the video feed 24/7.
Nope I do not run HA (yet anyway lol)

I have found that BI with Dahua camera AI is my sweet spot. I have the Dahua AI IVS rule configured for triggering within my "personal space" around the home and that is what sends me push and alerts. Then I let BI motion take care of any other motion outside of those areas.

It has been on my list of things to do to figure out the API to arm/disarm active deterrence and then set up a profile to disarm them. Hopefully the API script you have above work for mine as I have found little nuance differences in APIs among different Dahua cams.
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
Nope I do not run HA (yet anyway lol)

I have found that BI with Dahua camera AI is my sweet spot. I have the Dahua AI IVS rule configured for triggering within my "personal space" around the home and that is what sends me push and alerts. Then I let BI motion take care of any other motion outside of those areas.

It has been on my list of things to do to figure out the API to arm/disarm active deterrence and then set up a profile to disarm them. Hopefully the API script you have above work for mine as I have found little nuance differences in APIs among different Dahua cams.
Sounds like a nice setup. Let me know if you need me to figure out any of the Dahua APIs, happy to do so.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,130
Reaction score
48,995
Location
USA
If you aren't running Home Assistant and which to use a script... here's how you'll do it (remember this needs to use Digest Authentication)
Code:
# Get the current value
http://IP_ADDRESS/cgi-bin/configManager.cgi?action=getConfig&name=DisableLinkage

# Disable
http://IP_ADDRESS/cgi-bin/configManager.cgi?action=setConfig&DisableLinkage[0].Enable=false

# Enable
http://IP_ADDRESS/cgi-bin/configManager.cgi?action=setConfig&DisableLinkage[0].Enable=true
@runraid - thanks again for this! I had to add the user and password in front of the IP address, but looks like it works for at least one of my active deterrence cams!

I just ran the get current value and mine says: table.DisableLinkage.Enable=false

Mine is armed 24/7, so I was expecting mine to say Enable=true, so what I am missing? Are the disable and enable reversed?
 
Last edited:

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@wittaj thats correct. It’s worded weird. You did not enable the disable setting. So it returns false.

disable =false is an easier way to think about it.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,130
Reaction score
48,995
Location
USA
OK thanks. I figured it was a weirdly worded double negative or something LOL.
 

genelit

Getting comfortable
Joined
Jan 4, 2018
Messages
264
Reaction score
395
Location
Sweden
It is the same weird logic in the NVRs webinterface and in the DMSS.
You need to think two or three times to understand what it actually mean.

Changing to "Armed / Disarmed" would make it just a little bit more clear.... =)

disarm.JPG
 

Cmccaw

n3wb
Joined
Jun 9, 2021
Messages
2
Reaction score
0
Location
australia
Sounds like a nice setup. Let me know if you need me to figure out any of the Dahua APIs, happy to do so.
Hi @runraid, do you know the API to control the speaker on the active deterrence cameras id like to play the different recordings at different times! TIA
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
No sorry haven’t had time. If you can please create an issue in GitHub for this so I don’t forget
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@Pacs what exactly where you looking for? It wasn't totally clear to me as I scrolled back through the history. Sorry for the confusion
 

Pacs

n3wb
Joined
Feb 9, 2021
Messages
14
Reaction score
0
Location
Australia
@Pacs what exactly where you looking for? It wasn't totally clear to me as I scrolled back through the history. Sorry for the confusion
I am currently running NX witness on one of my systems with the DAHUA HDW-3549HP-AS-PV-0280B I am looking to be able to arm and disarm the camera via API commands. (Correct me if terminology is incorrect)

I am after this ability so I can use the arm/disarm features without going with a dahua NVR OR dahua software utilising a third party software to send commands to use this function so my strobe lights or audio isnt
Going off all the time and can be very adaptable.

Thank you so much for your time
 

Pacs

n3wb
Joined
Feb 9, 2021
Messages
14
Reaction score
0
Location
Australia
I can’t say I have I guess I’ve jumped the gun. I will have a look once all connected and confirm this
 

Pacs

n3wb
Joined
Feb 9, 2021
Messages
14
Reaction score
0
Location
Australia
@runraid Please see attached setting I am looking to turn on and off via commands without going into web GUI and making it possible to do from NX witness with a soft trigger.
 

Attachments

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@Pacs this feature is already added to the home assistant integration. Here's a snapshot... it's the switch with the label "Disarming"

1630199011211.png
 

Pacs

n3wb
Joined
Feb 9, 2021
Messages
14
Reaction score
0
Location
Australia
@Pacs this feature is already added to the home assistant integration. Here's a snapshot... it's the switch with the label "Disarming"

View attachment 100029
Hi, my apologises should have been using a different thread this was to be used for a vms system.

I have managed to find the http request for this and working beautifully.
Thank you for your time again
 

miljume

n3wb
Joined
Feb 11, 2020
Messages
12
Reaction score
1
Location
Sweden
@Pacs this feature is already added to the home assistant integration. Here's a snapshot... it's the switch with the label "Disarming"

View attachment 100029
I implemented this in my Home Assistant setup and really like it !

However I am not sure how the "Disarming" switch works

If I turn that on, all the mail notifications for alarms (like tripwire etc) turns off but the DMSS alarms and push notifications keep coming

Are they not turned off by this switch?
 
Top