76_SolarForecast: contrib V1.59.1
git-svn-id: https://svn.fhem.de/fhem/trunk@30363 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1833,16 +1833,16 @@ sub Set {
|
|||||||
$coms = @condevs ? join ",", @condevs : 'noArg';
|
$coms = @condevs ? join ",", @condevs : 'noArg';
|
||||||
my $ipai = isPrepared4AI ($hash);
|
my $ipai = isPrepared4AI ($hash);
|
||||||
|
|
||||||
opendir (DIR, $cachedir);
|
opendir (my $dh, $cachedir);
|
||||||
|
|
||||||
while (my $file = readdir (DIR)) {
|
while (my $file = readdir $dh) {
|
||||||
next unless (-f "$cachedir/$file");
|
next unless (-f "$cachedir/$file");
|
||||||
next unless ($file =~ /_${name}_/);
|
next unless ($file =~ /_${name}_/);
|
||||||
next unless ($file =~ /_\d{4}_\d{2}_\d{2}_\d{2}_\d{2}_\d{2}$/);
|
next unless ($file =~ /_\d{4}_\d{2}_\d{2}_\d{2}_\d{2}_\d{2}$/);
|
||||||
push @bkps, 'recover-'.$file;
|
push @bkps, 'recover-'.$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir (DIR);
|
closedir $dh;
|
||||||
my $rf = @bkps ? ','.join ",", reverse sort @bkps : '';
|
my $rf = @bkps ? ','.join ",", reverse sort @bkps : '';
|
||||||
|
|
||||||
my $cakeys = join ',', @hcompoattrkeys;
|
my $cakeys = join ',', @hcompoattrkeys;
|
||||||
@@ -12090,12 +12090,12 @@ sub __batChargeOptTargetPower {
|
|||||||
|
|
||||||
$runwh += $hsurp->{$hod}{speff} / $befficiency; # um Verbrauch reduzieren
|
$runwh += $hsurp->{$hod}{speff} / $befficiency; # um Verbrauch reduzieren
|
||||||
|
|
||||||
$fcendwh = $runwh < $lowSocwh ? $lowSocwh : # fcendwh begrenzen
|
$runwh = $runwh < $lowSocwh ? $lowSocwh : # runwh begrenzen
|
||||||
$runwh < $batoptsocwh ? $batoptsocwh :
|
$runwh < $batoptsocwh ? $batoptsocwh :
|
||||||
$runwh > $batinstcap ? $batinstcap :
|
$runwh > $batinstcap ? $batinstcap :
|
||||||
$runwh;
|
$runwh;
|
||||||
|
|
||||||
$hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", $fcendwh;
|
$hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", $runwh;
|
||||||
$hsurp->{$nexthod}{$sbn}{fcnextwh} = $hsurp->{$hod}{$sbn}{fcendwh} if(defined $nextnhr); # Startwert kommende Stunde
|
$hsurp->{$nexthod}{$sbn}{fcnextwh} = $hsurp->{$hod}{$sbn}{fcendwh} if(defined $nextnhr); # Startwert kommende Stunde
|
||||||
|
|
||||||
if ($nhr eq '00') {
|
if ($nhr eq '00') {
|
||||||
@@ -12143,7 +12143,7 @@ sub __batChargeOptTargetPower {
|
|||||||
$otp->{$sbn}{target} = $target;
|
$otp->{$sbn}{target} = $target;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fcendwh = min ($goalwh, $runwh # Endwert Prognose aktuelle Stunde
|
$runwh = min ($goalwh, $runwh # Endwert Prognose aktuelle Stunde
|
||||||
+ $befficiency
|
+ $befficiency
|
||||||
* ($nhr eq '00'
|
* ($nhr eq '00'
|
||||||
? $otp->{$sbn}{target}
|
? $otp->{$sbn}{target}
|
||||||
@@ -12151,12 +12151,12 @@ sub __batChargeOptTargetPower {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$fcendwh = $runwh < $lowSocwh ? $lowSocwh : # fcendwh begrenzen
|
$runwh = $runwh < $lowSocwh ? $lowSocwh : # fcendwh begrenzen
|
||||||
$runwh < $batoptsocwh ? $batoptsocwh :
|
$runwh < $batoptsocwh ? $batoptsocwh :
|
||||||
$runwh > $batinstcap ? $batinstcap :
|
$runwh > $batinstcap ? $batinstcap :
|
||||||
$runwh;
|
$runwh;
|
||||||
|
|
||||||
$hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", $fcendwh;
|
$hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", $runwh;
|
||||||
$hsurp->{$nexthod}{$sbn}{fcnextwh} = $hsurp->{$hod}{$sbn}{fcendwh} if(defined $nextnhr); # Startwert kommende Stunde
|
$hsurp->{$nexthod}{$sbn}{fcnextwh} = $hsurp->{$hod}{$sbn}{fcendwh} if(defined $nextnhr); # Startwert kommende Stunde
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user