diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm
index f007ce64b..752490894 100644
--- a/fhem/contrib/DS_Starter/76_SolarForecast.pm
+++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm
@@ -159,7 +159,8 @@ BEGIN {
# Versions History intern
my %vNotesIntern = (
"1.18.0" => "07.05.2024 add secondary level of the bar chart, new attr graphicBeam3Content, graphicBeam4Content ".
- "graphicBeam3Color, graphicBeam4Color, graphicBeam3FontColor, graphicBeam4FontColor ",
+ "graphicBeam3Color, graphicBeam4Color, graphicBeam3FontColor, graphicBeam4FontColor ".
+ "value consumption available for attr graphicBeamXContent ",
"1.17.12"=> "06.05.2024 attr ctrlInterval: immediate impact when set ",
"1.17.11"=> "04.05.2024 correction in commandref, delete attr affectMaxDayVariance ",
"1.17.10"=> "19.04.2024 calcTodayPVdeviation: avoid Illegal division by zero, Forum: https://forum.fhem.de/index.php?msg=1311121 ",
@@ -1141,10 +1142,10 @@ sub Initialize {
"graphicBeam2Color:colorpicker,RGB ".
"graphicBeam3Color:colorpicker,RGB ".
"graphicBeam4Color:colorpicker,RGB ".
- "graphicBeam1Content:pvForecast,pvReal,gridconsumption,consumptionForecast ".
- "graphicBeam2Content:pvForecast,pvReal,gridconsumption,consumptionForecast ".
- "graphicBeam3Content:pvForecast,pvReal,gridconsumption,consumptionForecast ".
- "graphicBeam4Content:pvForecast,pvReal,gridconsumption,consumptionForecast ".
+ "graphicBeam1Content:pvForecast,pvReal,gridconsumption,consumption,consumptionForecast ".
+ "graphicBeam2Content:pvForecast,pvReal,gridconsumption,consumption,consumptionForecast ".
+ "graphicBeam3Content:pvForecast,pvReal,gridconsumption,consumption,consumptionForecast ".
+ "graphicBeam4Content:pvForecast,pvReal,gridconsumption,consumption,consumptionForecast ".
"graphicBeam1FontColor:colorpicker,RGB ".
"graphicBeam2FontColor:colorpicker,RGB ".
"graphicBeam3FontColor:colorpicker,RGB ".
@@ -11188,10 +11189,8 @@ sub entryGraphic {
################
$ret .= _beamGraphic ($paref);
- my $secbeam = 1;
-
if ($paref->{beam3cont} || $paref->{beam4cont}) { # Balkengrafik 3. und 4. Ebene
- my %hfcg2;
+ my %hfcg2;
$paref->{beam1cont} = $paref->{beam3cont};
$paref->{beam2cont} = $paref->{beam4cont};
@@ -12537,7 +12536,7 @@ sub _beamGraphicFirstHour {
my $stt = NexthoursVal ($hash, "NextHour00", "starttime", '0000-00-00 24');
my ($year,$month,$day_str,$thishour) = $stt =~ m/(\d{4})-(\d{2})-(\d{2})\s(\d{2})/x;
- my ($val1,$val2,$val3,$val4) = (0,0,0,0);
+ my ($val1,$val2,$val3,$val4,$val5) = (0,0,0,0,0);
$thishour++;
@@ -12550,7 +12549,7 @@ sub _beamGraphicFirstHour {
$hfcg->{0}{day} = $day;
$hfcg->{0}{mktime} = fhemTimeLocal(0,0,$thishour,$day,int($month)-1,$year-1900); # gleich die Unix Zeit dazu holen
- if ($offset) {
+ #if ($offset) {
$hfcg->{0}{time} += $offset;
if ($hfcg->{0}{time} < 0) {
@@ -12566,32 +12565,36 @@ sub _beamGraphicFirstHour {
$val2 = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'pvrl', 0);
$val3 = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'gcons', 0);
$val4 = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'confc', 0);
+ $val5 = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'con', 0);
$hfcg->{0}{weather} = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'weatherid', 999);
$hfcg->{0}{wcc} = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'wcc', '-');
$hfcg->{0}{sunalt} = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'sunalt', '-');
$hfcg->{0}{sunaz} = HistoryVal ($hash, $hfcg->{0}{day_str}, $hfcg->{0}{time_str}, 'sunaz', '-');
- }
- else {
- $val1 = CircularVal ($hash, $hfcg->{0}{time_str}, 'pvfc', 0);
- $val2 = CircularVal ($hash, $hfcg->{0}{time_str}, 'pvrl', 0);
- $val3 = CircularVal ($hash, $hfcg->{0}{time_str}, 'gcons', 0);
- $val4 = CircularVal ($hash, $hfcg->{0}{time_str}, 'confc', 0);
+ #}
+ #else {
+ # $val1 = CircularVal ($hash, $hfcg->{0}{time_str}, 'pvfc', 0);
+ # $val2 = CircularVal ($hash, $hfcg->{0}{time_str}, 'pvrl', 0);
+ # $val3 = CircularVal ($hash, $hfcg->{0}{time_str}, 'gcons', 0);
+ # $val4 = CircularVal ($hash, $hfcg->{0}{time_str}, 'confc', 0);
+ # $val5 = CircularVal ($hash, $hfcg->{0}{time_str}, 'con', 0); # Wert con fehlt noch in pvCircular!
- $hfcg->{0}{weather} = CircularVal ($hash, $hfcg->{0}{time_str}, 'weatherid', 999);
- #$val4 = (ReadingsVal($name,"ThisHour_IsConsumptionRecommended",'no') eq 'yes' ) ? $icon : 999;
- }
+ # $hfcg->{0}{weather} = CircularVal ($hash, $hfcg->{0}{time_str}, 'weatherid', 999);
+ # #$val4 = (ReadingsVal($name,"ThisHour_IsConsumptionRecommended",'no') eq 'yes' ) ? $icon : 999;
+ #}
$hfcg->{0}{time_str} = sprintf('%02d', $hfcg->{0}{time}-1).$hourstyle;
- $hfcg->{0}{beam1} = ($beam1cont eq 'pvForecast') ? $val1 :
- ($beam1cont eq 'pvReal') ? $val2 :
- ($beam1cont eq 'gridconsumption') ? $val3 :
- ($beam1cont eq 'consumptionForecast') ? $val4 :
+ $hfcg->{0}{beam1} = ($beam1cont eq 'pvForecast') ? $val1 :
+ ($beam1cont eq 'pvReal') ? $val2 :
+ ($beam1cont eq 'gridconsumption') ? $val3 :
+ ($beam1cont eq 'consumptionForecast') ? $val4 :
+ ($beam1cont eq 'consumption') ? $val5 :
undef;
- $hfcg->{0}{beam2} = ($beam2cont eq 'pvForecast') ? $val1 :
- ($beam2cont eq 'pvReal') ? $val2 :
- ($beam2cont eq 'gridconsumption') ? $val3 :
- ($beam2cont eq 'consumptionForecast') ? $val4 :
+ $hfcg->{0}{beam2} = ($beam2cont eq 'pvForecast') ? $val1 :
+ ($beam2cont eq 'pvReal') ? $val2 :
+ ($beam2cont eq 'gridconsumption') ? $val3 :
+ ($beam2cont eq 'consumptionForecast') ? $val4 :
+ ($beam2cont eq 'consumption') ? $val5 :
undef;
$hfcg->{0}{beam1} //= 0;
@@ -12617,18 +12620,15 @@ sub _beamGraphicRemainingHours {
$maxVal //= $hfcg->{0}{beam1}; # Startwert wenn kein Wert bereits via attr vorgegeben ist
- my ($val1,$val2,$val3,$val4);
+ my ($val1,$val2,$val3,$val4,$val5);
my $maxCon = $hfcg->{0}{beam1};
my $maxDif = $hfcg->{0}{diff}; # für Typ diff
my $minDif = $hfcg->{0}{diff}; # für Typ diff
for my $i (1..($maxhours*2)-1) { # doppelte Anzahl berechnen my $val1 = 0;
- $val2 = 0;
- $val3 = 0;
- $val4 = 0;
-
- $hfcg->{$i}{time} = $hfcg->{0}{time} + $i;
+ ($val1,$val2,$val3,$val4,$val5) = (0,0,0,0,0);
+ $hfcg->{$i}{time} = $hfcg->{0}{time} + $i;
while ($hfcg->{$i}{time} > 24) {
$hfcg->{$i}{time} -= 24; # wird bis zu 2x durchlaufen
@@ -12649,6 +12649,7 @@ sub _beamGraphicRemainingHours {
$val2 = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'pvrl', 0);
$val3 = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'gcons', 0);
$val4 = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'confc', 0);
+ $val5 = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'con', 0);
$hfcg->{$i}{weather} = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'weatherid', 999);
$hfcg->{$i}{wcc} = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'wcc', '-');
@@ -12674,15 +12675,17 @@ sub _beamGraphicRemainingHours {
}
$hfcg->{$i}{time_str} = sprintf('%02d', $hfcg->{$i}{time}-1).$hourstyle;
- $hfcg->{$i}{beam1} = ($beam1cont eq 'pvForecast') ? $val1 :
- ($beam1cont eq 'pvReal') ? $val2 :
- ($beam1cont eq 'gridconsumption') ? $val3 :
- ($beam1cont eq 'consumptionForecast') ? $val4 :
+ $hfcg->{$i}{beam1} = ($beam1cont eq 'pvForecast') ? $val1 :
+ ($beam1cont eq 'pvReal') ? $val2 :
+ ($beam1cont eq 'gridconsumption') ? $val3 :
+ ($beam1cont eq 'consumptionForecast') ? $val4 :
+ ($beam1cont eq 'consumption') ? $val5 :
undef;
- $hfcg->{$i}{beam2} = ($beam2cont eq 'pvForecast') ? $val1 :
- ($beam2cont eq 'pvReal') ? $val2 :
- ($beam2cont eq 'gridconsumption') ? $val3 :
- ($beam2cont eq 'consumptionForecast') ? $val4 :
+ $hfcg->{$i}{beam2} = ($beam2cont eq 'pvForecast') ? $val1 :
+ ($beam2cont eq 'pvReal') ? $val2 :
+ ($beam2cont eq 'gridconsumption') ? $val3 :
+ ($beam2cont eq 'consumptionForecast') ? $val4 :
+ ($beam2cont eq 'consumption') ? $val5 :
undef;
$hfcg->{$i}{beam1} //= 0;
@@ -19646,8 +19649,7 @@ to ensure that the system configuration is correct.
The bar charts are available in two levels.
Level 1 is preset by default. The content is determined by the attributes graphicBeam1Content and
graphicBeam2Content.
- Level 2 of the bar charts can be activated by setting the attributes graphicBeam3Content and
- graphicBeam4Content.
+ Level 2 can be activated by setting the attributes graphicBeam3Content and graphicBeam4Content.
The attributes graphicBeam1Content and graphicBeam3Content represent the primary beams, the attributes
graphicBeam2Content and graphicBeam4Content attributes represent the secondary beams of the
respective level.
@@ -19657,13 +19659,14 @@ to ensure that the system configuration is correct.