Page 1 of 1

SV3C C22 PTZ Presets help.

Posted: Thu Jul 20, 2023 5:12 pm
by vanillawaferx
Hello long time user, first post.

I recently started putting together an expansion on my ZoneMinder setup. Part of that is a SV3C C22 https://www.sv3c.com/SV3C-PTZ-Security- ... 28875.html
I haven't been able to find much information on it. Honestly feels like I'm the only person who owns one.

I already got it setup as a monitor in ZM. The PTZ control sort of works with the Netcat ONVIF control type as others with SV3C ptz camera have used. The only thing that doesn't work is the Home and Presets, which I would like to try to get working. I do know the presets function on the camera side using its built in web portal. So the past couple of days I dug through the Netcat.pm script and tried multiple things. But I'm starting to reach the end of my knowledge and googlefoo. I know nothing about perl but have been learning a bit with my research into this.

One thing I haven't been able to figure out is these 400 responses the camera sends. Comes up on every command besides the Home command. Even the directional commands return this but those do work and move the camera. :?:

Code: Select all

07/20/23 09:46:35.205753 zmcontrol_6[2673].ERR [ZoneMinder::Control::Netcat:163] [After sending PTZ command, camera returned the following error:'400 Bad Request'
MSG:<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
  <Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <UsernameToken xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <Username>MYUSER</Username>
      <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">75hjjsyufehuisfhjk32f8shjk3=</Password>
      <Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"></Nonce>
      <Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-07-20T16:46:35Z</Created>
    </UsernameToken>
  </Security>
</s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Stop xmlns="http://www.onvif.org/ver20/ptz/wsdl"><ProfileToken>MainStream</ProfileToken><PanTilt>true</PanTilt><Zoom>false</Zoom></Stop></s:Body></s:Envelope>
Response:<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:e="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:ter="http://www.onvif.org/ver10/error"  xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema" ><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value>ter:ActionNotSupported</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en">Action Not Implemented</s:Text></s:Reason></s:Fault></s:Body></s:Envelope>]
So does anyone have any information on the SV3C ptz preset commands? Or can anyone point me in the direction on how to find out the commands?

Re: SV3C C22 PTZ Presets help.

Posted: Mon Jun 24, 2024 2:32 pm
by smp
Cribbed from my Sv3c.pm module:

==========================================================================
How to obtain onvif conformant info for SV3C cameras:
go to: https://www.onvif.org/conformant-products/
Product Search > Manufacturer > SV3C Technology Limited
scroll down to camera of interest
click down arrow on right side of entry
click FeatureList for an XML file of features
click DoC for a declaration of comformance document
click Interface Guide for a basic setup/use document

==========================================================================
Useful tools for development:

###
https://github.com/sr99622/libonvif/
$ sudo apt install libonvif1 libonvif-dev onvif-tools
$ onvif-util -a
Looking for cameras on the network...
Found 3 cameras
10.0.100.1 IPCAM(IPCAM)
10.0.100.1 IPCAM(IPCAM)
10.0.100.1 IPCAM(IPCAM)
(no idea why it finds 3...)
#
$ onvif-util -u admin -p admin 10.0.100.1
found host: 10.0.100.1
successfully connected to host
name: IPCAM
serial: 00B947B9073E

get profiles
Token 0: MainStreamProfileToken
Token 1: SecondStreamProfileToken

dump
[subset of results:]
Profiles.PTZConfiguration.NodeToken=PTZ-GPIO-Token
Profiles.PTZConfiguration.PanTiltLimits.Range.URI=http://www.onvif.org/ver10/tptz/PanTilt ... nericSpace
Profiles.PTZConfiguration.PanTiltLimits.Range.XRange.Min=-1.0
Profiles.PTZConfiguration.PanTiltLimits.Range.XRange.Max=1.0
Profiles.PTZConfiguration.PanTiltLimits.Range.YRange.Min=-1.0
Profiles.PTZConfiguration.PanTiltLimits.Range.YRange.Max=1.0
Profiles.PTZConfiguration.ZoomLimits.Range.URI=http://www.onvif.org/ver10/tptz/ZoomSpa ... nericSpace
Profiles.PTZConfiguration.ZoomLimits.Range.XRange.Min=-1.0
Profiles.PTZConfiguration.ZoomLimits.Range.XRange.Max=1.0
[GetStreamUriResponse]
MediaUri.Uri=rtsp://10.0.100.1:554/11

###
https://github.com/GuilhermeC18/node-onvif/
$ sudo apt install npm
$ sudo npm install -s node-onvif
$ sudo npm install websocket

Sample application, server.js:
https://github.com/GuilhermeC18/node-on ... er/sample/

I modified server.js by copying to xxx.js and adding a function:
function foo(device) {
let params = {
'NodeToken':'PTZ-GPIO-Token'
};

device.services.ptz.getNode(params).then((result) => {
console.log(JSON.stringify(result['data'], null, ' '));
}).catch((error) => {
console.error(error);
});
}

then sticking a call to foo() in ptzMove(). Crude but effective
the result is:

$ node xxx.js
Listening on port 8880
HTTP : 200 OK : /
HTTP : 200 OK : /onvif.js
HTTP : 200 OK : /style.css
{
"GetNodeResponse": {
"PTZNode": {
"$": {
"token": "PTZ-GPIO-Token",
"FixedHomePosition": "false"
},
"Name": "PTZ-GPIO",
"SupportedPTZSpaces": {
...
},
"MaximumNumberOfPresets": "32",
"HomeSupported": "false",
"Extension": {
"SupportedPresetTour": {
"MaximumNumberOfPresetTours": "0",
"PTZPresetTourOperation": [
"Start",
"Stop",
"Pause",
"Start"
]
}
...