mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
76_Solarforcast: contrib 0.80.1
git-svn-id: https://svn.fhem.de/fhem/trunk@27639 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
084bc00526
commit
72387f9e58
@ -9150,9 +9150,7 @@ return;
|
||||
|
||||
################################################################
|
||||
# Korrekturfaktoren und Qualität in Abhängigkeit von DWD
|
||||
# Bewölkung errechnen:
|
||||
# Abweichung PVreal / PVforecast bei eingeschalteter automat.
|
||||
# Korrektur berechnen, im Circular Hash speichern
|
||||
# Bewölkung errechnen
|
||||
################################################################
|
||||
sub _calcCAQfromDWDcloudcover {
|
||||
my $paref = shift;
|
||||
@ -9391,7 +9389,7 @@ sub _calcCAQfromAPIPercentil {
|
||||
$paref->{hour} = $h;
|
||||
my ($pvhis,$fchis,$dnum) = __Pv_Fc_Dnum_Hist ($paref); # historischen Percentilfaktor / Qualität ermitteln
|
||||
|
||||
my ($oldfac, $oldq) = CircularAutokorrVal ($hash, sprintf("%02d",$h), 'percentile', 1.0); # bisher definiertes Percentil/Qualität der Stunde des Tages der entsprechenden Bewölkungsrange
|
||||
my ($oldfac, $oldq) = CircularAutokorrVal ($hash, sprintf("%02d",$h), 'percentile', 0);
|
||||
$oldfac = 1.0 if(1 * $oldfac == 0 || $oldfac >= 10);
|
||||
|
||||
my @sts = split ",", ReadingsVal($name, 'inverterStrings', '');
|
||||
@ -9400,11 +9398,11 @@ sub _calcCAQfromAPIPercentil {
|
||||
my $est50 = 0;
|
||||
|
||||
for my $s (@sts) {
|
||||
$est50 += SolCastAPIVal ($hash, $s, $tmstr, 'pv_estimate50', 0); # Standardpercentil
|
||||
$est50 += SolCastAPIVal ($hash, $s, $tmstr, 'pv_estimate50', 0);
|
||||
}
|
||||
|
||||
if(!$est50) { # kein Standardpercentile vorhanden
|
||||
debugLog ($paref, "pvCorrection", "Simple Corrf -> hour: $h, the correction factor can't be calculated because of the default percentile has no value yet");
|
||||
if(!$est50) {
|
||||
debugLog ($paref, "pvCorrection", "Simple Corrf -> hour: $h, the correction factor can't be calculated because of no PV forecast");
|
||||
next;
|
||||
}
|
||||
|
||||
@ -9420,8 +9418,7 @@ sub _calcCAQfromAPIPercentil {
|
||||
delete $paref->{nhour};
|
||||
delete $paref->{pvcorrf};
|
||||
|
||||
debugLog ($paref, 'pvCorrection', "Simple Corrf -> PV estimate for hour of day >$h<: $est50");
|
||||
debugLog ($paref, 'pvCorrection', "Simple Corrf -> number checked days: $dnum, pvreal: $pvval, correction factor: $perc");
|
||||
debugLog ($paref, 'pvCorrection', "Simple Corrf -> PV for hour >$h< -> estimate without corr factor: $est50, real: $pvval");
|
||||
|
||||
my $factor;
|
||||
my ($usenhd) = __useNumHistDays ($name); # ist Attr affectNumHistDays gesetzt ?
|
||||
@ -9451,7 +9448,7 @@ sub _calcCAQfromAPIPercentil {
|
||||
Log3 ($name, 3, "$name - new correction factor calculated: $factor (old: $oldfac) for hour: $h calculated") if($factor != $oldfac);
|
||||
}
|
||||
|
||||
debugLog ($paref, 'pvCorrection', "Simple Corrf -> old circular correction: $oldfac, new correction: $factor");
|
||||
debugLog ($paref, 'pvCorrection', "Simple Corrf -> old circular correction: $oldfac, new correction: $factor, number of days for calc: $dnum");
|
||||
debugLog ($paref, 'saveData2Cache', "Simple Corrf -> write correction factor into circular Hash: $factor, Hour $h");
|
||||
|
||||
my $type = $paref->{type};
|
||||
|
Loading…
x
Reference in New Issue
Block a user