rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
369 stars 71 forks source link

Autofocus support #339

Open GitRDone2022 opened 4 months ago

GitRDone2022 commented 4 months ago

I have a HFW5241E-Z12E that drifts out of focus a little each day.

Would like to be able to call an event at a specific time of day to autofocus it again without having the specific zoom and focus numbers.

http:///cgi-bin/devVideoInput.cgi?action=autoFocus is the command

Currently using a powershell script to do this. Thanks :)

GitRDone2022 commented 4 months ago

Also in my powershell I am calling the following, would be nice to allow each of these in home assistant. I currently ramp-up or down the motion sensitivity value to auto calibrate the threshold and reduce the number of false motion events.

I also up my night bitrate to 20mbit then back down to 4mbit during the day.

Thanks

Get Motion Sensitivity Value 0-100 http://IP/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect return [int]$_.'table.MotionDetect[0].MotionDetectWindow[0].Sensitive'

Set Motion Sensitivity Value 0-100 http://IP/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].MotionDetectWindow[0].Sensitive=100

Get current encode bitrate http://IP/cgi-bin/configManager.cgi?action=getConfig&name=Encode return $_.'table.Encode[0].MainFormat[0].Video.BitRate'

Set Bitrate http://IP/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=8192&Encode[0].MainFormat[1].Video.BitRate=8192&Encode[0].MainFormat[2].Video.BitRate=8192