Implement reboot and ping methods for Trendnet PTZ Control

This commit is contained in:
Isaac Connor 2022-02-02 14:34:53 -05:00
parent 1c1630e5b4
commit 48fc99a0e3
1 changed files with 19 additions and 0 deletions

View File

@ -374,6 +374,25 @@ sub reset {
$self->sendCmdPost($url,$cmd);
}
sub reboot {
my $self = shift;
Debug('Camera Reboot');
$self->sendCmdPost('/eng/admin/reboot.cgi', { reboot => 'true' });
#$referer = 'http://'.$HI->ip().'/eng/admin/tools_default.cgi';
#$initial_url = $HI->ip().'/eng/admin/tools_default.cgi';
}
sub ping {
return -1 if ! $ADDRESS;
require Net::Ping;
my $p = Net::Ping->new();
my $rv = $p->ping($ADDRESS);
$p->close();
return $rv;
}
1;
__END__