python-onvif-zeep icon indicating copy to clipboard operation
python-onvif-zeep copied to clipboard

Cannot run events.py - no element 'PullMessages'

Open xultz opened this issue 4 years ago • 1 comments

Hi, I'm starting with onvif, so I'm trying to run the examples to control a PTZ camera. I am able to run the continuous_move.py example, but when I try to run the events.py code, I get the error:

raise exceptions.LookupError( zeep.exceptions.LookupError: No element 'PullMessages' in namespace http://docs.oasis-open.org/wsrf/rw-2. Available elements are: -

Am I missing something?

What I need to do is to move the camera to a preset, and know somehow when the camera finished moving to that position, is it possible in any way using the onvif protocol?

Thank you for any help!

xultz avatar May 25 '21 19:05 xultz

https://github.com/yingchengpa/python-onvif2-zeep/

support hecv and repair the event bug .

-------------------------------demo ---------------------------------- self.events_service = self.mycam.create_events_service() print(self.events_service.GetEventProperties()) pullpoint = self.mycam.create_pullpoint_service()

    try:
       pullmess = pullpoint.PullMessages({"Timeout": datetime.timedelta(seconds=5), "MessageLimit": 10})
       print(pullmess.CurrentTime)
       print(pullmess.TerminationTime)
       for msg in pullmess.NotificationMessage:
         print(msg)
       except Exception as e:
          print(e)
       finally:
          pass

--------------------------------TopicExpressionType parse error ---------------- Message is ##any ,you should modify b-2.xsd ##any to tt::Message

yingchengpa avatar Jul 29 '21 09:07 yingchengpa