access SD card data on IP camera with ONVIF on python

195 Views Asked by At

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

I figure out that it may be possible to do that with ONVIF under python: https://github.com/quatanium/python-onvif

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 caleed 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>
        ]
}
0

There are 0 best solutions below