Enable/Disable audio detect via http api

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
Post Reply
mrceolla
Posts: 5
Joined: Sun Mar 11, 2018 7:10 pm

Enable/Disable audio detect via http api

Post by mrceolla »

Hi,

I've figured out how to enable/disable motion detection via the http api, but I can't figure out how to do the same for audio detection. Looking at network traffic in developer tools seems to indicate the following should work:

configManager.cgi?action=setConfig&MotionDetect[0].Enable=false&AudioDetect[0].Enable=false

Motion detection gets disabled, but audio detection remains enabled. Can anyone shed some light on this for me?

Thanks!
mrceolla
Posts: 5
Joined: Sun Mar 11, 2018 7:10 pm

Re: Enable/Disable audio detect via http api

Post by mrceolla »

Is there some other way to programmatically enable/disable audio detection? I've searched the documentation and google results but have come up empty.
mrceolla
Posts: 5
Joined: Sun Mar 11, 2018 7:10 pm

Re: Enable/Disable audio detect via http api

Post by mrceolla »

Wow, OK, it was super unclear how to do this, in fact not even documented, but I figured it out.

urlArr(0) = "configManager.cgi?action=setConfig&MotionDetect[0].Enable=true" ' Motion Detection
urlArr(1) = "configManager.cgi?action=setConfig&AudioDetect[0].AnomalyDetect=true" ' Audio Detection
urlArr(2) = "configManager.cgi?action=setConfig&AudioDetect[0].MutationDetect=true" ' Audio intensity change

I searched the API documentation and there is no mention of AnomalyDetect or MutationDetect. Watching network traffic in my browser's developer tools led me to these values.

Also, apparently you can't daisy-chain commands into a single request, so I do 3 separate requests. If anyone knows this to be false please let me know. I'd much prefer a single request.

Hopefully this helps someone else.
clavius
Posts: 5
Joined: Thu Oct 04, 2018 6:13 pm

Re: Enable/Disable audio detect via http api

Post by clavius »

I'm trying to do the same thing, so your posts saved me a lot of time.

How are you handling authentication now that the Amcrest API dropped support for Basic authentication in favor of Digest authentication?
clavius
Posts: 5
Joined: Thu Oct 04, 2018 6:13 pm

Re: Enable/Disable audio detect via http api

Post by clavius »

Authentication was much easier than I thought. I just inserted the user_id and password at the start of the HTTP command. Works fine with my IP3M-943 and IP2M-841 using the latest firmware.

Code: Select all

http://admin:<my_password>@<cam_ip_address>:<port>/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=true
I'm using a Zipato home automation controller to send the HTTP command to enable camera motion detected. The command is triggered by a Amazon Echo voice command "Alexa, I'm leaving home". This is more flexible than using the camera scheduler to enable motion detection.
Post Reply