How to PTZ over ONVIF for ASH21-W-V2

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
Post Reply
charmonium
Posts: 3
Joined: Thu Oct 05, 2023 5:52 pm

How to PTZ over ONVIF for ASH21-W-V2

Post by charmonium »

I am trying to write an ONVIF application that targets my ASH21-W-V2. I can connect to the ONVIF endpoint on the ASH21-W-V2, but that endpoint does not supply any pan/tilt/zoom service.

Code: Select all

curl \
  -X POST \
  10.0.0.95/onvif/device_service \
  -d $'<?xml version=\'1.0\' encoding=\'utf-8\'?>
    <soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope">
        <soap-env:Header>
            <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                <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">.../wsse:Password>
                    <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">...</wsse:Nonce>
                    <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-10-06T20:31:30+00:00</wsu:Created>
                </wsse:UsernameToken>
            </wsse:Security>
        </soap-env:Header>
        <soap-env:Body>
            <ns0:GetCapabilities xmlns:ns0="http://www.onvif.org/ver10/device/wsdl">
                <ns0:Category>All</ns0:Category>
            </ns0:GetCapabilities>
        </soap-env:Body>
    </soap-env:Envelope>'

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://www.onvif.org/ver10/device/wsdl">
    <s:Body>
        <tds:GetCapabilitiesResponse>
            <tds:Capabilities>
                <tt:Device>
                    <tt:XAddr>http://10.0.0.95/onvif/device_service</tt:XAddr>
                    <tt:Network>
                        ...
                    </tt:Network>
                    <tt:System>
                        ...
                    </tt:System>
                    <tt:IO>
                        ...
                    </tt:IO>
                    <tt:Security>
                        ...
                    </tt:Security>
                </tt:Device>
                <tt:Events>
                    <tt:XAddr>http://10.0.0.95/onvif/event_service</tt:XAddr>
                        ...
                </tt:Events>
                <tt:Imaging>
                    <tt:XAddr>http://10.0.0.95/onvif/imaging_service</tt:XAddr>
                </tt:Imaging>
                <tt:Media>
                    <tt:XAddr>http://10.0.0.95/onvif/media_service</tt:XAddr>
                    ...
                </tt:Media>
                <tt:Extension>
                    <tt:DeviceIO>
                        <tt:XAddr>http://10.0.0.95/onvif/deviceIO_service</tt:XAddr>
                        ...
                    </tt:DeviceIO>
                </tt:Extension>
            </tds:Capabilities>
        </tds:GetCapabilitiesResponse>
    </s:Body>
</s:Envelope>
I understand this response should have a tt:PTZCapabilities element with a tt:XAddr, so that I can control PTZ over the ONVIF API. However, PTZ works in the Amcrest SmartHome app, and it is advertised to work in BlueIris. So how does the Amcrest SmartHome and BlueIris control PTZ if not by ONVIF?
Post Reply