mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_WeekdayTimer: better logging implemented
git-svn-id: https://svn.fhem.de/fhem/trunk@9984 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
40b3230df7
commit
37da8bfa8d
@ -532,7 +532,11 @@ sub WeekdayTimer_SetTimer($) {
|
|||||||
if (!defined $hash->{SETTIMERATMIDNIGHT} && $isActiveTimer);
|
if (!defined $hash->{SETTIMERATMIDNIGHT} && $isActiveTimer);
|
||||||
|
|
||||||
if ($secondsToSwitch>-5) {
|
if ($secondsToSwitch>-5) {
|
||||||
Log3 $hash, 4, "[$name] setTimer - timer seems to be active today: ".join("",@$tage)."|$time|$para" if($isActiveTimer);
|
if($isActiveTimer) {
|
||||||
|
Log3 $hash, 4, "[$name] setTimer - timer seems to be active today: ".join("",@$tage)."|$time|$para";
|
||||||
|
} else {
|
||||||
|
Log3 $hash, 4, "[$name] setTimer - timer seems to be NOT active today: ".join("",@$tage)."|$time|$para ". $hash->{CONDITION};
|
||||||
|
}
|
||||||
myInternalTimer ("$idx", $timToSwitch, "$hash->{TYPE}_Update", $hash, 0);
|
myInternalTimer ("$idx", $timToSwitch, "$hash->{TYPE}_Update", $hash, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -683,14 +687,17 @@ sub WeekdayTimer_Update($) {
|
|||||||
sub WeekdayTimer_isAnActiveTimer ($$$) {
|
sub WeekdayTimer_isAnActiveTimer ($$$) {
|
||||||
my ($hash, $tage, $newParam) = @_;
|
my ($hash, $tage, $newParam) = @_;
|
||||||
|
|
||||||
|
my $name = $hash->{NAME};
|
||||||
my %specials = ( "%NAME" => $hash->{DEVICE}, "%EVENT" => $newParam);
|
my %specials = ( "%NAME" => $hash->{DEVICE}, "%EVENT" => $newParam);
|
||||||
|
|
||||||
my $condition = WeekdayTimer_Condition ($hash, $tage);
|
my $condition = WeekdayTimer_Condition ($hash, $tage);
|
||||||
my $tageAsHash = WeekdayTimer_tageAsHash($hash, $tage);
|
my $tageAsHash = WeekdayTimer_tageAsHash($hash, $tage);
|
||||||
my $xPression = "{".$tageAsHash.";;".$condition ."}";
|
my $xPression = "{".$tageAsHash.";;".$condition ."}";
|
||||||
$xPression = EvalSpecials($xPression, %specials);
|
$xPression = EvalSpecials($xPression, %specials);
|
||||||
|
Log3 $hash, 5, "[$name] condition: $xPression";
|
||||||
|
|
||||||
my $ret = AnalyzeCommandChain(undef, $xPression);
|
my $ret = AnalyzeCommandChain(undef, $xPression);
|
||||||
|
Log3 $hash, 3, "[$name] result of condition:$ret";
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user