GithubHelp home page GithubHelp logo

onvif-client's Introduction

onvif-client

ONVIF client in Python using zeep

Hello! I pushed this file to github so people can sse an example of using zeep to send ONVIF commands to cameras.

I had to download and edit the wsdl files - had to add the wsdl:service section at the bottom. Since I'm using downloaded wsdl files also had to change the relative address at top of files for the schemaLocation.

I start by send a WS-Discovery probe to the camera to get the URI of the device service for the camera. Yes, I know it's always ip_addr/onvif/device_service, but I think it sounds cool to say I sent a probe :)

I send a GetServices request to camera see all the services it supports, and I get the URI of the media service.

I send a GetProfiles request and let user choose a profile, and then send GetStreamUri to get the video URI of the selected profile

I wrote with Python 3.8. Haven't tested on anything else.

Put the wsdl files in working directory (usually same directory as the python file)

Marshalling the wsdl files takes a bit of time, but they will be cached for an hour, so subsequent runs won't take very long/

I have no idea if people are able to leave comments, but if you can, please comment if you like it, and/or with any questions :) Or email me at [email protected]

onvif-client's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kovacspityu f5gkw

onvif-client's Issues

Fails Under Python 3.7 -- No Error Messages

I clone the project. Nothing happens using Python 3.7. I let it "process" for a minute or more and then finally hit Control-C:

 jlpoole@taurus /usr/local/src/onvif-client $ python3.7 onvifclient.py 
 ^CTraceback (most recent call last):
   File "onvifclient.py", line 104, in <module>
     run()
   File "onvifclient.py", line 41, in run
     data, addr = sock.recvfrom(65536) 
 KeyboardInterrupt
 jlpoole@taurus /usr/local/src/onvif-client $ eix -I zeep
 [I] dev-python/zeep
      Available versions:  3.4.0 {async -tornado PYTHON_TARGETS="python3_6 python3_7"}
      Installed versions:  3.4.0(07:38:36 PM 07/12/2020)(-async -tornado PYTHON_TARGETS="python3_7 -python3_6")
      Homepage:            http://docs.python-zeep.org/
     Description:         A modern/fast Python SOAP client based on lxml / requests

 jlpoole@taurus /usr/local/src/onvif-client $ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.