diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 1cf6af390..16f6dbac2 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -1,5 +1,5 @@ ######################################################################################################################## -# $Id: 76_SolarForecast.pm 21735 2022-10-28 23:53:24Z DS_Starter $ +# $Id: 76_SolarForecast.pm 21735 2022-10-29 23:53:24Z DS_Starter $ ######################################################################################################################### # 76_SolarForecast.pm # @@ -130,6 +130,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "0.71.4" => "29.10.2022 flowgraphic some changes (https://forum.fhem.de/index.php/topic,117864.msg1241836.html#msg1241836) ", "0.71.3" => "28.10.2022 new circular keys tdayDvtn, ydayDvtn for calculation PV forecast/generation in header ", "0.71.2" => "27.10.2022 fix 'connection lost ...' issue ", "0.71.1" => "26.10.2022 save no datasets with pv_estimate = 0 (__solCast_ApiResponse) to save time/space ". @@ -6281,13 +6282,11 @@ sub entryGraphic { # Headerzeile generieren ########################## - my $header = _graphicHeader ($paref); - #$paref->{header} = $header; + my $header = _graphicHeader ($paref); # Verbraucherlegende und Steuerung ################################### - my $legendtxt = _graphicConsumerLegend ($paref); - #$paref->{legendtxt} = $legendtxt; + my $legendtxt = _graphicConsumerLegend ($paref); $ret .= "\n"; # das \n erleichtert das Lesen der debug Quelltextausgabe my $m = $paref->{modulo} % 2; @@ -6305,7 +6304,9 @@ sub entryGraphic { if ($legendtxt && ($clegend eq 'top')) { $ret .= ""; - $ret .= ""; + #$ret .= ""; $ret .= ""; $paref->{modulo}++; @@ -6344,7 +6345,8 @@ sub entryGraphic { if($gsel eq "both" || $gsel eq "flow") { $ret .= ""; my $fg = _flowGraphic ($paref); - $ret .= ""; + $ret .= ""; $ret .= ""; $paref->{modulo}++; @@ -6356,8 +6358,10 @@ sub entryGraphic { ################# if ($legendtxt && ($clegend eq 'bottom')) { $ret .= ""; - $ret .= ""; + #$ret .= ""; + $ret .= ""; } $ret .= "
$legendtxt"; + $ret .= ""; + $ret .= "$legendtxt
$fg"; + $ret .= "$fg
"; - $ret .= "$legendtxt
"; + $ret .= ""; + $ret .= "$legendtxt
"; @@ -7545,7 +7549,8 @@ sub _flowGraphic { my $consDist = $paref->{flowgconsDist}; my $css = $paref->{css}; - my $style = 'width:'.$flowgsize.'px; height:'.$flowgsize.'px;'; + #my $style = 'width:'.$flowgsize.'px; height:'.$flowgsize.'px;'; + my $style = 'width:98%; height:'.$flowgsize.'px;'; my $animation = $flowgani ? '@keyframes dash { to { stroke-dashoffset: 0; } }' : ''; # Animation Ja/Nein my $cpv = ReadingsNum($name, 'Current_PV', 0); my $cgc = ReadingsNum($name, 'Current_GridConsumption', 0); @@ -7615,7 +7620,7 @@ sub _flowGraphic { $animation - + @@ -7738,8 +7743,8 @@ END3 $ret .= qq{}; } - ## get consumer list and display it in Graphics - ################################################ + ## Consumer Laufketten + ######################## if ($flowgcons) { $pos_left = $consumer_start * 2; my $pos_left_start = 0; @@ -7766,14 +7771,14 @@ END3 my $consumer_style = 'flowg inactive_out'; $consumer_style = 'flowg active_out' if($p > $defpopercent); - - my $chain_color = ""; # Farbe der Laufkette des Consumers + my $chain_color = ""; # Farbe der Laufkette des Consumers + if($p > 0.5) { $chain_color = 'style="stroke: #'.substr(Color::pahColor(0,50,100,$p,[0,255,0, 127,255,0, 255,255,0, 255,127,0, 255,0,0]),0,6).';"'; #$chain_color = 'style="stroke: #DF0101;"'; } - $ret .= qq{}; + $ret .= qq{}; # Design Consumer Laufkette $pos_left += ($consDist * 2); $pos_left_start += $distance; @@ -7782,26 +7787,27 @@ END3 ## Angaben Dummy-Verbraucher ############################# - $cc_dummy = sprintf("%.0f",$cc_dummy); ## Textangaben an Grafikelementen ################################### $ret .= qq{$cpv} if ($cpv); - $ret .= qq{$soc %} if ($hasbat); + #$ret .= qq{$soc %} if ($hasbat); + $ret .= qq{$soc %} if ($hasbat); $ret .= qq{$csc} if ($csc && $cpv); $ret .= qq{$cgfi} if ($cgfi); $ret .= qq{$cgc} if ($cgc); $ret .= qq{$batout} if ($batout && $hasbat); $ret .= qq{$batin} if ($batin && $hasbat); - $ret .= qq{$cc}; # Current_Consumption Anlage - $ret .= qq{$cc_dummy} if ($flowgconX && $flowgconPower); # Current_Consumption Dummy + $ret .= qq{$cc}; # Current_Consumption Anlage + #$ret .= qq{$cc_dummy} if ($flowgconX && $flowgconPower); # Current_Consumption Dummy + $ret .= qq{$cc_dummy} if ($flowgconX && $flowgconPower); # Current_Consumption Dummy - ## Anzeigedetails auswählen - ############################ + ## Consumer Anzeige + ##################### if ($flowgcons) { - $pos_left = ($consumer_start * 2) - 50; + $pos_left = ($consumer_start * 2) - 50; # -XX -> Start Lage Consumer Beschriftung for my $c2 (@consumers) { $currentPower = sprintf("%.1f", ReadingsNum($name, "consumer${c2}_currentPower", 0)); @@ -7812,8 +7818,8 @@ END3 $currentPower = isConsumerPhysOn($hash, $c2) ? 'on' : 'off'; } - $ret .= qq{$currentPower} if ($flowgconPower); # Current_Consumption Consumer - $ret .= qq{$consumerTime} if ($flowgconTime); # Consumer Restlaufzeit + $ret .= qq{$currentPower} if ($flowgconPower); # Lage Consumer Consumption + $ret .= qq{$consumerTime} if ($flowgconTime); # Lage Consumer Restlaufzeit $pos_left += ($consDist * 2); } }