diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 1d0e7fd8b..81acdbc49 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -156,6 +156,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.37.3" => "25.10.2024 _flowGraphic: grid, dummy and battery displacement by kask ", "1.37.2" => "24.10.2024 _flowGraphic: show Producer Row only if more than one Producer is defined ", "1.37.1" => "23.10.2024 state: 'The setup routine is still incomplete' if setup is incomplete ". "change: 'trackFlex' && \$wcc >= 80 to \$wcc >= 70, implement Rename function ". @@ -14232,7 +14233,7 @@ sub _flowGraphic { my $lcp; my $stna = $name; - $stna =~ s/([0-9])/$hrepl{$1}/ge if($name =~ /[0-9]/xs); # V 1.37.1 Ziffern eliminieren, Forum: https://forum.fhem.de/index.php?msg=1323229 + $stna =~ s/([0-9])/$hrepl{$1}/ge if($name =~ /[0-9]/xs); # V 1.37.1 Ziffern eliminieren, Forum: https://forum.fhem.de/index.php?msg=1323229 ## definierte Producer + Inverter ermitteln und zusammenfassen ################################################################ @@ -14284,9 +14285,9 @@ sub _flowGraphic { my ($togrid, $tonode, $tobat) = __sortProducer ($pdcr); # lfn Producer sortiert nach ptyp und feed my $psorted = { - '1togrid' => { xicon => -100, xchain => 350, ychain => 420, step => 70, count => scalar @{$togrid}, sorted => $togrid }, # Producer/PV nur zu Grid + '1togrid' => { xicon => -100, xchain => 150, ychain => 400, step => 30, count => scalar @{$togrid}, sorted => $togrid }, # Producer/PV nur zu Grid '2tonode' => { xicon => 350, xchain => 700, ychain => 200, step => $pdist, count => scalar @{$tonode}, sorted => $tonode }, # Producer/PV zum Knoten - '3tobat' => { xicon => 750, xchain => 1100, ychain => 430, step => 40, count => scalar @{$tobat}, sorted => $tobat }, # Producer/PV nur zu Batterie + '3tobat' => { xicon => 750, xchain => 1370, ychain => 430, step => 30, count => scalar @{$tobat}, sorted => $tobat }, # Producer/PV nur zu Batterie }; my $doproducerrow = 1; @@ -14294,10 +14295,10 @@ sub _flowGraphic { ## definierte Verbraucher ermitteln ##################################### - my $cnsmr = {}; # Hashref Consumer current power + my $cnsmr = {}; # Hashref Consumer current power - for my $c (sort{$a<=>$b} keys %{$data{$type}{$name}{consumers}}) { # definierte Verbraucher ermitteln - next if(isConsumerNoshow ($hash, $c) =~ /^[13]$/xs); # auszublendende Consumer nicht berücksichtigen + for my $c (sort{$a<=>$b} keys %{$data{$type}{$name}{consumers}}) { # definierte Verbraucher ermitteln + next if(isConsumerNoshow ($hash, $c) =~ /^[13]$/xs); # auszublendende Consumer nicht berücksichtigen $cnsmr->{$c}{p} = ReadingsNum ($name, "consumer${c}_currentPower", 0); $cnsmr->{$c}{ptyp} = 'consumer'; } @@ -14318,22 +14319,22 @@ sub _flowGraphic { $soc = 0; } - my $grid2home_style = $cgc ? "$stna active_sig" : "$stna inactive"; # cgc current GridConsumption + my $grid2home_style = $cgc ? "$stna active_sig" : "$stna inactive"; # cgc current GridConsumption my $bat2home_style = $bat2home ? "$stna active_normal" : "$stna inactive"; - my $cgc_direction = "M490,515 L670,590"; + my $cgc_direction = "M250,515 L670,590"; if ($bat2home) { # Batterie wird ins Haus entladen my $cgfo = $node2grid - $pv2node; if ($cgfo > 1) { $grid2home_style = "$stna active_normal"; - $cgc_direction = "M670,590 L490,515"; + $cgc_direction = "M670,590 L250,515"; $node2grid -= $cgfo; $cgc = $cgfo; } } - my $bat2home_direction = "M902,515 L730,590"; + my $bat2home_direction = "M1200,515 L730,590"; my $node2bat = $batin; if ($batin) { # Batterie wird geladen @@ -14342,7 +14343,7 @@ sub _flowGraphic { if ($home2bat > 1) { # Batterieladung wird anteilig aus Hausnetz geladen $node2bat -= $home2bat; $bat2home_style = "$stna active_sig"; - $bat2home_direction = "M730,590 L902,515"; + $bat2home_direction = "M730,590 L1200,515"; $bat2home = $home2bat; } } @@ -14399,7 +14400,7 @@ sub _flowGraphic { - + END0 @@ -14475,10 +14476,10 @@ END0 } ## Batterie Icon - ################## - if ($hasbat) { + ################## + if ($hasbat) { $ret .= << "END1"; - + END1 @@ -14507,7 +14508,7 @@ END1 my $dicon = FW_makeImage ($cicondef.$dumcol, ''); ($scale, $dicon) = __normIconScale ($dicon, $name); - $ret .= qq{}; + $ret .= qq{}; $ret .= "$dumtxt".$dicon; $ret .= ' '; } @@ -14520,7 +14521,7 @@ END1 $ret .= << "END2"; - + END2 @@ -14528,7 +14529,7 @@ END2 ############################################## if ($hasbat) { my $node2bat_style = $node2bat ? "$stna active_normal" : "$stna inactive"; - my $batin_direction = $node2bat < 0 ? "M910,480 L730,400" : "M730,400 L910,480"; + my $batin_direction = $node2bat < 0 ? "M1200,480 L730,400" : "M730,400 L1200,480"; $node2bat = abs $node2bat; $ret .= << "END3"; @@ -14549,7 +14550,7 @@ END3 #$chain_color = 'style="stroke: #DF0101;"'; } - $ret .= qq{}; + $ret .= qq{}; } ## Producer Laufketten - in Reihenfolge: zum Grid - zum Knoten - zur Batterie @@ -14633,15 +14634,15 @@ END3 ## Textangaben an Grafikelementen ################################### $cc_dummy = sprintf("%.0f", $cc_dummy); # Verbrauch Dummy-Consumer - $ret .= qq{$pnodesum} if ($pnodesum > 0); - $ret .= qq{$soc %} if ($hasbat); # Lage Text Batterieladungszustand - $ret .= qq{$node2home} if ($node2home); - $ret .= qq{$node2grid} if ($node2grid); - $ret .= qq{$cgc} if ($cgc); - $ret .= qq{$bat2home} if ($bat2home && $hasbat); - $ret .= qq{$node2bat} if ($node2bat && $hasbat); - $ret .= qq{$cc}; # Current_Consumption Anlage - $ret .= qq{$cc_dummy} if ($flowgconX && $flowgconsPower); # Current_Consumption Dummy + $ret .= qq{$pnodesum} if ($pnodesum > 0); + $ret .= qq{$soc %} if ($hasbat); # Lage Text Batterieladungszustand + $ret .= qq{$node2home} if ($node2home); + $ret .= qq{$node2grid} if ($node2grid); + $ret .= qq{$cgc} if ($cgc); + $ret .= qq{$bat2home} if ($bat2home && $hasbat); + $ret .= qq{$node2bat} if ($node2bat && $hasbat); + $ret .= qq{$cc}; # Current_Consumption Anlage + $ret .= qq{$cc_dummy} if ($flowgconX && $flowgconsPower); # Current_Consumption Dummy ## Textangabe Producer - in Reihenfolge: zum Grid - zum Knoten - zur Batterie ## Textangabe nur anzeigen wenn Producerzeile angezeigt werden soll