76_SolarForecast: opt load if battery load control is deactivated
git-svn-id: https://svn.fhem.de/fhem/trunk@30322 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it
|
# Do not insert empty lines here, update check depends on it
|
||||||
|
- bugfix: 76_SolarForecast: opt load if battery load control is deactivated
|
||||||
- change: 76_SolarForecast: Version 1.58.4
|
- change: 76_SolarForecast: Version 1.58.4
|
||||||
- bugfix: 55_DWD_OpenData: replace for..when structures
|
- bugfix: 55_DWD_OpenData: replace for..when structures
|
||||||
- feature: 76_SolarForecast: Version 1.58.3
|
- feature: 76_SolarForecast: Version 1.58.3
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"1.58.5" => "24.09.2025 __batChargeOptTargetPower: fix if battery load control is deactivated ",
|
||||||
"1.58.4" => "23.09.2025 __batChargeOptTargetPower: user a better surplus value, excess based on average removed & some other code optimization ",
|
"1.58.4" => "23.09.2025 __batChargeOptTargetPower: user a better surplus value, excess based on average removed & some other code optimization ",
|
||||||
"1.58.3" => "17.09.2025 __batChargeOptTargetPower: minor code change, consider bpinmax & lcintime ",
|
"1.58.3" => "17.09.2025 __batChargeOptTargetPower: minor code change, consider bpinmax & lcintime ",
|
||||||
"1.58.2" => "11.09.2025 __batChargeOptTargetPower: a lot of Code improvements, Attr flowGraphicControl->shiftx: unrestrict possible values ",
|
"1.58.2" => "11.09.2025 __batChargeOptTargetPower: a lot of Code improvements, Attr flowGraphicControl->shiftx: unrestrict possible values ",
|
||||||
@@ -1090,8 +1091,8 @@ my %htitles = (
|
|||||||
DE => qq{SoC Prognose} },
|
DE => qq{SoC Prognose} },
|
||||||
socbaths => { EN => qq{SoC at the end of the hour},
|
socbaths => { EN => qq{SoC at the end of the hour},
|
||||||
DE => qq{SoC am Ende der Stunde} },
|
DE => qq{SoC am Ende der Stunde} },
|
||||||
lcready => { EN => qq{Charge management ready},
|
lcenable => { EN => qq{Charge management enabled},
|
||||||
DE => qq{Lademanagement bereit} },
|
DE => qq{Lademanagement aktiviert} },
|
||||||
ldstratg => { EN => qq{Loading strategy},
|
ldstratg => { EN => qq{Loading strategy},
|
||||||
DE => qq{Ladestrategie} },
|
DE => qq{Ladestrategie} },
|
||||||
ldreleas => { EN => qq{load release},
|
ldreleas => { EN => qq{load release},
|
||||||
@@ -11921,6 +11922,12 @@ sub __batChargeOptTargetPower {
|
|||||||
for my $sbn (sort @batteries) { # jede Batterie
|
for my $sbn (sort @batteries) { # jede Batterie
|
||||||
if (!$hsurp->{$shod}{$sbn}{lcintime}) { # Ladesteuerung nicht "In Time"
|
if (!$hsurp->{$shod}{$sbn}{lcintime}) { # Ladesteuerung nicht "In Time"
|
||||||
$hsurp->{$shod}{$sbn}{pneedmin} = $hsurp->{$shod}{$sbn}{bpinmax};
|
$hsurp->{$shod}{$sbn}{pneedmin} = $hsurp->{$shod}{$sbn}{bpinmax};
|
||||||
|
|
||||||
|
if ($hsurp->{$shod}{nhr} eq '00') {
|
||||||
|
$otp->{$sbn}{target} = $hsurp->{$shod}{$sbn}{bpinmax};
|
||||||
|
storeReading ('Battery_ChargeOptTargetPower_'.$sbn, $hsurp->{$shod}{$sbn}{bpinmax}.' W');
|
||||||
|
}
|
||||||
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11937,8 +11944,13 @@ sub __batChargeOptTargetPower {
|
|||||||
my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20;
|
my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20;
|
||||||
|
|
||||||
if (!$spls) { # auf kleine Sollladeleistung setzen wenn kein Überschuß
|
if (!$spls) { # auf kleine Sollladeleistung setzen wenn kein Überschuß
|
||||||
|
$hsurp->{$shod}{$sbn}{pneedmin} = $bpinreduced;
|
||||||
|
|
||||||
|
if ($hsurp->{$shod}{nhr} eq '00') {
|
||||||
$otp->{$sbn}{target} = $bpinreduced;
|
$otp->{$sbn}{target} = $bpinreduced;
|
||||||
storeReading ('Battery_ChargeOptTargetPower_'.$sbn, $bpinreduced.' W');
|
storeReading ('Battery_ChargeOptTargetPower_'.$sbn, $bpinreduced.' W');
|
||||||
|
}
|
||||||
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19184,7 +19196,7 @@ sub __substituteIcon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pretxt .= "\n".$htitles{lcready}{$lang}.": ".(defined $msg2 ? ($msg2 == 1 ? $htitles{simplyes}{$lang} : $htitles{simpleno}{$lang}) : '-');
|
$pretxt .= "\n".$htitles{lcenable}{$lang}.": ".(defined $msg2 ? ($msg2 == 1 ? $htitles{simplyes}{$lang} : $htitles{simpleno}{$lang}) : '-');
|
||||||
$pretxt .= "\n".$htitles{ldstratg}{$lang}.": ".(defined $msg2 ? $msg3 : '-');
|
$pretxt .= "\n".$htitles{ldstratg}{$lang}.": ".(defined $msg2 ? $msg3 : '-');
|
||||||
|
|
||||||
if (defined $pcurr) { # aktueller Zustand
|
if (defined $pcurr) { # aktueller Zustand
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"1.58.5" => "24.09.2025 __batChargeOptTargetPower: fix if battery load control is deactivated ",
|
||||||
"1.58.4" => "23.09.2025 __batChargeOptTargetPower: user a better surplus value, excess based on average removed & some other code optimization ",
|
"1.58.4" => "23.09.2025 __batChargeOptTargetPower: user a better surplus value, excess based on average removed & some other code optimization ",
|
||||||
"1.58.3" => "17.09.2025 __batChargeOptTargetPower: minor code change, consider bpinmax & lcintime ",
|
"1.58.3" => "17.09.2025 __batChargeOptTargetPower: minor code change, consider bpinmax & lcintime ",
|
||||||
"1.58.2" => "11.09.2025 __batChargeOptTargetPower: a lot of Code improvements, Attr flowGraphicControl->shiftx: unrestrict possible values ",
|
"1.58.2" => "11.09.2025 __batChargeOptTargetPower: a lot of Code improvements, Attr flowGraphicControl->shiftx: unrestrict possible values ",
|
||||||
@@ -1090,8 +1091,8 @@ my %htitles = (
|
|||||||
DE => qq{SoC Prognose} },
|
DE => qq{SoC Prognose} },
|
||||||
socbaths => { EN => qq{SoC at the end of the hour},
|
socbaths => { EN => qq{SoC at the end of the hour},
|
||||||
DE => qq{SoC am Ende der Stunde} },
|
DE => qq{SoC am Ende der Stunde} },
|
||||||
lcready => { EN => qq{Charge management ready},
|
lcenable => { EN => qq{Charge management enabled},
|
||||||
DE => qq{Lademanagement bereit} },
|
DE => qq{Lademanagement aktiviert} },
|
||||||
ldstratg => { EN => qq{Loading strategy},
|
ldstratg => { EN => qq{Loading strategy},
|
||||||
DE => qq{Ladestrategie} },
|
DE => qq{Ladestrategie} },
|
||||||
ldreleas => { EN => qq{load release},
|
ldreleas => { EN => qq{load release},
|
||||||
@@ -11921,6 +11922,12 @@ sub __batChargeOptTargetPower {
|
|||||||
for my $sbn (sort @batteries) { # jede Batterie
|
for my $sbn (sort @batteries) { # jede Batterie
|
||||||
if (!$hsurp->{$shod}{$sbn}{lcintime}) { # Ladesteuerung nicht "In Time"
|
if (!$hsurp->{$shod}{$sbn}{lcintime}) { # Ladesteuerung nicht "In Time"
|
||||||
$hsurp->{$shod}{$sbn}{pneedmin} = $hsurp->{$shod}{$sbn}{bpinmax};
|
$hsurp->{$shod}{$sbn}{pneedmin} = $hsurp->{$shod}{$sbn}{bpinmax};
|
||||||
|
|
||||||
|
if ($hsurp->{$shod}{nhr} eq '00') {
|
||||||
|
$otp->{$sbn}{target} = $hsurp->{$shod}{$sbn}{bpinmax};
|
||||||
|
storeReading ('Battery_ChargeOptTargetPower_'.$sbn, $hsurp->{$shod}{$sbn}{bpinmax}.' W');
|
||||||
|
}
|
||||||
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11937,8 +11944,13 @@ sub __batChargeOptTargetPower {
|
|||||||
my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20;
|
my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20;
|
||||||
|
|
||||||
if (!$spls) { # auf kleine Sollladeleistung setzen wenn kein Überschuß
|
if (!$spls) { # auf kleine Sollladeleistung setzen wenn kein Überschuß
|
||||||
|
$hsurp->{$shod}{$sbn}{pneedmin} = $bpinreduced;
|
||||||
|
|
||||||
|
if ($hsurp->{$shod}{nhr} eq '00') {
|
||||||
$otp->{$sbn}{target} = $bpinreduced;
|
$otp->{$sbn}{target} = $bpinreduced;
|
||||||
storeReading ('Battery_ChargeOptTargetPower_'.$sbn, $bpinreduced.' W');
|
storeReading ('Battery_ChargeOptTargetPower_'.$sbn, $bpinreduced.' W');
|
||||||
|
}
|
||||||
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11960,7 +11972,7 @@ sub __batChargeOptTargetPower {
|
|||||||
$hsurp->{$newshod}{$sbn}{fcnextwh} = $runwh + $hsurp->{$shod}{$sbn}{pneedmin} if(defined $hsurp->{$newshod});
|
$hsurp->{$newshod}{$sbn}{fcnextwh} = $runwh + $hsurp->{$shod}{$sbn}{pneedmin} if(defined $hsurp->{$newshod});
|
||||||
|
|
||||||
if ($hsurp->{$shod}{nhr} eq '00') {
|
if ($hsurp->{$shod}{nhr} eq '00') {
|
||||||
my $target = max (BatteryVal ($name, $sbn, 'bpinreduced', 0), $hsurp->{$shod}{$sbn}{pneedmin});
|
my $target = max ($bpinreduced, $hsurp->{$shod}{$sbn}{pneedmin});
|
||||||
|
|
||||||
if (NexthoursVal ($name, 'NextHour00', 'DoN', 0)) {
|
if (NexthoursVal ($name, 'NextHour00', 'DoN', 0)) {
|
||||||
$target *= 1 + ($margin / 100); # 2. Sicherheitsaufschlag
|
$target *= 1 + ($margin / 100); # 2. Sicherheitsaufschlag
|
||||||
@@ -19184,7 +19196,7 @@ sub __substituteIcon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pretxt .= "\n".$htitles{lcready}{$lang}.": ".(defined $msg2 ? ($msg2 == 1 ? $htitles{simplyes}{$lang} : $htitles{simpleno}{$lang}) : '-');
|
$pretxt .= "\n".$htitles{lcenable}{$lang}.": ".(defined $msg2 ? ($msg2 == 1 ? $htitles{simplyes}{$lang} : $htitles{simpleno}{$lang}) : '-');
|
||||||
$pretxt .= "\n".$htitles{ldstratg}{$lang}.": ".(defined $msg2 ? $msg3 : '-');
|
$pretxt .= "\n".$htitles{ldstratg}{$lang}.": ".(defined $msg2 ? $msg3 : '-');
|
||||||
|
|
||||||
if (defined $pcurr) { # aktueller Zustand
|
if (defined $pcurr) { # aktueller Zustand
|
||||||
|
|||||||
Reference in New Issue
Block a user