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!
Enable/Disable audio detect via http api
Re: Enable/Disable audio detect via http api
Is there some other way to programmatically enable/disable audio detection? I've searched the documentation and google results but have come up empty.
Re: Enable/Disable audio detect via http api
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.
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.
Re: Enable/Disable audio detect via http api
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?
How are you handling authentication now that the Amcrest API dropped support for Basic authentication in favor of Digest authentication?
Re: Enable/Disable audio detect via http api
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.
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.
Code: Select all
http://admin:<my_password>@<cam_ip_address>:<port>/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=true