76_SolarForecast: Version 1.59.6
git-svn-id: https://svn.fhem.de/fhem/trunk@30420 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -160,8 +160,9 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
"1.59.6" => "19.10.2025 ___ownSpecGetFWwidget: handling of line breaks in attributes & can hamdle a key=value pair separateley ".
|
"1.59.6" => "20.10.2025 ___ownSpecGetFWwidget: handling of line breaks in attributes & can hamdle a key=value pair separateley ".
|
||||||
"Width of a text field in graphicHeaderOwnspec fixed to 10 ",
|
"Width of a text field in graphicHeaderOwnspec fixed to 10 ".
|
||||||
|
"__batChargeOptTargetPower: use an average for the charging power if optPower set and charging target are not achievable ",
|
||||||
"1.59.5" => "15.10.2025 new sub ___batAdjustPowerByMargin: implement optPower Safety margin decreasing proportionally to the linear surplus ".
|
"1.59.5" => "15.10.2025 new sub ___batAdjustPowerByMargin: implement optPower Safety margin decreasing proportionally to the linear surplus ".
|
||||||
"new Reading Battery_TargetAchievable_XX, _batSocTarget: minor code change ",
|
"new Reading Battery_TargetAchievable_XX, _batSocTarget: minor code change ",
|
||||||
"1.59.4" => "14.10.2025 new subs, ctrlBatSocManagementXX: new key loadTarget, replace __batCapShareFactor by __batDeficitShareFactor ".
|
"1.59.4" => "14.10.2025 new subs, ctrlBatSocManagementXX: new key loadTarget, replace __batCapShareFactor by __batDeficitShareFactor ".
|
||||||
@@ -11699,6 +11700,9 @@ sub _batChargeMgmt {
|
|||||||
my $gfeedin = CurrentVal ($name, 'gridfeedin', 0); # aktuelle Netzeinspeisung
|
my $gfeedin = CurrentVal ($name, 'gridfeedin', 0); # aktuelle Netzeinspeisung
|
||||||
my $inplim = 0;
|
my $inplim = 0;
|
||||||
|
|
||||||
|
my $tdaysset = CurrentVal ($name, 'sunsetTodayTs', $t); # Timestamp Sonneuntergang am aktuellen Tag
|
||||||
|
my $hs2sunset = sprintf "%.2f", ($tdaysset - $t); # Rest-Stunden bis Sonnenuntergang
|
||||||
|
|
||||||
my $hsurp = {}; # Hashreferenz Überschuß
|
my $hsurp = {}; # Hashreferenz Überschuß
|
||||||
my $hsoc = {}; # Hashreferenz Prognose-SOC über alle Batterien
|
my $hsoc = {}; # Hashreferenz Prognose-SOC über alle Batterien
|
||||||
my $trans = {}; # Referenz Übertrags-Hash
|
my $trans = {}; # Referenz Übertrags-Hash
|
||||||
@@ -11998,7 +12002,9 @@ sub _batChargeMgmt {
|
|||||||
#################################################################
|
#################################################################
|
||||||
for my $lfd (0..max (0, keys %{$hsurp})) {
|
for my $lfd (0..max (0, keys %{$hsurp})) {
|
||||||
$paref->{hsurp} = $hsurp->{$lfd};
|
$paref->{hsurp} = $hsurp->{$lfd};
|
||||||
my ($hopt, $otp) = __batChargeOptTargetPower ($paref, $lfd, $minute, $trans);
|
|
||||||
|
my ($hopt, $otp) = __batChargeOptTargetPower ($paref, $lfd, $minute, $trans, $hs2sunset);
|
||||||
|
|
||||||
delete $paref->{hsurp};
|
delete $paref->{hsurp};
|
||||||
|
|
||||||
## Debuglog OTP
|
## Debuglog OTP
|
||||||
@@ -12113,6 +12119,7 @@ sub __batChargeOptTargetPower {
|
|||||||
my $lfd = shift; # laufender Tag (1..X)
|
my $lfd = shift; # laufender Tag (1..X)
|
||||||
my $minute = shift;
|
my $minute = shift;
|
||||||
my $trans = shift; # Übertrags-Hash Referenz
|
my $trans = shift; # Übertrags-Hash Referenz
|
||||||
|
my $hs2sunset = shift;
|
||||||
|
|
||||||
my $name = $paref->{name};
|
my $name = $paref->{name};
|
||||||
my $hsurp = $paref->{hsurp}; # Hashref Überschußhash
|
my $hsurp = $paref->{hsurp}; # Hashref Überschußhash
|
||||||
@@ -12204,7 +12211,8 @@ sub __batChargeOptTargetPower {
|
|||||||
|
|
||||||
$needraw = $bpinmax if(!$hsurp->{$hod}{$sbn}{lcintime});
|
$needraw = $bpinmax if(!$hsurp->{$hod}{$sbn}{lcintime});
|
||||||
$needraw = max ($needraw, $bpinreduced); # Mindestladeleistung bpinreduced sicherstellen
|
$needraw = max ($needraw, $bpinreduced); # Mindestladeleistung bpinreduced sicherstellen
|
||||||
my $pneedmin = $needraw * (1 + $otpMargin / 100); # initialer Sicherheitsaufschlag
|
|
||||||
|
my $pneedmin = $needraw * (1 + $otpMargin / 100); # optPower: initialer Sicherheitsaufschlag
|
||||||
|
|
||||||
if ($strategy eq 'smartPower') {
|
if ($strategy eq 'smartPower') {
|
||||||
$pneedmin = ___batAdjustPowerByMargin ($name, $needraw, $bpinmax, $runwhneed, $otpMargin); # Sicherheitsaufschlag abfallend proportional zum linearen Überschuss
|
$pneedmin = ___batAdjustPowerByMargin ($name, $needraw, $bpinmax, $runwhneed, $otpMargin); # Sicherheitsaufschlag abfallend proportional zum linearen Überschuss
|
||||||
@@ -12228,6 +12236,7 @@ sub __batChargeOptTargetPower {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { # Tagesziel nicht erreichbar: Aufschlag potenziert (zweifach wirksam)
|
else { # Tagesziel nicht erreichbar: Aufschlag potenziert (zweifach wirksam)
|
||||||
|
$target = $runwhneed > 0 && $hs2sunset > 0 ? $runwhneed / $hs2sunset : 0;
|
||||||
$target *= (1 + $otpMargin / 100) ** 2;
|
$target *= (1 + $otpMargin / 100) ** 2;
|
||||||
|
|
||||||
if ($strategy eq 'smartPower') { # smartPower: maximale Ladeleistung erzwingen
|
if ($strategy eq 'smartPower') { # smartPower: maximale Ladeleistung erzwingen
|
||||||
@@ -16898,7 +16907,7 @@ sub __createOwnSpec {
|
|||||||
my ($h, $v, $u);
|
my ($h, $v, $u);
|
||||||
|
|
||||||
for (my $k = 0 ; $k < $vinr; $k++) {
|
for (my $k = 0 ; $k < $vinr; $k++) {
|
||||||
($h->{$k}{label}, $h->{$k}{elm}) = split ":", $vals[$col] if($vals[$col]); # Label und darzustellendes Element
|
($h->{$k}{label}, $h->{$k}{elm}) = $vals[$col] =~ /^(.*):(.*)$/ if($vals[$col]); # Label und darzustellendes Element am LETZTEN : trennen
|
||||||
|
|
||||||
$h->{$k}{elm} //= '';
|
$h->{$k}{elm} //= '';
|
||||||
my ($elm, $dev) = split "@", $h->{$k}{elm}; # evtl. anderes Devices
|
my ($elm, $dev) = split "@", $h->{$k}{elm}; # evtl. anderes Devices
|
||||||
|
|||||||
Reference in New Issue
Block a user