Re: HikVision PTZ control
Posted: Sat May 27, 2017 9:36 am
You can get the width and height as follows:
Tried it on mine and it looks to work okay. It also appears that for the Relative command they have switched X and Y which confused me at first.
Handy tip:
Every time you make a change to the PTZ script you have to search for the zmcontrol process and kill it before ZoneMinder will use your new script. This is a real pain but there is an easy way around it. What you do is enable one of the control functions that you haven't implemented. For example I have enabled the "Can Wake" button. When I make changes to the PTZ script I press the "Wake" button and the script exits because it isn't implemented. Then when I press one of the other buttons (left, right etc) the new script is loaded.
Code: Select all
$xResolution = $self->{Monitor}{Width};
$yResolution = $self->{Monitor}{Height};
Handy tip:
Every time you make a change to the PTZ script you have to search for the zmcontrol process and kill it before ZoneMinder will use your new script. This is a real pain but there is an easy way around it. What you do is enable one of the control functions that you haven't implemented. For example I have enabled the "Can Wake" button. When I make changes to the PTZ script I press the "Wake" button and the script exits because it isn't implemented. Then when I press one of the other buttons (left, right etc) the new script is loaded.