im using this code for my task. and successfully run the moving method and the camera starts rotating. ones I call the stop() method it's throwing an exception. please help for solve this
Traceback (most recent call last):
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\onvif\client.py", line 23, in wrapped
return func(*args, **kwargs)
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\onvif\client.py", line 153, in wrapped
return call(params, callback)
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\onvif\client.py", line 140, in call
ret = func(**params)
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\zeep\proxy.py", line 46, in __call__
return self._proxy._binding.send(
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\zeep\wsdl\bindings\soap.py", line 135, in send
return self.process_reply(client, operation_obj, response)
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\zeep\wsdl\bindings\soap.py", line 229, in process_reply
return self.process_error(doc, operation)
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\zeep\wsdl\bindings\soap.py", line 391, in process_error
raise Fault(
zeep.exceptions.Fault: Action Not Support
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/josh/Desktop/code/test.py", line 166, in <module>
ptz.Stop({'ProfileToken': moverequest.ProfileToken})
File "C:\Users\josh\Desktop\code\venv\lib\site-packages\onvif\client.py", line 26, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: Action Not Support
Cameras may opt to use an alternate method for stopping movement. This I found by trial and error and later found the following post that explained it.
https://doc.milestonesys.com/latest/en-US/onvifdriver/why_the_onvif_driver_does.htm
The solution here is to remove this Stop request from the program. When you do need to stop movement, you will need a different strategy: send in x,y values of zero for continuous movement operation.
I also found that the relative and absolute movements are not really supported on my camera. They work, but they work identically to the continuous movement, not as expected
My camera company have been helpful. The bottom line is that you may need their assistance to know exactly what and how they support their device. For example, I cannot turn off auto-focus on mine.