diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index c2cce9b9d..eda913bb9 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -160,6 +160,8 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.58.1" => "08.09.2025 edit comref, ctrlBatSocManagementXX->safetyMargin: Separate specification of surcharges for calculation of load ". + "clearance and performance optimization ", "1.58.0" => "06.09.2025 _batChargeMgmt: Code change and new loading feature with Reading Battery_ChargeOptTargetPower_XX ". "ctrlBatSocManagementXX: new parameter safetyMargin ". "edit Comref, delete obsolete Attr graphicBeamHeightLevelX, new parameter setupBatteryDevXX->pinreduced ", @@ -7505,7 +7507,7 @@ sub _attrBatSocManagement { ## no critic "not used" lcSlot => { comp => '((?:[01]\d|2[0-3]):[0-5]\d-(?:[01]\d|2[0-3]):[0-5]\d)', must => 0, act => 1 }, careCycle => { comp => '\d+', must => 0, act => 0 }, loadAbort => { comp => '(?:100|[1-9]?[0-9]):\d+(?::(?:100|[1-9]?[0-9]))?', must => 0, act => 0 }, - safetyMargin => { comp => '(?:100|[1-9]?\d)', must => 0, act => 0 }, + safetyMargin => { comp => '(?:100|[1-9]?\d)(?::(?:100|[1-9]?\d))?', must => 0, act => 0 }, }; my ($a, $h) = parseParams ($aVal); @@ -11509,16 +11511,18 @@ sub __parseAttrBatSoc { my $name = shift; my $cgbt = shift // return; - my ($pa,$ph) = parseParams ($cgbt); + my ($pa,$ph) = parseParams ($cgbt); + my ($urMargin, $otpMargin) = split ':', $ph->{safetyMargin}; my $parsed = { - lowSoc => $ph->{lowSoc}, - upSoc => $ph->{upSoC}, - maxSoc => $ph->{maxSoC} // MAXSOCDEF, # optional (default: MAXSOCDEF) - careCycle => $ph->{careCycle} // CARECYCLEDEF, # Ladungszyklus (Maintenance) für maxSoC in Tagen - lcslot => $ph->{lcSlot}, - loadAbort => $ph->{loadAbort}, - safetyMargin => $ph->{safetyMargin}, + lowSoc => $ph->{lowSoc}, + upSoc => $ph->{upSoC}, + maxSoc => $ph->{maxSoC} // MAXSOCDEF, # optional (default: MAXSOCDEF) + careCycle => $ph->{careCycle} // CARECYCLEDEF, # Ladungszyklus (Maintenance) für maxSoC in Tagen + lcslot => $ph->{lcSlot}, + loadAbort => $ph->{loadAbort}, + urMargin => $urMargin, + otpMargin => $otpMargin, }; return $parsed; @@ -11631,22 +11635,23 @@ sub _batChargeMgmt { my $sf = __batCapShareFactor ($hash, $bn); # Anteilsfaktor der Batterie XX Kapazität an Gesamtkapazität my $lowSoc = 0; my $loadAbort = ''; - my ($lcslot, $safetyMargin); + my ($lcslot, $urMargin, $otpMargin); if ($cgbt) { my $parsed = __parseAttrBatSoc ($name, $cgbt); $lowSoc = $parsed->{lowSoc} // 0; $lcslot = $parsed->{lcslot}; $loadAbort = $parsed->{loadAbort}; - $safetyMargin = $parsed->{safetyMargin}; + $urMargin = $parsed->{urMargin}; + $otpMargin = $parsed->{otpMargin}; } - my $margin = defined $safetyMargin ? $safetyMargin : SFTYMARGIN_50; # Sicherheitszuschlag (%) + my $margin = defined $urMargin ? $urMargin : SFTYMARGIN_50; # Sicherheitszuschlag (%) ## generelle Ladeabbruchbedingung evaluieren ############################################## if ($loadAbort) { - my ($abortSoc, $abortpin, $releaseSoC) = split ':', $loadAbort; # Ladeabbruch Forum: https://forum.fhem.de/index.php?msg=1342556 + my ($abortSoc, $abortpin, $releaseSoC) = split ':', $loadAbort; # Ladeabbruch Forum: https://forum.fhem.de/index.php?msg=1342556 $releaseSoC //= $abortSoc; @@ -11815,7 +11820,7 @@ sub _batChargeMgmt { $hsurp->{$hod}{$bn}{whneedmanaged} = $whneed; # benötigte Ladeenergie Batterie x gemäß Ladesteuerung $hsurp->{$hod}{$bn}{socwh} = $socwh; $hsurp->{$hod}{$bn}{batinstcap} = $batinstcap; - $hsurp->{$hod}{$bn}{safetyMargin} = $safetyMargin; # Sicherheitszuschlag für Berechnungen + $hsurp->{$hod}{$bn}{otpMargin} = $otpMargin; # Sicherheitszuschlag für Berechnungen } # prognostizierten Daten in pvHistory speichern @@ -11914,8 +11919,8 @@ sub __batChargeOptTargetPower { my $needraw = $sphrs ? $runwhneed / $sphrs : $runwhneed; # Ladeleistung initial - my $safetyMargin = $hsurp->{$shod}{$sbn}{safetyMargin}; - my $margin = defined $safetyMargin ? $safetyMargin : SFTYMARGIN_20; + my $otpMargin = $hsurp->{$shod}{$sbn}{otpMargin}; + my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20; $needraw *= 1 + ($margin / 100); # Sicherheitsaufschlag if ($spls - $needraw > $fipl) { # Einspeiselimit berücksichtigen @@ -11939,9 +11944,9 @@ sub __batChargeOptTargetPower { if ($paref->{debug} =~ /batteryManagement/) { for my $k (sort { $a <=> $b } keys %{$hsurp}) { for my $bat (sort @batteries) { - my $ssoc = $hsurp->{$k}{$bat}{runwh} // '-'; - my $safetyMargin = $hsurp->{$k}{$bat}{safetyMargin}; - my $margin = defined $safetyMargin ? $safetyMargin : SFTYMARGIN_20; + my $ssoc = $hsurp->{$k}{$bat}{runwh} // '-'; + my $otpMargin = $hsurp->{$k}{$bat}{otpMargin}; + my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20; Log3 ($name, 1, "$name DEBUG> Bat $bat ChargeOTP - hod: $k, Start SoC: $ssoc Wh, Surplus: $hsurp->{$k}{spswh} Wh, OptTargetPower: $hsurp->{$k}{$bat}{pneedmin} W, safety: $margin %"); } } @@ -26684,34 +26689,34 @@ to ensure that the system configuration is correct. :<Threshold> (Wh) - From this energy consumption per hour, the consumption is considered valid. Optional specification (default: 0) swoncond Condition that must also be fulfilled in order to switch on the consumer (optional). The scheduled cycle is started. - Device:Reading - the device/reading combination returns the check value $VALUE (‘undef’ is ignored) + Device:Reading - the device/reading combination returns the check value $VALUE ('undef' is ignored) The check can be formulated as a regular expression or as Perl code enclosed in {..}: - Regex - regular expression for checking $VALUE which must return ‘true’ if successful + Regex - regular expression for checking $VALUE which must return 'true' if successful {Perl-Code} - the Perl code enclosed in {..} must not contain any spaces. The variable $VALUE can be evaluated by the code. - The return value must be ‘true’ if successful. + The return value must be 'true' if successful. swoffcond priority condition to switch off the consumer (optional). The scheduled cycle is stopped. - Device:Reading - the device/reading combination returns the check value $VALUE (‘undef’ is ignored) + Device:Reading - the device/reading combination returns the check value $VALUE ('undef' is ignored) The check can be formulated as a regular expression or as Perl code enclosed in {..}: - Regex - regular expression for checking $VALUE which must return ‘true’ if successful + Regex - regular expression for checking $VALUE which must return 'true' if successful {Perl-Code} - the Perl code enclosed in {..} must not contain any spaces. The variable $VALUE can be evaluated by the code. - The return value must be ‘true’ if successful. + The return value must be 'true' if successful. surpmeth The possible options define the procedure for determining the PV surplus. (optional) default - the PV surplus is read directly from the 'Current_Surplus' reading. (default) - median[_2..20] - The median of the last PV surplus values is used. The optional specification ‘_XX’ uses the last XX measured values. - average[_2..20] - is the average of 20 PV surplus values. The optional specification ‘_XX’ uses the last XX measured values. + median[_2..20] - The median of the last PV surplus values is used. The optional specification '_XX' uses the last XX measured values. + average[_2..20] - is the average of 20 PV surplus values. The optional specification '_XX' uses the last XX measured values. <Device>:<Reading> - Device/Reading combination that provides a numerical PV surplus value in Watt determined or calculated by the user. spignorecond Condition to ignore a missing PV surplus (optional). If the condition is fulfilled, the load is switched on according to the planning even if there is no PV surplus at the time. CAUTION: Using both keys spignorecond and interruptable can lead to undesired behaviour! - Device:Reading - the device/reading combination returns the check value $VALUE (‘undef’ is ignored) + Device:Reading - the device/reading combination returns the check value $VALUE ('undef' is ignored) The check can be formulated as a regular expression or as Perl code enclosed in {..}: - Regex - regular expression for checking $VALUE which must return ‘true’ if successful + Regex - regular expression for checking $VALUE which must return 'true' if successful {Perl-Code} - the Perl code enclosed in {..} must not contain any spaces. The variable $VALUE can be evaluated by the code. - The return value must be ‘true’ if successful. + The return value must be 'true' if successful. interruptable defines the possible interruption options for the consumer after it has been started (optional). Options can be: 0 - Load is not temporarily switched off even if the PV surplus falls below the required energy (default) @@ -26774,7 +26779,7 @@ to ensure that the system configuration is correct.
  • ctrlBatSocManagementXX lowSoc=<Value> upSoC=<Value> [maxSoC=<Value>] [careCycle=<Value>] [lcSlot=<hh:mm>-<hh:mm>] [loadAbort=<SoC1>:<MinPwr>:<SoC2>] - [safetyMargin=<Value>]

    + [safetyMargin=<Value>[:<Value>]]

    If a battery device (setupBatteryDevXX) is installed, this attribute activates the battery SoC and charge management for this battery device.
    @@ -26782,8 +26787,8 @@ to ensure that the system configuration is correct. The Battery_OptimumTargetSoC_XX reading contains the optimum minimum SoC calculated by the module.
    The Battery_ChargeRequest_XX reading is set to '1' if the current SoC has fallen below the minimum SoC.
    In this case, the battery should be forcibly charged, possibly with mains power.
    - The reading Battery_ChargeUnrestricted_XX indicates whether the battery should be charged at full power without - restriction (1), or not at all, or only when the
    + The reading Battery_ChargeUnrestricted_XX contains the charging release, i.e. whether the battery should be charged at + full power without restriction (1), or not at all, or only when the
    feed-in limit (see plantControl->feedinPowerLimit) is exceeded (0). If you want to charge the battery continuously throughout the day, Reading Battery_ChargeOptTargetPower_XX provides optimized charging power for battery control.
    @@ -26805,8 +26810,8 @@ to ensure that the system configuration is correct. in order to balance the charge in the storage network. The specification is optional (<= 100, default: 95) - careCycle Maximum interval in days that may occur between two states of charge - of at least 'maxSoC'. The specification is optional (default: 20) + careCycle Maximum interval in days between two charge states of at least 'maxSoC' that should not be + exceeded if possible. The specification is optional (default: 20) lcSlot A daily time window is defined in which the charging control of the module should be active for this battery. Outside the time window, the battery charge is released @@ -26819,10 +26824,13 @@ to ensure that the system configuration is correct. If the current SoC falls below the specified SoC2, the Battery_ChargeAbort_XX=0 is set. If SoC2 is not specified, SoC2=SoC1. - safetyMargin When calculating the load clearance and optimized load capacity, a safety margin is added - to the predicted load requirement. - Not like the default, you can use this parameter to set a percentage. - Value: 0..100 (Integer) + safetyMargin When calculating the load clearance and optimized load capacity, safety margins are taken + into account in the predicted load requirements. + Deviating from the default, this parameter can be used to specify individual safety margins + separately for calculating load clearance and optimized load capacity. + The first value is the surcharge used to calculate the load release, the second value is the + surcharge used to calculate the optimized load capacity. Both values are percentages. + Value: 0..100[:0..100] (integers) @@ -27154,7 +27162,7 @@ to ensure that the system configuration is correct. - + @@ -27204,7 +27212,7 @@ to ensure that the system configuration is correct. - + @@ -29448,7 +29456,7 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden.
  • ctrlBatSocManagementXX lowSoc=<Wert> upSoC=<Wert> [maxSoC=<Wert>] [careCycle=<Wert>] [lcSlot=<hh:mm>-<hh:mm>] [loadAbort=<SoC1>:<MinPwr>:<SoC2>] - [safetyMargin=<Wert>]

    + [safetyMargin=<Wert>[:<Wert>]]

    Sofern ein Batterie Device (setupBatteryDevXX) installiert ist, aktiviert dieses Attribut das Batterie SoC- und Lade-Management für dieses Batteriegerät.
    @@ -29457,8 +29465,8 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden. Das Reading Battery_ChargeRequest_XX wird auf '1' gesetzt, wenn der aktuelle SoC unter den Mindest-SoC gefallen ist.
    In diesem Fall sollte die Batterie, unter Umständen mit Netzstrom, zwangsgeladen werden.
    - Das Reading Battery_ChargeUnrestricted_XX gibt an, ob die Batterie uneingeschränkt mit voller Leistung (1), oder - nicht bzw. nur bei Überschreitung des
    + Das Reading Battery_ChargeUnrestricted_XX enthält die Ladefreigabe, d.h. ob die Batterie uneingeschränkt mit voller + Leistung (1), oder nicht bzw. nur bei Überschreitung des
    Einspeiselimits (siehe plantControl->feedinPowerLimit) geladen werden sollte (0). Möchte man die Batterie kontinuierlich über den gesamten Tag aufladen, wird im Reading Battery_ChargeOptTargetPower_XX eine optimierte Ladeleistung zur Batteriesteuerung bereitgestellt.
    @@ -29481,7 +29489,7 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden.
  • - + @@ -29494,10 +29502,13 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden. - + - - + + + + +
    beamHeightlevel The bar height for each level of the bar chart can be specified.
    The specification for a layer consists of the layer number (1..X), a ‘:’ followed by a positive integer > 0.
    The specification for a layer consists of the layer number (1..X), a ':' followed by a positive integer > 0.
    The numerical value is used as a normalization factor in the height calculation.
    Further levels are specified separated by commas (see example).
    <Level>:<Integer> - normalization factor (default: 200)
    The strings for each level are separated by commas (see example).
    <Level>:lin - linear scaling (default)
    <Level>:log - logarithmic scaling
    <Ebene>:staple - The bars are ‘stacked’, with the secondary bar displayed above the primary bar.
    <Ebene>:staple - The bars are 'stacked', with the secondary bar displayed above the primary bar.
    showDiff Additional numerical display of the difference '<primary bar content> - <secondary bar content>'.
    The specification for each level consists of the level number (1..X), a ':' followed by the position 'top' or 'bottom'.
    Die Angabe ist optional (<= 100, default: 95)
    careCycle maximaler Abstand in Tagen, der zwischen zwei Ladungszuständen von mindestens 'maxSoC'
    auftreten darf. Die Angabe ist optional (default: 20)
    möglichst nicht überschritten werden soll. Die Angabe ist optional (default: 20)
    lcSlot Es wird ein tägliches Zeitfenster festgelegt, in dem die Ladesteuerung des Moduls für diese
    Batterie aktiv sein soll. Außerhalb des Zeitfensters wird die Batterieladung mit voller
    Fällt der aktuelle SoC wieder unter den SoC2, wird Battery_ChargeAbort_XX=0 gesetzt.
    Ist SoC2 nicht angegeben, gilt SoC2=SoC1.
    safetyMargin Bei der Berechnung der Ladefreigabe und optimierten Ladeleistung wird ein Sicherheitszuschlag
    safetyMargin Bei der Berechnung der Ladefreigabe und optimierten Ladeleistung werden Sicherheitszuschläge
    auf den prognostizierten Ladungsbedarf berücksichtigt.
    Abweichend vom Default kann mit diesem Parameter ein Prozentwert angegeben werden.
    Wert: 0..100 (Ganzzahl)
    Abweichend vom Default können mit diesem Parameter individuelle Sicherheitszuschläge getrennt
    für die Berechnung der Ladefreigabe und optimierten Ladeleistung angegeben werden.
    Der erste Wert ist der Zuschlag bei der Berechnung der Ladefreigabe, der zweite Wert der
    Zuschlag bei der Berechnung der optimierten Ladeleistung. Beide Angaben sind Prozentwerte.
    Wert: 0..100[:0..100] (Ganzzahlen)
    diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index f563065c6..eda913bb9 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -160,6 +160,8 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.58.1" => "08.09.2025 edit comref, ctrlBatSocManagementXX->safetyMargin: Separate specification of surcharges for calculation of load ". + "clearance and performance optimization ", "1.58.0" => "06.09.2025 _batChargeMgmt: Code change and new loading feature with Reading Battery_ChargeOptTargetPower_XX ". "ctrlBatSocManagementXX: new parameter safetyMargin ". "edit Comref, delete obsolete Attr graphicBeamHeightLevelX, new parameter setupBatteryDevXX->pinreduced ", @@ -7505,7 +7507,7 @@ sub _attrBatSocManagement { ## no critic "not used" lcSlot => { comp => '((?:[01]\d|2[0-3]):[0-5]\d-(?:[01]\d|2[0-3]):[0-5]\d)', must => 0, act => 1 }, careCycle => { comp => '\d+', must => 0, act => 0 }, loadAbort => { comp => '(?:100|[1-9]?[0-9]):\d+(?::(?:100|[1-9]?[0-9]))?', must => 0, act => 0 }, - safetyMargin => { comp => '(?:100|[1-9]?\d)', must => 0, act => 0 }, + safetyMargin => { comp => '(?:100|[1-9]?\d)(?::(?:100|[1-9]?\d))?', must => 0, act => 0 }, }; my ($a, $h) = parseParams ($aVal); @@ -11509,16 +11511,18 @@ sub __parseAttrBatSoc { my $name = shift; my $cgbt = shift // return; - my ($pa,$ph) = parseParams ($cgbt); + my ($pa,$ph) = parseParams ($cgbt); + my ($urMargin, $otpMargin) = split ':', $ph->{safetyMargin}; my $parsed = { - lowSoc => $ph->{lowSoc}, - upSoc => $ph->{upSoC}, - maxSoc => $ph->{maxSoC} // MAXSOCDEF, # optional (default: MAXSOCDEF) - careCycle => $ph->{careCycle} // CARECYCLEDEF, # Ladungszyklus (Maintenance) für maxSoC in Tagen - lcslot => $ph->{lcSlot}, - loadAbort => $ph->{loadAbort}, - safetyMargin => $ph->{safetyMargin}, + lowSoc => $ph->{lowSoc}, + upSoc => $ph->{upSoC}, + maxSoc => $ph->{maxSoC} // MAXSOCDEF, # optional (default: MAXSOCDEF) + careCycle => $ph->{careCycle} // CARECYCLEDEF, # Ladungszyklus (Maintenance) für maxSoC in Tagen + lcslot => $ph->{lcSlot}, + loadAbort => $ph->{loadAbort}, + urMargin => $urMargin, + otpMargin => $otpMargin, }; return $parsed; @@ -11631,22 +11635,23 @@ sub _batChargeMgmt { my $sf = __batCapShareFactor ($hash, $bn); # Anteilsfaktor der Batterie XX Kapazität an Gesamtkapazität my $lowSoc = 0; my $loadAbort = ''; - my ($lcslot, $safetyMargin); + my ($lcslot, $urMargin, $otpMargin); if ($cgbt) { my $parsed = __parseAttrBatSoc ($name, $cgbt); $lowSoc = $parsed->{lowSoc} // 0; $lcslot = $parsed->{lcslot}; $loadAbort = $parsed->{loadAbort}; - $safetyMargin = $parsed->{safetyMargin}; + $urMargin = $parsed->{urMargin}; + $otpMargin = $parsed->{otpMargin}; } - my $margin = defined $safetyMargin ? $safetyMargin : SFTYMARGIN_50; # Sicherheitszuschlag (%) + my $margin = defined $urMargin ? $urMargin : SFTYMARGIN_50; # Sicherheitszuschlag (%) ## generelle Ladeabbruchbedingung evaluieren ############################################## if ($loadAbort) { - my ($abortSoc, $abortpin, $releaseSoC) = split ':', $loadAbort; # Ladeabbruch Forum: https://forum.fhem.de/index.php?msg=1342556 + my ($abortSoc, $abortpin, $releaseSoC) = split ':', $loadAbort; # Ladeabbruch Forum: https://forum.fhem.de/index.php?msg=1342556 $releaseSoC //= $abortSoc; @@ -11679,9 +11684,9 @@ sub _batChargeMgmt { if ($paref->{debug} =~ /batteryManagement/) { Log3 ($name, 1, "$name DEBUG> Bat $bn ChargeMgmt - General load termination condition: $labortCond"); Log3 ($name, 1, "$name DEBUG> Bat $bn ChargeMgmt - control time Slot - Slot start: $lcstart, Slot end: $lcend"); - Log3 ($name, 1, "$name DEBUG> Bat $bn ChargeMgmt - used safety margin: $margin %"); Log3 ($name, 1, "$name DEBUG> Bat $bn ChargeMgmt - Installed Battery capacity: $batinstcap Wh, Percentage of total capacity: ".(sprintf "%.1f", $sf*100)." %"); Log3 ($name, 1, "$name DEBUG> Bat $bn ChargeMgmt - The PV generation, consumption and surplus listed below are based on the battery's share of total installed capacity!"); + Log3 ($name, 1, "$name DEBUG> Bat $bn ChargeUR - used safety margin: $margin %"); } ## Auswertung für jede kommende Stunde @@ -11815,7 +11820,7 @@ sub _batChargeMgmt { $hsurp->{$hod}{$bn}{whneedmanaged} = $whneed; # benötigte Ladeenergie Batterie x gemäß Ladesteuerung $hsurp->{$hod}{$bn}{socwh} = $socwh; $hsurp->{$hod}{$bn}{batinstcap} = $batinstcap; - $hsurp->{$hod}{$bn}{safetyMargin} = $safetyMargin; # Sicherheitszuschlag für Berechnungen + $hsurp->{$hod}{$bn}{otpMargin} = $otpMargin; # Sicherheitszuschlag für Berechnungen } # prognostizierten Daten in pvHistory speichern @@ -11914,8 +11919,8 @@ sub __batChargeOptTargetPower { my $needraw = $sphrs ? $runwhneed / $sphrs : $runwhneed; # Ladeleistung initial - my $safetyMargin = $hsurp->{$shod}{$sbn}{safetyMargin}; - my $margin = defined $safetyMargin ? $safetyMargin : SFTYMARGIN_20; + my $otpMargin = $hsurp->{$shod}{$sbn}{otpMargin}; + my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20; $needraw *= 1 + ($margin / 100); # Sicherheitsaufschlag if ($spls - $needraw > $fipl) { # Einspeiselimit berücksichtigen @@ -11939,9 +11944,9 @@ sub __batChargeOptTargetPower { if ($paref->{debug} =~ /batteryManagement/) { for my $k (sort { $a <=> $b } keys %{$hsurp}) { for my $bat (sort @batteries) { - my $ssoc = $hsurp->{$k}{$bat}{runwh} // '-'; - my $safetyMargin = $hsurp->{$k}{$bat}{safetyMargin}; - my $margin = defined $safetyMargin ? $safetyMargin : SFTYMARGIN_20; + my $ssoc = $hsurp->{$k}{$bat}{runwh} // '-'; + my $otpMargin = $hsurp->{$k}{$bat}{otpMargin}; + my $margin = defined $otpMargin ? $otpMargin : SFTYMARGIN_20; Log3 ($name, 1, "$name DEBUG> Bat $bat ChargeOTP - hod: $k, Start SoC: $ssoc Wh, Surplus: $hsurp->{$k}{spswh} Wh, OptTargetPower: $hsurp->{$k}{$bat}{pneedmin} W, safety: $margin %"); } } @@ -26684,34 +26689,34 @@ to ensure that the system configuration is correct. :<Threshold> (Wh) - From this energy consumption per hour, the consumption is considered valid. Optional specification (default: 0) swoncond Condition that must also be fulfilled in order to switch on the consumer (optional). The scheduled cycle is started. - Device:Reading - the device/reading combination returns the check value $VALUE (‘undef’ is ignored) + Device:Reading - the device/reading combination returns the check value $VALUE ('undef' is ignored) The check can be formulated as a regular expression or as Perl code enclosed in {..}: - Regex - regular expression for checking $VALUE which must return ‘true’ if successful + Regex - regular expression for checking $VALUE which must return 'true' if successful {Perl-Code} - the Perl code enclosed in {..} must not contain any spaces. The variable $VALUE can be evaluated by the code. - The return value must be ‘true’ if successful. + The return value must be 'true' if successful. swoffcond priority condition to switch off the consumer (optional). The scheduled cycle is stopped. - Device:Reading - the device/reading combination returns the check value $VALUE (‘undef’ is ignored) + Device:Reading - the device/reading combination returns the check value $VALUE ('undef' is ignored) The check can be formulated as a regular expression or as Perl code enclosed in {..}: - Regex - regular expression for checking $VALUE which must return ‘true’ if successful + Regex - regular expression for checking $VALUE which must return 'true' if successful {Perl-Code} - the Perl code enclosed in {..} must not contain any spaces. The variable $VALUE can be evaluated by the code. - The return value must be ‘true’ if successful. + The return value must be 'true' if successful. surpmeth The possible options define the procedure for determining the PV surplus. (optional) default - the PV surplus is read directly from the 'Current_Surplus' reading. (default) - median[_2..20] - The median of the last PV surplus values is used. The optional specification ‘_XX’ uses the last XX measured values. - average[_2..20] - is the average of 20 PV surplus values. The optional specification ‘_XX’ uses the last XX measured values. + median[_2..20] - The median of the last PV surplus values is used. The optional specification '_XX' uses the last XX measured values. + average[_2..20] - is the average of 20 PV surplus values. The optional specification '_XX' uses the last XX measured values. <Device>:<Reading> - Device/Reading combination that provides a numerical PV surplus value in Watt determined or calculated by the user. spignorecond Condition to ignore a missing PV surplus (optional). If the condition is fulfilled, the load is switched on according to the planning even if there is no PV surplus at the time. CAUTION: Using both keys spignorecond and interruptable can lead to undesired behaviour! - Device:Reading - the device/reading combination returns the check value $VALUE (‘undef’ is ignored) + Device:Reading - the device/reading combination returns the check value $VALUE ('undef' is ignored) The check can be formulated as a regular expression or as Perl code enclosed in {..}: - Regex - regular expression for checking $VALUE which must return ‘true’ if successful + Regex - regular expression for checking $VALUE which must return 'true' if successful {Perl-Code} - the Perl code enclosed in {..} must not contain any spaces. The variable $VALUE can be evaluated by the code. - The return value must be ‘true’ if successful. + The return value must be 'true' if successful. interruptable defines the possible interruption options for the consumer after it has been started (optional). Options can be: 0 - Load is not temporarily switched off even if the PV surplus falls below the required energy (default) @@ -26774,7 +26779,7 @@ to ensure that the system configuration is correct.
  • ctrlBatSocManagementXX lowSoc=<Value> upSoC=<Value> [maxSoC=<Value>] [careCycle=<Value>] [lcSlot=<hh:mm>-<hh:mm>] [loadAbort=<SoC1>:<MinPwr>:<SoC2>] - [safetyMargin=<Value>]

    + [safetyMargin=<Value>[:<Value>]]

    If a battery device (setupBatteryDevXX) is installed, this attribute activates the battery SoC and charge management for this battery device.
    @@ -26782,8 +26787,8 @@ to ensure that the system configuration is correct. The Battery_OptimumTargetSoC_XX reading contains the optimum minimum SoC calculated by the module.
    The Battery_ChargeRequest_XX reading is set to '1' if the current SoC has fallen below the minimum SoC.
    In this case, the battery should be forcibly charged, possibly with mains power.
    - The reading Battery_ChargeUnrestricted_XX indicates whether the battery should be charged at full power without - restriction (1), or not at all, or only when the
    + The reading Battery_ChargeUnrestricted_XX contains the charging release, i.e. whether the battery should be charged at + full power without restriction (1), or not at all, or only when the
    feed-in limit (see plantControl->feedinPowerLimit) is exceeded (0). If you want to charge the battery continuously throughout the day, Reading Battery_ChargeOptTargetPower_XX provides optimized charging power for battery control.
    @@ -26805,8 +26810,8 @@ to ensure that the system configuration is correct. in order to balance the charge in the storage network. The specification is optional (<= 100, default: 95) - careCycle Maximum interval in days that may occur between two states of charge - of at least 'maxSoC'. The specification is optional (default: 20) + careCycle Maximum interval in days between two charge states of at least 'maxSoC' that should not be + exceeded if possible. The specification is optional (default: 20) lcSlot A daily time window is defined in which the charging control of the module should be active for this battery. Outside the time window, the battery charge is released @@ -26819,9 +26824,13 @@ to ensure that the system configuration is correct. If the current SoC falls below the specified SoC2, the Battery_ChargeAbort_XX=0 is set. If SoC2 is not specified, SoC2=SoC1. - safetyMargin A safety margin is taken into account when calculating the load clearance and optimized load - capacity. This parameter can be used to specify a value that differs from the default. - Value in percent: 0..100 + safetyMargin When calculating the load clearance and optimized load capacity, safety margins are taken + into account in the predicted load requirements. + Deviating from the default, this parameter can be used to specify individual safety margins + separately for calculating load clearance and optimized load capacity. + The first value is the surcharge used to calculate the load release, the second value is the + surcharge used to calculate the optimized load capacity. Both values are percentages. + Value: 0..100[:0..100] (integers) @@ -27153,7 +27162,7 @@ to ensure that the system configuration is correct. - + @@ -27203,7 +27212,7 @@ to ensure that the system configuration is correct. - + @@ -27254,13 +27263,13 @@ to ensure that the system configuration is correct. - - + + - - + + @@ -27516,7 +27525,7 @@ to ensure that the system configuration is correct. - + @@ -29447,7 +29456,7 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden.
  • ctrlBatSocManagementXX lowSoc=<Wert> upSoC=<Wert> [maxSoC=<Wert>] [careCycle=<Wert>] [lcSlot=<hh:mm>-<hh:mm>] [loadAbort=<SoC1>:<MinPwr>:<SoC2>] - [safetyMargin=<Wert>]

    + [safetyMargin=<Wert>[:<Wert>]]

    Sofern ein Batterie Device (setupBatteryDevXX) installiert ist, aktiviert dieses Attribut das Batterie SoC- und Lade-Management für dieses Batteriegerät.
    @@ -29456,8 +29465,8 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden. Das Reading Battery_ChargeRequest_XX wird auf '1' gesetzt, wenn der aktuelle SoC unter den Mindest-SoC gefallen ist.
    In diesem Fall sollte die Batterie, unter Umständen mit Netzstrom, zwangsgeladen werden.
    - Das Reading Battery_ChargeUnrestricted_XX gibt an, ob die Batterie uneingeschränkt mit voller Leistung (1), oder - nicht bzw. nur bei Überschreitung des
    + Das Reading Battery_ChargeUnrestricted_XX enthält die Ladefreigabe, d.h. ob die Batterie uneingeschränkt mit voller + Leistung (1), oder nicht bzw. nur bei Überschreitung des
    Einspeiselimits (siehe plantControl->feedinPowerLimit) geladen werden sollte (0). Möchte man die Batterie kontinuierlich über den gesamten Tag aufladen, wird im Reading Battery_ChargeOptTargetPower_XX eine optimierte Ladeleistung zur Batteriesteuerung bereitgestellt.
    @@ -29480,7 +29489,7 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden.
  • - + @@ -29493,9 +29502,13 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden. - - - + + + + + + +
    beamHeightlevel The bar height for each level of the bar chart can be specified.
    The specification for a layer consists of the layer number (1..X), a ‘:’ followed by a positive integer > 0.
    The specification for a layer consists of the layer number (1..X), a ':' followed by a positive integer > 0.
    The numerical value is used as a normalization factor in the height calculation.
    Further levels are specified separated by commas (see example).
    <Level>:<Integer> - normalization factor (default: 200)
    The strings for each level are separated by commas (see example).
    <Level>:lin - linear scaling (default)
    <Level>:log - logarithmic scaling
    <Ebene>:staple - The bars are ‘stacked’, with the secondary bar displayed above the primary bar.
    <Ebene>:staple - The bars are 'stacked', with the secondary bar displayed above the primary bar.
    showDiff Additional numerical display of the difference '<primary bar content> - <secondary bar content>'.
    The specification for each level consists of the level number (1..X), a ':' followed by the position 'top' or 'bottom'.
    current&nbsp;Gridconsumption:Current_GridConsumption
    :
    #
    CO&nbsp;until&nbsp;sunset:special_todayConForecastTillSunset
    PV&nbsp;Day&nbsp;after&nbsp;tomorrow:special_dayAfterTomorrowPVforecast
    CO&nbsp;until&nbsp;sunset:special_todayConForecastTillSunset
    PV&nbsp;Day&nbsp;after&nbsp;tomorrow:special_dayAfterTomorrowPVforecast
    :
    :
    #Battery
    in&nbsp;today:special_todayBatIn
    out&nbsp;today:special_todayBatOut
    in&nbsp;today:special_todayBatIn
    out&nbsp;today:special_todayBatOut
    :
    :
    #Settings
    pinreducedThe reduced charging power in watts (optional). The value is set in Reading Battery_ChargeOptTargetPower_XX
    if there is no PV surplus available to adjust the optimal charging power. This means that this
    value can also be applied in the case of forced charging from the public grid.
    poutmax the maximum possible discharge power in watts (optional)
    Die Angabe ist optional (<= 100, default: 95)
    careCycle maximaler Abstand in Tagen, der zwischen zwei Ladungszuständen von mindestens 'maxSoC'
    auftreten darf. Die Angabe ist optional (default: 20)
    möglichst nicht überschritten werden soll. Die Angabe ist optional (default: 20)
    lcSlot Es wird ein tägliches Zeitfenster festgelegt, in dem die Ladesteuerung des Moduls für diese
    Batterie aktiv sein soll. Außerhalb des Zeitfensters wird die Batterieladung mit voller
    Fällt der aktuelle SoC wieder unter den SoC2, wird Battery_ChargeAbort_XX=0 gesetzt.
    Ist SoC2 nicht angegeben, gilt SoC2=SoC1.
    safetyMargin Bei der Berechnung der Ladefreigabe und optimierten Ladeleistung wird ein Sicherheitszuschlag
    berücksichtigt. Abweichend vom Default kann mit diesem Parameter ein Wert angegeben werden.
    Wert in Prozent: 0..100
    safetyMargin Bei der Berechnung der Ladefreigabe und optimierten Ladeleistung werden Sicherheitszuschläge
    auf den prognostizierten Ladungsbedarf berücksichtigt.
    Abweichend vom Default können mit diesem Parameter individuelle Sicherheitszuschläge getrennt
    für die Berechnung der Ladefreigabe und optimierten Ladeleistung angegeben werden.
    Der erste Wert ist der Zuschlag bei der Berechnung der Ladefreigabe, der zweite Wert der
    Zuschlag bei der Berechnung der optimierten Ladeleistung. Beide Angaben sind Prozentwerte.
    Wert: 0..100[:0..100] (Ganzzahlen)