From 79d4d59e29004990b86c95314fd5099fca6a6e45 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sat, 1 Aug 2020 08:40:15 +0000 Subject: [PATCH] 49_SSCamSTRM: verbose 5 log in _setadoptForTimer sub git-svn-id: https://svn.fhem.de/fhem/trunk@22508 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/49_SSCamSTRM.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/49_SSCamSTRM.pm b/fhem/FHEM/49_SSCamSTRM.pm index 1d43d0ab7..890923048 100644 --- a/fhem/FHEM/49_SSCamSTRM.pm +++ b/fhem/FHEM/49_SSCamSTRM.pm @@ -91,6 +91,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "2.14.3" => "01.08.2020 verbose 5 log in _setadoptForTimer sub ", "2.14.2" => "29.07.2020 fix: adoptTime accept not only integer values ", "2.14.1" => "28.07.2020 switching time increases with each adoptForTimer command ", "2.14.0" => "27.07.2020 new commands adoptForTimer and control command adoptTime ", @@ -442,13 +443,12 @@ sub _setadoptForTimer { ## no critic "not used" my $hash = $paref->{hash}; my $name = $paref->{name}; my $opt = $paref->{opt}; - my $odev = $paref->{odev}; # bisheriges adoptiertes Device (wird erst im InternalTimer gesetzt und verwendet) + my $odev = $paref->{odev}; # bisheriges adoptiertes Device (wird erst im InternalTimer gesetzt und verwendet) my $atime = ReadingsVal($name, "adoptTimer", 10); - RemoveInternalTimer("", "FHEM::SSCamSTRM::_setadoptForTimer"); # $paref nicht checken ! da immer unikat - if ($init_done != 1) { + RemoveInternalTimer("", "FHEM::SSCamSTRM::_setadoptForTimer"); # $paref nicht checken ! da immer unikat InternalTimer(gettimeofday()+3, "FHEM::SSCamSTRM::_setadoptForTimer", $paref, 0); return; } @@ -473,6 +473,8 @@ sub _setadoptForTimer { ## no critic "not used" $paref->{aref} = \@a; } + Log3($name, 5, "$name - Call Fn => $hset{adopt}{fn}, odev => ".($odev // "")." , sdev => ".($sdev // "")." ,Helper SWITCHED => ".($hash->{HELPER}{SWITCHED} // "").", switch time => $atime"); + no strict "refs"; ## no critic 'NoStrict' &{$hset{adopt}{fn}} ($paref); use strict "refs"; @@ -484,6 +486,7 @@ sub _setadoptForTimer { ## no critic "not used" Log3($name, 4, qq{$name - Switched to Stream Device "$hash->{LINKNAME}" for $atime seconds}); + RemoveInternalTimer("", "FHEM::SSCamSTRM::_setadoptForTimer"); # $paref nicht checken ! da immer unikat InternalTimer(gettimeofday()+$atime, "FHEM::SSCamSTRM::_setadoptForTimer", $paref, 0); return;