Open dcyrils opened 5 years ago
Trying to do this as well...
I've tried 3 methods all of which don't work.
set_config_req = cam.ptz.create_type('SetConfiguration')
set_config_req.PTZConfiguration = config
set_config_req.ForcePersistence = False
cam.ptz.SetConfiguration(set_config_req)
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})
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 ?
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..wrapped at 0x7fa09265f0d0> , args = ({
....MyConfiguration...
}, False) , kwargs = {}
Both elements (Conf+ForcePersistence) ARE in function input... Why MISSING????