I have a Dahua SD22204T which has a certain ONVIF support from HA. Unfortunately the ‘camera.enable_motion_detection’ and ‘camera.dusable_motion_detection’ are not working, running Home Assistant 0.110.4. This is a pity since the Dahua firmware does not support sunset triggers for enabling and disabling motion detect and when it gets dark it is too unreliable in the daylight settings.
So… I found this API reference and was happy to see that the calls below work perfectly fine. So I’ve put them in a shell command for now.
dahua_motion_enable: curl -g --anyauth –u <uid>:<pwd> 'http://<ip/dns>/cgi-bin/configManager.cgi?action=setConfig&MotionDetect.Enable=true' dahua_motion_enable: curl -g --anyauth –u <uid>:<pwd> 'http://<ip/dns>/cgi-bin/configManager.cgi?action=setConfig&MotionDetect.Enable=false
My reason for share this is to help others.
P.s. Of course it would be create to have this “fixed” and maybe additional functionality was added, but I just don’t have the tools, time and knowledge to do this by myself. So this is my solution for now and maybe it inspires others to solve issues using Shell_Command
edit: fixed the API reference link