.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ZoneMinder::Control::Dahua 3pm" .TH ZoneMinder::Control::Dahua 3pm 2024-03-12 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ZoneMinder::Control::Dahua \- Perl module for Dahua cameras .SH SYNOPSIS .IX Header "SYNOPSIS" use ZoneMinder::Control::Dahua; place this in /usr/share/perl5/ZoneMinder/Control .SH DESCRIPTION .IX Header "DESCRIPTION" This module is an implementation of the Dahua IP camera HTTP control API. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2018 ZoneMinder LLC .PP This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA. .SH "Private Methods" .IX Header "Private Methods" .Vb 1 \& Methods intended for use internally but documented here for future developers. .Ve .ie n .SS "_sendAbsolutePositionCommand( $arg1, $arg2, $arg3, $arg4 )" .el .SS "_sendAbsolutePositionCommand( \f(CW$arg1\fP, \f(CW$arg2\fP, \f(CW$arg3\fP, \f(CW$arg4\fP )" .IX Subsection "_sendAbsolutePositionCommand( $arg1, $arg2, $arg3, $arg4 )" .Vb 1 \& Where: \& \& $arg1 = Horizontal angle 0° to 360° \& $arg2 = Vertical angle 0° to \-90° \& $arg3 = Zoom multiplier \& $arg4 = Speed 1 to 8 \& \& This is an private method used to send an absolute position command to the \& camera. .Ve .SH "Public Methods" .IX Header "Public Methods" .Vb 1 \& Methods made available to control.pl via ZoneMinder::Control .Ve .SS Notes: .IX Subsection "Notes:" .Vb 5 \& Which methods are invoked depends on which types of movement are selected in \& the camera control type. For example: if the \*(AqCan Move Continuous\*(Aq option is \& checked, then methods including \*(AqCon\*(Aq in their names are invoked. Likewise if \& the \*(AqCan Move Relative" option is checked, then methods including \*(AqRel\*(Aq in \& their names are invoked. \& \& \& At present, these types of movement are prioritized and exclusive. This applies \& to all types of movement, not just PTZ, but focus, iris, etc. as well. The options \& are tested in the following order: \& \& 1. Continuous \& \& 2. Relative \& \& 3. Absolute \& \& These types are exclusive meaning that the first one that matches is the one \& ZoneMinder will use to control with. It would be nice to allow the user to \& select the type used given that some cameras support all three types of \& movement. .Ve .SS new .IX Subsection "new" .Vb 2 \& This method instantiates a new control object based upon this control module \& and sets the \*(Aqid\*(Aq attribute to the value passed in. .Ve .SS open .IX Subsection "open" .Vb 2 \& This method opens an HTTP connection to the camera. It handles authentication, \& etc. Upon success it sets the \*(Aqstate\*(Aq attribute to \*(Aqopen.\*(Aq .Ve .SS close .IX Subsection "close" .Vb 2 \& This method effectively closes the HTTP connection to the camera. It sets the \& \*(Aqstate\*(Aq attribute to \*(Aqclose.\*(Aq .Ve .SS printMsg .IX Subsection "printMsg" .Vb 1 \& This method appears to be used for debugging. .Ve .SS moveCon .IX Subsection "moveCon" .Vb 4 \& This set of methods invoke continuous movement in the direction indicated by \& the portion of their name. They accept no arguments and move the \& camera at a speed of 1 for 0ms. The speed index of 1 is the lowest of the \& accepted range of 1\-8. \& \& NOTE: \& \& This is not true continuous movmement as currently implemented. .Ve .SS focusCon .IX Subsection "focusCon" .Vb 2 \& This set of methods invoke continuous focus in the range direction indicated \& by the portion of their name. They accept no arguments. \& \& NOTE: \& \& This is not true continuous movmement as currently implemented. .Ve .SS moveRel .IX Subsection "moveRel" .Vb 4 \& This set of methods invoke relatvie movement in the direction indicated by \& the portion of their name. They accept no arguments and move the \& camera at a speed of 4 for 500ms. The speed index of 4 is half\-way between \& the accepted range of 1\-8. .Ve .SS focusRel .IX Subsection "focusRel" .Vb 2 \& This set of methods invoke realtive focus in the range direction indicated by \& the portion of their name. They accept no arguments. \& \& NOTE: \& \& This only just does work. The Dahua API specifies "multiples" as the input. \& We pass in a 1 for that as it does not seem to matter what number (0\-8) is \& provided, the camera focus behaves the same. .Ve .SS irisRel .IX Subsection "irisRel" .Vb 2 \& This set of methods invoke realtive iris size in the direction indicated by \& the portion of their name. They accept no arguments. \& \& NOTE: \& \& This only just does work. The Dahua API specifies "multiples" as the input. \& We pass in a 1 for that as it does not seem to matter what number (0\-8) is \& provided, the camera iris behaves the same. .Ve .SS moveStop .IX Subsection "moveStop" .Vb 3 \& This method attempts to stop the camera. The problem is that if continuous \& motion is occurring in multiple directions, this will only stop the motion \& in the \*(AqUp\*(Aq direction. Dahua does not support an "all\-stop" command. .Ve .SS presetHome .IX Subsection "presetHome" .Vb 3 \& This method "homes" the camera to a preset position. It accepts no arguments. \& When either continuous or relative movement is enabled, pressing the center \& button on the movement controls invokes this method. \& \& NOTE: \& \& The Dahua protocol does not appear to support a preset Home feature. We could \& allow the user to assign a preset slot as the "home" slot. Dahua does appear \& to support naming presets which may lend itself to this sort of thing. At \& this point, we\*(Aqll just send the camera back to center and zoom wide. (0°,0°,0) .Ve .SS reset .IX Subsection "reset" .Vb 2 \& This method will reset the PTZ controls to their "default." It is not clear \& what that is. .Ve .SS reboot .IX Subsection "reboot" .Vb 2 \& This method performs a reboot of the camera. This will take the camera offline \& for the time it takes to reboot. .Ve