IPCamera-Reolink
view release on metacpan or search on metacpan
lib/IPCamera/Reolink.pm view on Meta::CPAN
package IPCamera::Reolink;
#ABSTRACT: HTTP(S)/REST interface to Reolink IP Cameras and NVRs per Reolink document "Camera HTTP API User Guide Version 8 2023-4"
use 5.006;
use strict;
use warnings;
use REST::Client;
use IO::Socket::SSL;
use JSON;
use Data::Dumper;
use Time::HiRes;
use String::Random;
# IPCamera::Reolink channel values.
use constant ChannelDefault => 0;
# IPCamera::Reolink::PtzCtrl() op value.
use constant PTZ_Auto => 'Auto';
use constant PTZ_Down => 'Down';
use constant PTZ_Left => 'Left';
use constant PTZ_LeftDown => 'LeftDown';
use constant PTZ_LeftUp => 'LeftUp';
use constant PTZ_Right => 'Right';
use constant PTZ_RightDown => 'RightDown';
use constant PTZ_RightUp => 'RightUp';
use constant PTZ_Stop => 'Stop';
use constant PTZ_Up => 'Up';
use constant PTZ_ZoomInc => 'ZoomInc';
use constant PTZ_ZoomDec => 'ZoomDec';
use constant PTZ_IrisDec => 'IrisDec'; # Iris shrink in the specified speed.
use constant PTZ_IrisInc => 'IrisInc'; # Iris enlarge in the specified speed.
use constant PTZ_FocusDec => 'FocusDec'; # Focus backwards in the specified speed.
use constant PTZ_FocusInc => 'FocusInc'; # Focus forwards in the specified speed.
use constant PTZ_StartPatrol => 'StartPatrol'; # PTZ patrol in the specified speed.
use constant PTZ_StopPatrol => 'StopPatrol'; # PTZ stop patrol.
use constant PTZ_ToPos => 'ToPos'; # PTZ turn to a specified preset in the specified speed.
# IPCamera::Reolink::PtzCtrl() op values as list.
our @PTZ_op_list = (PTZ_Auto, PTZ_Down, PTZ_Left, PTZ_LeftDown, PTZ_LeftUp, PTZ_Right, PTZ_RightDown, PTZ_RightUp, PTZ_Stop, PTZ_Up, PTZ_ZoomInc, PTZ_ZoomDec, PTZ_IrisDec, PTZ_IrisInc, PTZ_FocusDec, PTZ_FocusInc, PTZ_StartPatrol, PTZ_StopPatrol, PTZ_...
# IPCamera::Reolink::PtzCtrl() speed values.
use constant PTZ_SpeedMin => 1;
use constant PTZ_SpeedMax => 64;
use constant PTZ_SpeedHalf => 32;
# IPCamera::Reolink::PtzCtrl() speed values as list.
our @PTZ_speed_list = (PTZ_SpeedMin ... PTZ_SpeedMax);
# IPCamera::Reolink::PtzCtrl() preset values.
use constant PTZ_PresetMin => 0;
use constant PTZ_PresetMax => 63;
# IPCamera::Reolink::PtzCtrl() preset values as list.
our @PTZ_preset_list = (PTZ_PresetMin ... PTZ_PresetMax);
# IPCamera::Reolink::SetPtzPreset() maximum preset name length.
use constant PTZ_PresetMaxNameLength => 31;
# IPCamera::Reolink::StartZoomFocus() op values.
use constant ZF_ZoomPos => 'ZoomPos'; # set camera zoom to specified value
# IPCamera::Reolink::StartZoomFocus() op ZoomPos values.
use constant ZF_ZoomPosMin => 0;
use constant ZF_ZoomPosMax => 32;
# IPCamera::Reolink::StartZoomFocus() op ZoomPos values as list.
our @PTZ_ZoomPos_list = (ZF_ZoomPosMin ... ZF_ZoomPosMax);
( run in 0.804 second using v1.01-cache-2.11-cpan-39bf76dae61 )