FalkTannhaeuser / python-onvif-zeep

ONVIF Client Implementation in Python 2+3 (using https://github.com/mvantellingen/python-zeep instead of suds as SOAP client)
MIT License
424 stars 138 forks source link

README.rst sample codes problems #54

Open jmowlaei opened 4 years ago

jmowlaei commented 4 years ago

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()