Disable/enable "Disarming" by API?

I just released a new version of rroller/dahua that supports the "Disarming Linkage" as a binary switch.
You can install that into Home Assistant manually or with HACS. It looks like this...

View attachment 92303

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

Hey @runraid - I finally got around to trying to set this all up in BI to just disable these types of cam with a profile.

The command works to get the current value, but when I run the enable or disable, it takes exception to the 0 in [0]. I have tried 0,1,2,true,false and eliminated the [0] and still doesn't like it. Any ideas?

And now that you have the 4k/x, it has audio that can play but doesn't have the disarm option - have you figured out the API to disable and enable that?
 
Looking at this now @wittaj

It doesn't look like this cam supports it? At least not on the firmware I'm on now.


Take a look at this... Notice the IPC-Color4K-X-2.8MM doesn't even have the "disarming" option in the UI. That's probably why the API call doesn't work too. Maybe @EMPIRETECANDY can put in a feature request for the firmware?

Cam that supports it...IPC-Color4K-X-2.8MM
1645291551132.png1645291537054.png
 
Yes, that is correct, the 4K/X and other cameras that mimic active deterrence from an audio perspective do not have this disarming feature.

I already have a request in to Andy about it LOL.

But you have been a master of figuring out API codes, I thought if anyone could stumble on it, it would be you.

Some of my active deterrence cams also do not like that API you posted earlier.

The command works to get the current value, but when I run the enable or disable, it takes exception to the 0 in [0]. I have tried 0,1,2,true,false and eliminated the [0] and still doesn't like it.

The only work around I can figure is an API to turn the IVS rules off and on? Have you figured that one out?
 
  • Like
Reactions: genelit
You want to turn the IVS on/off? Yeah I can probably get the command for that.. give me a minute :D

Well I would prefer to disarm the audio or alarm feature of the IVS so that the camera is still triggering and recording motion events based on IVS so that it stops telling me I am under surveillance when I am mowing the lawn LOL.

But if turning the IVS off and on can accomplish that, it will work in my case since Blue Iris is still recording anyway, it just won't get camera triggers during that time.

But yeah I would prefer the disarm feature first!
 
@wittaj here's an example (change your IP of course!)

This is how you list out the current rules...

Which might show you something like this...
Code:
table.VideoAnalyseRule[0][3].Name=IVS-1
table.VideoAnalyseRule[0][3].ObjectTypes[0]=Human
table.VideoAnalyseRule[0][3].ObjectTypes[1]=Vehicle
table.VideoAnalyseRule[0][3].PtzPresetId=0
table.VideoAnalyseRule[0][3].TrackEnable=false
table.VideoAnalyseRule[0][3].Type=CrossLineDetection

Notice "IVS-1" is [0][3] ... 0 is the channel, 3 is the rule index. Find your rule index and pass it in like this... (use true to enable, false to disable)

You can also chain several of them together if you just wanna blindly turn them all off...
 
  • Like
  • Love
Reactions: Mick70 and genelit
Also, can you show me a screenshot of the UI where you'd "disarm the audio or alarm feature"? I can probably get the API for that too...
 
You are awesome!

I have some work to do now LOL.

While disarming would be preferred, this could work very well as I have different IVS rules just for the audio already set up where I can just turn off or on that particular IVS rule and still get the camera triggers from the other IVS rules.

This is awesome.

Fingers crossed mine works and responds this way LOL.
 
  • Like
Reactions: genelit and runraid
Great job @runraid !

Would you have the chance to dive in to the ITC-237 (ANPR) camera and or a camera supporting video metadata (where the plates also are recognised (in an environment with a 5-series NVR))
It would be awesome if it's possible to get the plate from the last passing car and post it in HA.

If you don't have the cameras I can let you in to play with the ones I have.
 
@wittaj here's an example (change your IP of course!)

This is how you list out the current rules...

Which might show you something like this...
Code:
table.VideoAnalyseRule[0][3].Name=IVS-1
table.VideoAnalyseRule[0][3].ObjectTypes[0]=Human
table.VideoAnalyseRule[0][3].ObjectTypes[1]=Vehicle
table.VideoAnalyseRule[0][3].PtzPresetId=0
table.VideoAnalyseRule[0][3].TrackEnable=false
table.VideoAnalyseRule[0][3].Type=CrossLineDetection

Notice "IVS-1" is [0][3] ... 0 is the channel, 3 is the rule index. Find your rule index and pass it in like this... (use true to enable, false to disable)

You can also chain several of them together if you just wanna blindly turn them all off...

So running that prints out a ton of lines LOL.

So it looks like for this:

table.VideoAnalyseRule[0][2].EventHandler.VoiceEnable=true

That if I change true to false that would turn the audio off for that IVS rule? So the IVS rule would still trigger and record, just not play the audio?
 
@runraid what am I doing wrong LOL

Every time I try to run anything other than the get command it comes up with an error:

1645314244386.png1645314119593.png
 
OK so it didn't return an error, but the check box isn't changing when going from true to false in the camera GUI - shouldn't that change based on the response?
 
I hit the refresh button at the bottom of the IVS and the refresh of the browser and still no change.