From f932721e3c831d7322a1f94c459c46b99aca213e Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Wed, 10 Jan 2024 20:38:05 +0000 Subject: [PATCH] 76_SolarForecast: run collection definitely at end/start of an hour git-svn-id: https://svn.fhem.de/fhem/trunk@28372 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/76_SolarForecast.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index 0158bb5ff..bddd9bc4b 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -4516,13 +4516,14 @@ sub runCtHourly { return if(InternalVal($name, 'MODE', '') =~ /Manual/xs || CurrentVal ($hash, 'ctrunning', 0)); + my $debug; my $t = time; my $second = int (strftime "%S", localtime(time)); # aktuelle Sekunde (00-61) - my $minute = int (strftime "%M", localtime($t)); # aktuelle Minute (00-59) - my $debug = getDebug ($hash); + my $minute = int (strftime "%M", localtime($t)); # aktuelle Minute (00-59) if ($minute == 59 && $second > 48 && $second < 58) { if (!exists $hash->{HELPER}{S58DONE}) { + $debug = getDebug ($hash); $hash->{HELPER}{S58DONE} = 1; if ($debug =~ /collectData/x) { @@ -4537,7 +4538,8 @@ sub runCtHourly { } if ($minute == 0 && $second > 3 && $second < 20) { - if (!exists $hash->{HELPER}{S20DONE}) { + if (!exists $hash->{HELPER}{S20DONE}) { + $debug = getDebug ($hash); $hash->{HELPER}{S20DONE} = 1; if ($debug =~ /collectData/x) {