python-onvif-zeep
python-onvif-zeep copied to clipboard
ONVIFError: Unknown error: Missing element ForcePersistence
Hi ) This is code: forcePersistence = False ptz_service.SetConfiguration(ptzConfiguration, forcePersistence)
...and I get the mistake in header (((
PS. Debug printing -
Ouuups: err = Missing element ForcePersistence (SetConfiguration.ForcePersistence) , func = <function ONVIFService.service_wrapper.
Trying to do this as well...
I've tried 3 methods all of which don't work.
- Using the create_type
set_config_req = cam.ptz.create_type('SetConfiguration')
set_config_req.PTZConfiguration = config
set_config_req.ForcePersistence = False
cam.ptz.SetConfiguration(set_config_req)
- Using my own dict() to represent the input (some inputs are missing here, just an example)
new_config = {
'token': cam.media_profile.token,
'DefaultAbsolutePanTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/SphericalPositionSpaceDegrees',
'Name': 'PTZConfig_1'
}
cam.ptz.SetConfiguration({'PTZConfiguration': new_config, 'ForcePersistence': False})
- The easiest method, as @dcyrils used above,
cam.ptz.SetConfiguration(config, False)
All of which produce errors.
Methods (1 & 2) produce the following error-
Missing element Name (SetConfiguration.PTZConfiguration)
Method 3 produces the same error from the previous comment-
Missing element ForcePersistence (SetConfiguration.ForcePersistence)
Any suggestions @FalkTannhaeuser ?