You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I'm successfully using the zoom function in ONVIF using the same mycam details, but can't get the Imaging Focus Move function to work.
I set up a request as follows:
from onvif import ONVIFCamera
mycam = ONVIFCamera('192.168.1.108', 8080, 'admin', 'admin', 'C:/Users/richr/Downloads/python-onvif-zeep-zeep/python-onvif-zeep-zeep/wsdl/')
media = mycam.create_media_service()
imaging = mycam.create_imaging_service()
video_sources=media.GetVideoSources()
When I print(requestMove) to check it's all in there, I get;
{
'VideoSourceToken': 'VideoSource0',
'Focus': 'Continuous',
'Move': 'Focus',
'Speed': 0.5
}
But when I try the Move command using
imaging.Move(requestMove)
I get error messages galore culminating in :
File "c:\Users\richr\PythonCode\ZoomF\ONVIF Focus Test.py", line 27, in
imaging.Move(requestMove)
File "c:\Users\richr\AppData\Local\Programs\Python\Python311\Lib\site-packages\onvif\client.py", line 26, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: The ReferenceToken type doesn't accept collections as value
I've checked and the camera does support all the functions:
{
'Absolute': None,
'Relative': None,
'Continuous': {
'Speed': {
'Min': -1.0,
'Max': 1.0
}
}
}
I feel like I'm very close to getting it to work, could anyone steer me as to what I'm missing ?
cheers
The text was updated successfully, but these errors were encountered:
Hi all, I'm successfully using the zoom function in ONVIF using the same mycam details, but can't get the Imaging Focus Move function to work.
I set up a request as follows:
from onvif import ONVIFCamera
mycam = ONVIFCamera('192.168.1.108', 8080, 'admin', 'admin', 'C:/Users/richr/Downloads/python-onvif-zeep-zeep/python-onvif-zeep-zeep/wsdl/')
media = mycam.create_media_service()
imaging = mycam.create_imaging_service()
video_sources=media.GetVideoSources()
requestMove = imaging.create_type('Move')
requestMove.VideoSourceToken = video_sources[0].token
requestMove.Move = 'Focus'
requestMove.Focus = 'Continuous'
requestMove.Speed = 0.5
When I print(requestMove) to check it's all in there, I get;
{
'VideoSourceToken': 'VideoSource0',
'Focus': 'Continuous',
'Move': 'Focus',
'Speed': 0.5
}
But when I try the Move command using
imaging.Move(requestMove)
I get error messages galore culminating in :
File "c:\Users\richr\PythonCode\ZoomF\ONVIF Focus Test.py", line 27, in
imaging.Move(requestMove)
File "c:\Users\richr\AppData\Local\Programs\Python\Python311\Lib\site-packages\onvif\client.py", line 26, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: The ReferenceToken type doesn't accept collections as value
I've checked and the camera does support all the functions:
{
'Absolute': None,
'Relative': None,
'Continuous': {
'Speed': {
'Min': -1.0,
'Max': 1.0
}
}
}
I feel like I'm very close to getting it to work, could anyone steer me as to what I'm missing ?
cheers
The text was updated successfully, but these errors were encountered: