diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/Netcat.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/Netcat.pm
index 4f6bca07c..ab7bc03ec 100644
--- a/scripts/ZoneMinder/lib/ZoneMinder/Control/Netcat.pm
+++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/Netcat.pm
@@ -133,6 +133,7 @@ sub sendCmd {
my $result = undef;
$self->printMsg($cmd, 'Tx');
+ $self->printMsg($msg, 'Tx');
my $server_endpoint = 'http://'.$address.':'.$port.'/'.$cmd;
my $req = HTTP::Request->new(POST => $server_endpoint);
@@ -147,6 +148,7 @@ sub sendCmd {
if ( $res->is_success ) {
$result = !undef;
+Debug("Result: " . $res->content());
} else {
Error("After sending PTZ command, camera returned the following error:'".$res->status_line()."'\nMSG:$msg\nResponse:".$res->content);
}
@@ -208,12 +210,56 @@ sub reset {
$self->sendCmd($cmd, $msg, $content_type);
}
+sub moveMap {
+ my $self = shift;
+ my $params = shift;
+ my $x = $self->getParam($params,'xcoord');
+ my $y = $self->getParam($params,'ycoord');
+ Debug("Move map to $x x $y");
+
+ my $cmd = 'onvif/PTZ';
+ my $msg ='' . ((%identity) ? authentificationHeader($identity{username}, $identity{password}) : '') . '
+
+ ' . $profileToken . '
+
+
+ ';
+ my $content_type = 'application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver20/ptz/wsdl/ContinuousMove"';
+ $self->sendCmd($cmd, $msg, $content_type);
+}
+
+sub moveRel {
+ my $self = shift;
+ my $params = shift;
+ my $x = $self->getParam($params,'xcoord');
+ my $speed = $self->getParam($params,'speed');
+ my $y = $self->getParam($params,'ycoord');
+ Debug("Move rel to $x x $y");
+
+ my $cmd = 'onvif/PTZ';
+ my $msg ='' . ((%identity) ? authentificationHeader($identity{username}, $identity{password}) : '') . '
+
+ ' . $profileToken . '
+
+
+
+
+
+ ';
+ my $content_type = 'application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver20/ptz/wsdl/ContinuousMove"';
+ $self->sendCmd($cmd, $msg, $content_type);
+}
+
#Up Arrow
sub moveConUp {
Debug('Move Up');
my $self = shift;
my $cmd = 'onvif/PTZ';
- my $msg ='' . ((%identity) ? authentificationHeader($identity{username}, $identity{password}) : '') . '' . $profileToken . '';
+ my $msg ='' . ((%identity) ? authentificationHeader($identity{username}, $identity{password}) : '') . '
+
+ ' . $profileToken . '
+
+ ';
my $content_type = 'application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver20/ptz/wsdl/ContinuousMove"';
$self->sendCmd($cmd, $msg, $content_type);
$self->autoStop($self->{Monitor}->{AutoStopTimeout});