2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

76_Solarforcast: contrib 0.1.0

git-svn-id: https://svn.fhem.de/fhem/trunk@23367 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2020-12-16 15:48:38 +00:00
parent 3cd80199ed
commit 29c61e1336

View File

@ -671,6 +671,10 @@ sub _transferForecastValues {
$myHash->{HELPER}{"fc${fd}_".sprintf("%02d",$fh)."_PVforecast"} = $calcpv; # Vorhersagedaten zur Berechnung Korrekturfaktor in Helper speichern
if($fd == 0 && $calcpv > 0) { # Vorhersagedaten des aktuellen Tages zum manuellen Vergleich in Reading speichern
push @$daref, "Today_Hour".sprintf("%02d",$fh)."_PVforecast:$calcpv";
}
## Wetter Forecast
###################
@ -707,13 +711,14 @@ sub _transferInverterValues {
$indev = $a->[0] // "";
return if(!$indev || !$defs{$indev});
my $tlim = "0|23"; # Stunde 23 -> bestimmte Aktionen
my $tlim = "0|23"; # Stunde 0/23 -> bestimmte Aktionen
if($chour =~ /^($tlim)$/x) {
my @allrds = keys %{$myHash->{READINGS}};
for my $key(@allrds) {
readingsDelete($myHash, $key) if($key =~ m/^Today_Hour\d{2}_PVreal$/x);
}
deleteReadingspec ($myHash, "Today_Hour.*_PV.*");
#my @allrds = keys %{$myHash->{READINGS}};
#for my $key(@allrds) {
# readingsDelete($myHash, $key) if($key =~ m/^Today_Hour\d{2}_PVreal$/x);
#}
}
## aktuelle PV-Erzeugung
@ -1799,6 +1804,9 @@ sub calcVariance {
readingsSingleUpdate($myHash, "pvCorrectionFactor_Auto", "on (remains in standby for $rmh hours)", 0);
return;
}
else {
readingsSingleUpdate($myHash, "pvCorrectionFactor_Auto", "on", 0);
}
my @da;
for my $h (1..23) {