2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

76_SolarForecast: optimize batterymanagement

git-svn-id: https://svn.fhem.de/fhem/trunk@28350 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2024-01-06 23:43:05 +00:00
parent 4dd73fbe0c
commit d029a3d188
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# 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.
- change: 76_SolarForecast: optimize batterymanagement
- change: 93_DbLog: minor change of configCheck
- feature: 76_SolarForecast: externally caused switching of consumers is
detected

View File

@ -155,6 +155,7 @@ BEGIN {
# Versions History intern
my %vNotesIntern = (
"1.6.2" => "07.01.2024 optimize batterymanagement ",
"1.6.1" => "04.01.2024 new sub __setPhysSwState, edit ___setConsumerPlanningState, boost performance of collectAllRegConsumers ".
"CurrentVal ctrunning - Central Task running Statusbit, edit comref ",
"1.6.0" => "22.12.2023 store daily batmaxsoc in pvHistory, new attr ctrlBatSocManagement, reading Battery_OptimumTargetSoC ".
@ -6309,7 +6310,7 @@ sub _batSocTarget {
my $batinstcap = CurrentVal ($hash, 'batinstcap', 0); # installierte Batteriekapazität Wh
my $needcharge = $batinstcap - ($batinstcap / 100 * $batcharge); # vorläufige benötigte Ladeenergie (Wh) bis 100% SOC
my $cancharge = $pvexpect > $needcharge ? $needcharge : $pvexpect; # resultierende benötigte Ladeenergie (Wh)
my $cancharge = $pvexpect > $needcharge ? $pvexpect : $needcharge; # resultierende benötigte Ladeenergie (Wh)
my $cantarget = 100 - ($cancharge / ($batinstcap / 100)); # berechneter möglicher Min SOC nach Berücksichtigung Ladewahrscheinlichkeit
my $newtarget = $cantarget < $target ? $cantarget : $target; # Abgleich möglicher Min SOC gg. berechneten Min SOC