FalkTannhaeuser / python-onvif-zeep

ONVIF Client Implementation in Python 2+3 (using https://github.com/mvantellingen/python-zeep instead of suds as SOAP client)
MIT License
420 stars 137 forks source link

How to control absolute focus? #84

Open tankienleong opened 2 years ago

tankienleong commented 2 years ago

I manage to run the relative focus and continuous focus but not absolute focus. There is no error but the camera focus is not move to the desired focus. I'm using DAHUA IPC-HFW2231T-ZAS-S2.

self.focus_request.Focus = {"Absolute":{"Position":selection}} # camera response wrong

self.focus_request.Focus = {"Relative":{"Distance":selection}} # ok

self.focus_request.Focus = {"Continuous":{"Speed":selection}} # ok

self.imaging.Move(self.focus_request)

Besides that the GetStatus always return focus position is 0.5 even I already adjust the camera focus through the web UI.

MaarufB commented 2 years ago

Hi bro could you tell me how did you manage to run continuous focus? I was able to create script for ContinuousMove but seems the Onvif camera doesn't zoom itself. Thanks in advance!