1

We are using Onvif PTZ commands from a long time for Hikvision IP cameras. Now, we just updated our Elixir codebase to make it work for the Hikvision camera and NVR. Onvif requests work to get/set/delete presets but not works for relative move and zoom.

Request URL: http://camera-ip:port/onvif/ptz_service

Request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis=200401-wss-wssecurity-utility-1.0.xsd">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">NorO/AS+oh6zN0a1fg3Z8hhheR4Q=</wsse:Password>
                <wsse:Nonce>K2DSp8TmwpMOw7lZw47Drc%Rw4nCoMKzeXfCuMjDtlgM</wsse:Nonce>
                <wsu:Created>2021-07-29T15:57:39Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tptz:RelativeMove xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl">
            <ProfileToken>ProfileToken002</ProfileToken>
            <Translation>
                <PanTilt x="0.04" y="0.0" xmlns="http://www.onvif.org/ver10/schema"/>
                <Zoom x="0.0"  xmlns="http://www.onvif.org/ver10/schema"/>
            </Translation>
        </tptz:RelativeMove>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xs="http://www.w3.org/2000/10/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
      <soap:Body>
            <soap:Fault>
                  <soap:Code>
                        <soap:Value>soap:Sender</soap:Value>
                        <soap:Subcode>
                              <soap:Value>ter:InvalidArgVal</soap:Value>
                        <soap:Subcode>
                        <soap:Value>ter:NoProfile</soap:Value>
                        </soap:Subcode>
                        </soap:Subcode>
                  </soap:Code>
                  <soap:Reason>
                        <soap:Text xml:lang="en">Argument Value Invalid</soap:Text>
                  </soap:Reason>
                  <soap:Node>http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver</soap:Node>
                  <soap:Role>http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver</soap:Role>
                  <soap:Detail>
                        <soap:Text>The requested profile token ProfileToken does not exist.</soap:Text>
                  </soap:Detail>
            </soap:Fault>
      </soap:Body>
</soap:Envelope>
azharmalik3
  • 553
  • 8
  • 21

0 Answers0