Hello everyone!
is the first time I write in this forum and I hope to be in the right section!
I bought an Onvif Cam and I'm trying to implement the PTZ for this camera not being supported by default.
The code is this:
It works perfectly when I try to recall a preset but does not work when I try to use the Left Right Up Down commands! I am desperate!
I noticed that the program when it reads the "?" in the code he breaks it by making this request:
But this is what I get instead intercepting with Wireshark the command made by Browser! The first line is broken!
I also tried to replace the "?" with its HTML code but I always get the same result...
Can someone help me? I am going crazy!
is the first time I write in this forum and I hope to be in the right section!
I bought an Onvif Cam and I'm trying to implement the PTZ for this camera not being supported by default.
The code is this:
HTML:
<Camera id="256">
<Makes>
<Make Name="HD" Model="IPC" />
</Makes>
<CommandURL>/PSIA/YG/PTZCtrl/channels/0/</CommandURL>
<Method>PUT</Method>
<Commands>
<Center></Center>
<Left>continuous?pan=1&tilt=0</Left>
<Right>continuous?pan=-1&tilt=0</Right>
<Up>continuous?pan=0&tilt=1</Up>
<Down>continuous?pan=0&tilt=-1</Down>
<Stop>continuous?pan=0&tilt=0</Stop>
<ZoomIn></ZoomIn>
<ZoomOut></ZoomOut>
</Commands>
<ExtendedCommands>
<Command Name="Go Preset 1">presets/1/goto</Command>
<Command Name="Go Preset 2">presets/2/goto</Command>
<Command Name="Go Preset 3">presets/3/goto</Command>
<Command Name="Go Preset 4">presets/4/goto</Command>
<Command Name="Go Preset 5">presets/5/goto</Command>
<Command Name="Go Preset 6">presets/6/goto</Command>
<Command Name="Go Preset 7">presets/7/goto</Command>
<Command Name="Go Preset 7">presets/8/goto</Command>
</ExtendedCommands>
</Camera>
I noticed that the program when it reads the "?" in the code he breaks it by making this request:
HTML:
PUT /PSIA/YG/PTZCtrl/channels/0/continuous HTTP/1.0
User-Agent: Mozilla/5.0
Authorization: Basic YWRtaW46MTIzNDU2
Content-Type: application/x-www-form-urlencoded
Host: 192.168.1.21
Content-Length: 13
Connection: Keep-Alive
pan=-1&tilt=0
HTML:
PUT /PSIA/YG/PTZCtrl/channels/0/continuous?pan=1&tilt=0 HTTP/1.1
Host: 192.168.1.21
Connection: keep-alive
Content-Length: 0
Cache-Control: max-age=0
Accept: */*
Origin: http://192.168.1.21
X-Requested-With: XMLHttpRequest
If-Modified-Since: 0
Save-Data: on
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Referer: http://192.168.1.21/doc/page/preview.html?version=0.0.0.1708161600
Accept-Encoding: gzip, deflate
Accept-Language: it,en;q=0.9
Cookie: PackSize=2; updateTips=true; language=en; cur_UserInfo=admin%3A123456; cur_userName=admin; isDisabledSaveBtn=false; plugin=flv
Can someone help me? I am going crazy!