SV3C camera support

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
smp
Posts: 9
Joined: Wed Jun 19, 2024 7:51 pm

SV3C camera support

Post by smp »

Hi all,

My first time here. Purchased an SV3C SD7POE-8MP-Hx camera, been working a few days to get it working.
It uses onvif protocol, but neither Netcat nor onvif devices worked for me. Copied Netcat.pm to Sv3c.pm and did modifications.
I can now do pan/tilt, zoom and iris/brightness.

BE SURE TO READ THE WARNING BLOCK NEAR HEAD OF MODULE!

I found several tools that helped alot:

https://github.com/sr99622/libonvif/

Code: Select all

$ onvif-util -a
Looking for cameras on the network...
Found 3 cameras
10.11.12.83 IPCAM(IPCAM)
10.11.12.83 IPCAM(IPCAM)
10.11.12.83 IPCAM(IPCAM)

$ onvif-util -u admin -p admin
  found host: 10.11.12.83
  successfully connected to host
    name:   IPCAM
    serial: 00B947B9073E
get profiles
  Token 0: MainStreamProfileToken
  Token 1: SecondStreamProfileToken

get capabilities
  event_service:   POST /onvif/event_service HTTP/1.1

  imaging_service: POST /onvif/image_service HTTP/1.1

  media_service:   POST /onvif/image_service HTTP/1.1

  ptz_service:     POST /onvif/image_service HTTP/1.1

The dump command provides about everything inside the device, too long to display here.

https://github.com/GuilhermeC18/node-onvif

Has a whole bunch of Node based modules for probing an onvif camera. I started with the included server.js and added the GetNodes module:

Code: Select all

$ node xxx.js
Listening on port 8880
HTTP : 200 OK : /
HTTP : 200 OK : /style.css
HTTP : 200 OK : /onvif.js
{
  "GetNodeResponse": {
    "PTZNode": {
      "$": {
        "token": "PTZ-GPIO-Token",
        "FixedHomePosition": "false"
      },
      "Name": "PTZ-GPIO",
      "SupportedPTZSpaces": {
        "AbsolutePanTiltPositionSpace": {
          "URI": "http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace",
          "XRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          },
          "YRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          }
        },
        "AbsoluteZoomPositionSpace": {
          "URI": "http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace",
          "XRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          }
        },
        "RelativePanTiltTranslationSpace": {
          "URI": "http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace",
          "XRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          },
          "YRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          }
        },
        "RelativeZoomTranslationSpace": {
          "URI": "http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace",
          "XRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          }
        },
        "ContinuousPanTiltVelocitySpace": {
          "URI": "http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace",
          "XRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          },
          "YRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          }
        },
        "ContinuousZoomVelocitySpace": {
          "URI": "http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace",
          "XRange": {
            "Min": "-1.000000",
            "Max": "1.000000"
          }
        },
        "PanTiltSpeedSpace": {
          "URI": "http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace",
          "XRange": {
            "Min": "0.000000",
            "Max": "1.000000"
          }
        },
        "ZoomSpeedSpace": {
          "URI": "http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace",
          "XRange": {
            "Min": "0.000000",
            "Max": "1.000000"
          }
        }
      },
      "MaximumNumberOfPresets": "32",
      "HomeSupported": "false",
      "Extension": {
        "SupportedPresetTour": {
          "MaximumNumberOfPresetTours": "0",
          "PTZPresetTourOperation": [
            "Start",
            "Stop",
            "Pause",
            "Start"
          ]
        }
      }
    }
  }
}
Got a lot of the info I needed to get PTZ working from it.

I've attached Sv3c.pm as Sv3c.txt, .pm wasn't a valid file type...
The -20240624 version has working code for iris control, as well as documentation for installing/using several onvif tools.
Attachments
Sv3c-20240624.txt
(42.22 KiB) Downloaded 13 times
Post Reply