BreeeZe / rpos

Raspberry Pi Onvif Server
http://breeeze.github.io/rpos
MIT License
643 stars 146 forks source link

Simple ONVIF server written in Python3 #152

Closed nanosonde closed 11 months ago

nanosonde commented 1 year ago

Hi there!

Just wanted to mention that I have written some simple ONIF server in Python3 that does not use any of those SOAP WSDL files to generate stubs and so on. So there is no equivalent to node-soap or gSOAP that is used.

it also implements ONVIF SOAP PullPoint subscriptions to handle simple events.

Please find it here: https://github.com/nanosonde/sip2rtsp/tree/main/pyonvifsrv

The original idea came from this node ONVIF mockup server: https://github.com/agsh/onvif/tree/master/test

RogerHardiman commented 1 year ago

Hi I've had a look at the project. I've worked on two big ONVIF servers over the years. The RPOS project generates the XML from the WSDL schema (using node-soap) and the advantage is that when you start to do more complicated things, like implementing the APIs to CreateProfiles or Change Profiles, or get lists of Codecs and Resolutions, you can update arrays and lists and generate valid XML at run time.

But another project I work on (written in C#) uses exactly the same method you have, with lots of XML as hard coded text and careful replacing of strings within the XML text. I like this method (the same as your Python project) because you can see the XML in front of your eyes. It just becomes a little harder when you have to start generating XML within 'while loops' eg when you want to take a list of valid Resolutions and update the XML. But it is still possible.

Good luck with your project.