2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 16:05:19 +00:00

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
This commit is contained in:
nasseeder1 2024-01-10 20:38:05 +00:00
parent c56df669e6
commit 1fdfb8fd2d

View File

@ -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);
if ($minute == 59 && $second > 48 && $second < 58) {
if (!exists $hash->{HELPER}{S58DONE}) {
$debug = getDebug ($hash);
$hash->{HELPER}{S58DONE} = 1;
if ($debug =~ /collectData/x) {
@ -4538,6 +4539,7 @@ sub runCtHourly {
if ($minute == 0 && $second > 3 && $second < 20) {
if (!exists $hash->{HELPER}{S20DONE}) {
$debug = getDebug ($hash);
$hash->{HELPER}{S20DONE} = 1;
if ($debug =~ /collectData/x) {