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
444 stars 145 forks source link

access SD card data on IP camera with ONVIF on python #116

Open tib-sim opened 1 year ago

tib-sim commented 1 year ago

I am trying to access the SD card of my IP camera in a remote way.

The set of functions available is here https://www.onvif.org/onvif/ver20/util/operationIndex.html.

I can easily use the ones under DeviceMgmt by calling mycam.devicemgmt or the ones under PTZ by calling first ptz=mycam.create_ptz_service() and then mycam.ptz. I am not so sure about this difference by the way.

However if I tried to do the same with Recording (with I guess the functions allowing to get SD card data), but it does not work.

I ran mycam.devicemgmt.GetCapabilities() and can see that PTZ and Recording are not "organized" in the same way (see below) because in the structure PTZ is "acessible" directly while recording is under something called Extension with a set of different "functions" like DeviceIO.

How can I use the the Recording functions, what should be the python syntax?


    'PTZ': {
        'XAddr': 'http://XXX.XXX.XXX.XXX/onvif/PTZ',
        '_value_1': None,
        '_attr_1': None
    },
    'Extension': {
        '_value_1': [
            <Element {http://www.onvif.org/ver10/schema}DeviceIO at 0x2722de89f00>,
            <Element {http://www.onvif.org/ver10/schema}Recording at 0x2722de89ec0>,
            <Element {http://www.onvif.org/ver10/schema}Search at 0x2722de89e40>,
            <Element {http://www.onvif.org/ver10/schema}Replay at 0x2722de89f40>
        ]
}```
smsver2 commented 4 months ago

@tib-sim Have you found any answer to the question, I'm facing the same problem and tryig to get access to the sd card footages but facing so many problem, thanks in advance.

tib-sim commented 4 months ago

I am sorry we did not resolve this issue. We ended up using a software called motioneye https://github.com/motioneye-project/motioneye/wiki.