2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

49_SSCam: global vars

git-svn-id: https://svn.fhem.de/fhem/trunk@16869 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2018-06-14 10:54:21 +00:00
parent 419a8d454e
commit 35b7c0ad99

View File

@ -27,6 +27,7 @@
######################################################################################################################### #########################################################################################################################
# Versions History: # Versions History:
# #
# 5.2.1 14.06.2018 design change of SSCam_StreamDev
# 5.2.0 14.06.2018 support longpoll refresh of SSCamSTRM-Devices # 5.2.0 14.06.2018 support longpoll refresh of SSCamSTRM-Devices
# 5.1.0 13.06.2018 more control elements (Start/Stop Recording, Take Snapshot) in func SSCam_StreamDev # 5.1.0 13.06.2018 more control elements (Start/Stop Recording, Take Snapshot) in func SSCam_StreamDev
# control of detaillink is moved to SSCamSTRM-device # control of detaillink is moved to SSCamSTRM-device
@ -233,7 +234,7 @@ use Time::HiRes;
use HttpUtils; use HttpUtils;
# no if $] >= 5.017011, warnings => 'experimental'; # no if $] >= 5.017011, warnings => 'experimental';
my $SSCamVersion = "5.2.0"; my $SSCamVersion = "5.2.1";
# Aufbau Errorcode-Hashes (siehe Surveillance Station Web API) # Aufbau Errorcode-Hashes (siehe Surveillance Station Web API)
my %SSCam_errauthlist = ( my %SSCam_errauthlist = (
@ -283,6 +284,11 @@ my %SSCam_errlist = (
my $SSCam_slim = 3; # default Anzahl der abzurufenden Schnappschüsse mit snapGallery my $SSCam_slim = 3; # default Anzahl der abzurufenden Schnappschüsse mit snapGallery
my $SSCAM_snum = "1,2,3,4,5,6,7,8,9,10"; # mögliche Anzahl der abzurufenden Schnappschüsse mit snapGallery my $SSCAM_snum = "1,2,3,4,5,6,7,8,9,10"; # mögliche Anzahl der abzurufenden Schnappschüsse mit snapGallery
use vars qw($FW_ME); # webname (default is fhem), used by 97_GROUP/weblink
use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
use vars qw($FW_room); # currently selected room
use vars qw($FW_detail); # currently selected device for detail view
sub SSCam_Initialize($) { sub SSCam_Initialize($) {
my ($hash) = @_; my ($hash) = @_;
$hash->{DefFn} = "SSCam_Define"; $hash->{DefFn} = "SSCam_Define";
@ -5627,7 +5633,6 @@ sub SSCam_ptzpanel($;$$) {
$img = "<img src=\"$FW_ME/$iconpath/$iconprefix$img\">"; # $FW_ME = URL-Pfad unter dem der FHEMWEB-Server via HTTP erreichbar ist, z.B. /fhem $img = "<img src=\"$FW_ME/$iconpath/$iconprefix$img\">"; # $FW_ME = URL-Pfad unter dem der FHEMWEB-Server via HTTP erreichbar ist, z.B. /fhem
} }
if ($cmd || $cmd eq "0") { if ($cmd || $cmd eq "0") {
# $cmd = "cmd.$name=set $name $cmd";
$cmd = "cmd=set $name $cmd"; $cmd = "cmd=set $name $cmd";
$ptz_ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmd')\">$img</a>"; # $FW_subdir = Sub-path in URL, used by FLOORPLAN/weblink $ptz_ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmd')\">$img</a>"; # $FW_subdir = Sub-path in URL, used by FLOORPLAN/weblink
} else { } else {
@ -5744,6 +5749,7 @@ sub SSCam_StreamDev($$$) {
$hash->{HELPER}{STRMDETAIL} = $FW_detail?$FW_detail:""; # Name des SSCamSTRM-Devices (wenn Detailansicht) $hash->{HELPER}{STRMDETAIL} = $FW_detail?$FW_detail:""; # Name des SSCamSTRM-Devices (wenn Detailansicht)
# Definition Tasten # Definition Tasten
my $imgblank = "<img src=\"$FW_ME/www/images/sscam/black_btn_CAMBLANK.png\">"; # nicht sichtbare Leertaste
my $cmdstop = "cmd=set $camname stopView"; # Stream deaktivieren my $cmdstop = "cmd=set $camname stopView"; # Stream deaktivieren
my $imgstop = "<img src=\"$FW_ME/www/images/default/remotecontrol/black_btn_POWEROFF3.png\">"; my $imgstop = "<img src=\"$FW_ME/www/images/default/remotecontrol/black_btn_POWEROFF3.png\">";
my $cmdhlsreact = "cmd=set $camname hlsreactivate"; # HLS Stream reaktivieren my $cmdhlsreact = "cmd=set $camname hlsreactivate"; # HLS Stream reaktivieren
@ -5884,6 +5890,7 @@ sub SSCam_StreamDev($$$) {
</video><br>"; </video><br>";
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdstop')\">$imgstop </a>"; $ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdstop')\">$imgstop </a>";
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdhlsreact')\">$imghlsreact </a>"; $ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdhlsreact')\">$imghlsreact </a>";
$ret .= $imgblank;
if(ReadingsVal($camname, "Record", "Stop") eq "Stop") { if(ReadingsVal($camname, "Record", "Stop") eq "Stop") {
# Aufnahmebutton endlos Start # Aufnahmebutton endlos Start
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdrecendless')\">$imgrecendless </a>"; $ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmdrecendless')\">$imgrecendless </a>";