HikVision PTZ control

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.
bobylapointe69300
Posts: 10
Joined: Wed Feb 14, 2018 6:51 pm

Re: HikVision PTZ control

Post by bobylapointe69300 »

Thanks for the update. In fact the reply from seller is helping, at least to understand that this camera is not using HIKVISION protocol, but Pelco-D instead. I suspect you are able to use PTZ commands in iVMS-4200 probably because it uses ONVIF (Pelco-D commands get translated via onvif...). Not 100% sure about that, because I thought iVMS-4200 was not accepting 3rd party cameras... iVMS-5200 does.

Codes given by the seller (in the {}) are command strings used by Pelco-D protocol (https://www.commfront.com/pages/pelco-d ... tutorial#3). You find them in Pelco-D for each command (group of figures starting with 0x..).

So your protocol being known as Pelco-D, you should use the Pelco-D protocol present in ZM control. To be honest I have not configured any Pelco-D cameras with this protocol, so I might not help you a lot, but as this is a standard Pelco-D protocol, you should just have to make sure you fill fields in correctly in ZM control. Make sure also at each change you restart ZM.

You may want to continue discussion on a dedicated post as it does not concern anymore HIKVISION protocol.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: HikVision PTZ control

Post by pat2 »

bobylapointe69300 wrote: Tue Mar 20, 2018 2:56 pm Thanks for the update. In fact the reply from seller is helping, at least to understand that this camera is not using HIKVISION protocol, but Pelco-D instead. I suspect you are able to use PTZ commands in iVMS-4200 probably because it uses ONVIF (Pelco-D commands get translated via onvif...). Not 100% sure about that, because I thought iVMS-4200 was not accepting 3rd party cameras... iVMS-5200 does.

Codes given by the seller (in the {}) are command strings used by Pelco-D protocol (https://www.commfront.com/pages/pelco-d ... tutorial#3). You find them in Pelco-D for each command (group of figures starting with 0x..).

So your protocol being known as Pelco-D, you should use the Pelco-D protocol present in ZM control. To be honest I have not configured any Pelco-D cameras with this protocol, so I might not help you a lot, but as this is a standard Pelco-D protocol, you should just have to make sure you fill fields in correctly in ZM control. Make sure also at each change you restart ZM.

You may want to continue discussion on a dedicated post as it does not concern anymore HIKVISION protocol.
uhmmm, interesting comment.

So, you think that camera is not using HIKvision protocol. And they are claiming the HIKvision compatibility on Amazon (and in fact there is compatibility with HIKvision since i'm able to see stream and send PTZ commands with iVMS4200 client) because there is a "Pelco-D to HIKvision" protocol translation via onvif (they claimed too the camera is ONVIF compatible). And it is coherent with the fact i'm not able to reach the standard HIKvision url:

http://<your camera>/ISAPI/System/deviceInfo

So, the protocol to be used is Pelco-D or ONVIF.
Ok, i will try with them and i will move to the proper thread in the forum.
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
tomcat84
Posts: 39
Joined: Fri Jul 03, 2020 11:24 pm

Re: HikVision PTZ control

Post by tomcat84 »

I just tryed to get the DS-2DE3A404IW-DE/W working.
Configured are the following settings:
Image
But its not working and the logs are spammed with:

Code: Select all

2020-08-26 04:40:02	zmcontrol_7		16709	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:39:22	zmcontrol_7		16622	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:39:02	zmcontrol_7		16556	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:38:52	zmcontrol_7		16460	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:38:46	zmcontrol_7		16379	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:38:45	zmcontrol_7		16365	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
Any suggestions?
With Blueiris ptz is working so it cant be the camera...

[Edit] got it working.
Only Zoom is not working hm..
JasonBorn
Posts: 37
Joined: Fri Jan 08, 2021 5:31 pm

Re: HikVision PTZ control

Post by JasonBorn »

@tomcat84

with special help from Paranoid zoom is now working on my system.
Can you send your zoom settings? Maybe i can help you
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: HikVision PTZ control

Post by Paranoid »

tomcat84 wrote: Wed Aug 26, 2020 2:43 am I just tryed to get the DS-2DE3A404IW-DE/W working.
Configured are the following settings:
Image
But its not working and the logs are spammed with:

Code: Select all

2020-08-26 04:40:02	zmcontrol_7		16709	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:39:22	zmcontrol_7		16622	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:39:02	zmcontrol_7		16556	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:38:52	zmcontrol_7		16460	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:38:46	zmcontrol_7		16379	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
2020-08-26 04:38:45	zmcontrol_7		16365	FAT	No protocol is set in monitor. Please edit the monitor, edit control type, select the control capability and fill in the Protocol field	zmcontrol.pl	
Any suggestions?
With Blueiris ptz is working so it cant be the camera...

[Edit] got it working.
Only Zoom is not working hm..
Go to the screen you show in your post and click "edit" next to the "Control Type".
Scroll down and select HikVision.
In the "main" tab set Protocol to HikVision.
In the "Zoom" tab unset "Can Zoom Relative" and "Can Zoom Absolute". Set "Can Zoom Continuous" and "Has Zoom Speed". Set min speed to 1 and max to 100.
tomcat84
Posts: 39
Joined: Fri Jul 03, 2020 11:24 pm

Re: HikVision PTZ control

Post by tomcat84 »

JasonBorn wrote: Thu Jan 14, 2021 8:34 am @tomcat84

with special help from Paranoid zoom is now working on my system.
Can you send your zoom settings? Maybe i can help you
You are right. Zoom was not working. I didnt even try to use it :lol:
After I changed as suggested from Paranoid its working now.
TY guys :mrgreen:
jperkins
Posts: 50
Joined: Sat Jan 23, 2021 11:08 am

Re: HikVision PTZ control

Post by jperkins »

JasonBorn wrote: Thu Jan 14, 2021 8:34 am with special help from Paranoid zoom is now working on my system.
Thanks so much. I got zoom working on my Anpiz PTZIP204WX4IR Hikvision (OEM DS-2DE2A404IW-DE3).

However I was getting an error when I attempted to 'stop zoom ' . and I believe this error would cause other things to reset

Code: Select all

ERR [Can't access name:zoomStop AUTOLOAD:ZoneMinder::Control::HikVision::zoomStop member of object of class ZoneMinder::Control::HikVision from main:186]
I (probably incorrectly ) fixed the issue by editing /usr/share/perl5/ZoneMinder/Control/HikVision.pm

I went to line 187 and copied the line 'sub moveStop ..." as 'sub zoomStop ...'

Code: Select all

jperkins@zoneminder:/usr/share/perl5/ZoneMinder/Control$ diff HikVision.pm HikVision.pm.bak 
188d187
< sub zoomStop         { $_[0]->moveVector(  0,  0, 0, splice(@_,1)); }
I am willing to make a PR if it is wanted
tommyraton
Posts: 2
Joined: Sun Jan 24, 2021 12:42 am

Re: HikVision PTZ control

Post by tommyraton »

HikVision DS-2CD2743G1-IZS

(This is my 1st post on any forum so if there's formatting I should use, I apologize, and point me to how to be better)

I've got unstoppable focus and unstoppable zoom using the HikVision.pm on this ebay purchased camera HikVision DS-2CD2743G1-IZS

Working only on the unstoppable zoom.

Same error when attempting to stop zoom as jperkins


Can't access name:zoomStop AUTOLOAD:ZoneMinder::Control::HikVision::zoomStop member of object of class ZoneMinder::Control::HikVision from main:186

However the edit as jperkins described did not change the error message in my instance. When one edits the .pm file is that immediately in effect or does one have to stop and restart the zoneminder service to take effect?


Output from

http://<your camera/ISAPI/System/deviceInfo

Note that although the camera is as above a DS-2CD2743G1-IZS, from other error messages I had to use
IP Camera(E2451) for the device (NOT "IP CAMERA" NOT "IP Camera" but "IP Camera(E2451)"

And although I thought this device info implied port 88, had to use port 80 in the ControlAddress

<DeviceInfo xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0">
<deviceName>IP CAMERA</deviceName>
<deviceID>29c30000-6580-11b3-81a1-accb516269ca</deviceID>
<deviceDescription>IPCamera</deviceDescription>
<deviceLocation>hangzhou</deviceLocation>
<systemContact>Hikvision.China</systemContact>
<model>DS-2CD2743G1-IZS</model>
<serialNumber>DS-2CD2743G1-IZS20200417AAWRE24517626</serialNumber>
<macAddress>ac:cb:51:62:69:ca</macAddress>
<firmwareVersion>V5.6.4</firmwareVersion>
<firmwareReleasedDate>build 191224</firmwareReleasedDate>
<encoderVersion>V7.3</encoderVersion>
<encoderReleasedDate>build 190910</encoderReleasedDate>
<bootVersion>V1.3.4</bootVersion>
<bootReleasedDate>100316</bootReleasedDate>
<hardwareVersion>0x0</hardwareVersion>
<deviceType>IPCamera</deviceType>
<telecontrolID>88</telecontrolID>
<supportBeep>false</supportBeep>
<supportVideoLoss>false</supportVideoLoss>
<firmwareVersionInfo>B-R-G1-0</firmwareVersionInfo>
</DeviceInfo>
tommyraton
Posts: 2
Joined: Sun Jan 24, 2021 12:42 am

Re: HikVision PTZ control

Post by tommyraton »

Ignore my previous post.

Well I needed to start and stop the zoneminder service and now it works. Kinda kludgy to edit the HikVision.pm. Typical though. Beat on it until it gives up and works!
jperkins
Posts: 50
Joined: Sat Jan 23, 2021 11:08 am

Re: HikVision PTZ control

Post by jperkins »

created a pull request to allow the 'zoom' to stop 'zooming' EDIT. zoom stop pull merged into master on 2/18/2021. thanks

https://github.com/ZoneMinder/zoneminder/pull/3164
Post Reply