2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 18:56:03 +00:00

49_SSCam: contrib 7.2.2

git-svn-id: https://svn.fhem.de/fhem/trunk@17626 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2018-10-27 17:36:06 +00:00
parent 85e971a5cc
commit 2b2d7602e2

View File

@ -45,7 +45,7 @@ use HttpUtils;
# Versions History intern # Versions History intern
our %SSCam_vNotesIntern = ( our %SSCam_vNotesIntern = (
"7.2.2" => "27.10.2018 Undefined subroutine &main::SSCam_ptzpanel ", "7.2.2" => "27.10.2018 fix undefined subroutine &main::SSCam_ptzpanel (https://forum.fhem.de/index.php/topic,45671.msg850505.html#msg850505) ",
"7.2.1" => "23.10.2018 new routine SSCam_versionCheck, COMPATIBILITY changed to 8.2.1 ", "7.2.1" => "23.10.2018 new routine SSCam_versionCheck, COMPATIBILITY changed to 8.2.1 ",
"7.2.0" => "20.10.2018 direct help for attributes, new get versionNotes command, fix PERL WARNING: Use of uninitialized value \$small, get versionNotes ", "7.2.0" => "20.10.2018 direct help for attributes, new get versionNotes command, fix PERL WARNING: Use of uninitialized value \$small, get versionNotes ",
"7.1.1" => "18.10.2018 Message of \"Your current/simulated SVS-version...\" changed, commandref corrected ", "7.1.1" => "18.10.2018 Message of \"Your current/simulated SVS-version...\" changed, commandref corrected ",
@ -254,8 +254,8 @@ 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_room); # currently selected room
use vars qw($FW_detail); # currently selected device for detail view use vars qw($FW_detail); # currently selected device for detail view
sub SSCam_ptzpanel($;$$);
################################################################
sub SSCam_Initialize($) { sub SSCam_Initialize($) {
my ($hash) = @_; my ($hash) = @_;
$hash->{DefFn} = "SSCam_Define"; $hash->{DefFn} = "SSCam_Define";
@ -274,7 +274,6 @@ sub SSCam_Initialize($) {
"genericStrmHtmlTag ". "genericStrmHtmlTag ".
"httptimeout ". "httptimeout ".
"htmlattr ". "htmlattr ".
"livestreamprefix ".
"loginRetries:1,2,3,4,5,6,7,8,9,10 ". "loginRetries:1,2,3,4,5,6,7,8,9,10 ".
"videofolderMap ". "videofolderMap ".
"pollcaminfoall ". "pollcaminfoall ".
@ -376,6 +375,10 @@ sub SSCam_Define($@) {
} }
readingsEndUpdate($hash,1); readingsEndUpdate($hash,1);
# allg. Userattr setzen
my $defpref = $hash->{PROTOCOL}."://".$hash->{SERVERADDR}.":".$hash->{SERVERPORT};
addToDevAttrList($name, "livestreamprefix:sortable,$defpref");
SSCam_getcredentials($hash,1); # Credentials lesen und in RAM laden ($boot=1) SSCam_getcredentials($hash,1); # Credentials lesen und in RAM laden ($boot=1)
# initiale Routinen nach Restart ausführen , verzögerter zufälliger Start # initiale Routinen nach Restart ausführen , verzögerter zufälliger Start
@ -436,6 +439,11 @@ sub SSCam_Attr($$$$) {
InternalTimer(gettimeofday()+0.7, "SSCam_addptzattr", "$name", 0); InternalTimer(gettimeofday()+0.7, "SSCam_addptzattr", "$name", 0);
} }
if($aName =~ /livestreamprefix/ && $cmd eq "set") {
$aVal = (split(",",$aVal))[0];
$_[3] = $aVal;
}
if ($aName eq "disable") { if ($aName eq "disable") {
if($cmd eq "set") { if($cmd eq "set") {
$do = ($aVal) ? 1 : 0; $do = ($aVal) ? 1 : 0;