python-onvif-zeep
python-onvif-zeep copied to clipboard
README.rst sample codes problems
First Thanks for sharing codes.I try on run samples of your codes and I got errors so I was disappoint from your code but after reading zeep document I found errors on your code as you can see below
In Type Instance section , Hostname is wrong attribute name.
params = mycam.devicemgmt.create_type('SetHostname')
params.Hostname = 'NewHostName'
mycam.devicemgmt.SetHostname(params)
must be
params = mycam.devicemgmt.create_type('SetHostname')
params.Name = 'NewHostName'
mycam.devicemgmt.SetHostname(params)
In Use other services section ,GetConfiguration() need some parameter so raise an error.
ptz_service = mycam.create_ptz_service()
mycam.ptz.GetConfiguration()
must be
ptz_service = mycam.create_ptz_service()
ptz_service.GetConfigurations()