mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
76_SolarForecast: contrib 1.34.0
git-svn-id: https://svn.fhem.de/fhem/trunk@29191 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6b7477f6ae
commit
f5511c7ab7
@ -162,7 +162,9 @@ my %vNotesIntern = (
|
||||
"minor fix in ___readCandQ, new experimental attribute ctrlAreaFactorUsage ".
|
||||
"optional icon in attr setupOtherProducerXX, integrate Producer to _flowGraphic (kask) ".
|
||||
"don't show Consumer or Producer if it isn't defined any kind of it ".
|
||||
"Optimization of space in the flow chart above generators and below consumers ",
|
||||
"Optimization of space in the flow chart above generators and below consumers ".
|
||||
"_beamGraphic: implement barcount to Limit the number of bars in level 2 if the number of bars in ".
|
||||
"level 1 is less than graphicHourCount (fall/winter) ",
|
||||
"1.33.1" => "27.09.2024 bugfix of 1.33.0, add aiRulesNumber to pvCircular, limits of AI trained datasets for ".
|
||||
"AI use (aiAccTRNMin, aiSpreadTRNMin)",
|
||||
"1.33.0" => "26.09.2024 substitute area factor hash by ___areaFactorFix function ",
|
||||
@ -11931,6 +11933,8 @@ sub entryGraphic {
|
||||
if ($paref->{beam3cont} || $paref->{beam4cont}) { # Balkengrafik Ebene 2
|
||||
my %hfcg2;
|
||||
|
||||
$hfcg2{barcount} = $hfcg1{barcount}; # Anzahl Balken der Ebene1 zur Begrenzung Ebene 2 übernehmen
|
||||
|
||||
$paref->{beam1cont} = $paref->{beam3cont};
|
||||
$paref->{beam2cont} = $paref->{beam4cont};
|
||||
$paref->{colorb1} = AttrVal ($name, 'graphicBeam3Color', $b3coldef);
|
||||
@ -13511,20 +13515,21 @@ sub _beamGraphic {
|
||||
|
||||
my ($val, $z2, $z3, $z4, $he, $titz2, $titz3);
|
||||
|
||||
my $barcount = $hfcg->{barcount} // 9999; # Anzahl Balken der vorangegangenen Ebene zur Begrenzung dieser Ebene
|
||||
my $ret .= __weatherOnBeam ($paref);
|
||||
my $m = $paref->{modulo} % 2;
|
||||
|
||||
if ($show_diff eq 'top') { # Zusätzliche Zeile Ertrag - Verbrauch
|
||||
$ret .= "<tr class='$htr{$m}{cl}'><td class='solarfc'></td>";
|
||||
my $ii;
|
||||
|
||||
my $ii = 0;
|
||||
|
||||
for my $i (0..($maxhours * 2) - 1) { # gleiche Bedingung wie oben
|
||||
next if(!$show_night && $hfcg->{$i}{weather} > 99
|
||||
&& !$hfcg->{$i}{beam1}
|
||||
&& !$hfcg->{$i}{beam2});
|
||||
$ii++; # wieviele Stunden haben wir bisher angezeigt ?
|
||||
|
||||
last if($ii > $maxhours); # vorzeitiger Abbruch
|
||||
last if($ii > $maxhours || $ii > $barcount); # vorzeitiger Abbruch
|
||||
|
||||
$val = formatVal6 ($hfcg->{$i}{diff}, $kw, $hfcg->{$i}{weather});
|
||||
|
||||
@ -13549,7 +13554,9 @@ sub _beamGraphic {
|
||||
&& !$hfcg->{$i}{beam1}
|
||||
&& !$hfcg->{$i}{beam2});
|
||||
$ii++;
|
||||
last if($ii > $maxhours);
|
||||
last if($ii > $maxhours || $ii > $barcount);
|
||||
|
||||
$hfcg->{barcount} = $ii; # Anzahl Balken zur Begrenzung der nächsten Ebene registrieren
|
||||
|
||||
$height = 200 if(!$height); # Fallback, sollte eigentlich nicht vorkommen, außer der User setzt es auf 0
|
||||
$maxVal = 1 if(!int $maxVal); # maxVal kann gerade bei kleineren maxhours Ausgaben in der Nacht leicht auf 0 fallen
|
||||
@ -13995,6 +14002,7 @@ sub _flowGraphic {
|
||||
$flowgprods = 0 if(!$producercount); # Producer Anzeige ausschalten wenn keine Producer definiert
|
||||
my $p2home = sprintf "%.1f", ($csc + $ppall); # Energiefluß von Sonne zum Haus: Selbstverbrauch + alle Producer
|
||||
$p2home = sprintf "%.0f", $p2home if($p2home > 10);
|
||||
$p2home = 0 if($p2home == 0); # 0.0 eliminieren wenn keine Leistung zum Haus
|
||||
|
||||
## SVG Box initialisieren
|
||||
###########################
|
||||
@ -14111,7 +14119,6 @@ END0
|
||||
|
||||
for my $c (@consumers) {
|
||||
my $calias = ConsumerVal ($hash, $c, "alias", ""); # Name des Consumerdevices
|
||||
#$currentPower = ReadingsNum ($name, "consumer${c}_currentPower", 0);
|
||||
$currentPower = $cpcurr->{$c};
|
||||
my $cicon = __substituteIcon ({hash => $hash, name => $name, cn => $c, pcurr => $currentPower}); # Icon des Consumerdevices
|
||||
$cc_dummy -= $currentPower;
|
||||
@ -14225,7 +14232,6 @@ END3
|
||||
for my $c (@consumers) {
|
||||
my $power = ConsumerVal ($hash, $c, "power", 0);
|
||||
my $rpcurr = ConsumerVal ($hash, $c, "rpcurr", ""); # Reading für akt. Verbrauch angegeben ?
|
||||
#$currentPower = ReadingsNum ($name, "consumer${c}_currentPower", 0);
|
||||
$currentPower = $cpcurr->{$c};
|
||||
|
||||
if (!$rpcurr && isConsumerPhysOn($hash, $c)) { # Workaround wenn Verbraucher ohne Leistungsmessung
|
||||
@ -14313,13 +14319,12 @@ END3
|
||||
}
|
||||
}
|
||||
|
||||
## Consumer Anzeige
|
||||
#####################
|
||||
## Textangabe Consumer
|
||||
########################
|
||||
if ($flowgcons) {
|
||||
$pos_left = ($consumer_start * 2) - 50; # -XX -> Start Lage Consumer Beschriftung
|
||||
|
||||
for my $c (@consumers) {
|
||||
#$currentPower = sprintf "%.1f", ReadingsNum($name, "consumer${c}_currentPower", 0);
|
||||
$currentPower = sprintf "%.1f", $cpcurr->{$c};
|
||||
$currentPower = sprintf "%.0f", $currentPower if($currentPower > 10);
|
||||
my $consumerTime = ConsumerVal ($hash, $c, "remainTime", ""); # Restlaufzeit
|
||||
|
Loading…
x
Reference in New Issue
Block a user