Skip to content

Commit

Permalink
Feature: webapp: warn about small lower power limits
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed Dec 2, 2024
1 parent 9534978 commit 2c71dba
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@
"TargetPowerConsumptionHysteresisHint": "Neu berechnetes Limit nur dann an den jeweiligen Inverter senden, wenn es vom zurückgemeldeten Limit um mindestens diesen Betrag abweicht.",
"LowerPowerLimit": "Minimales Leistungslimit",
"LowerPowerLimitHint": "Dieser Wert muss so gewählt werden, dass ein stabiler Betrieb mit diesem Limit möglich ist. Falls der Wechselrichter nur mit einem kleineren Limit betrieben werden könnte, wird er stattdessen in Standby versetzt, falls er batteriebetrieben ist.",
"LowerPowerLimitWarning": "Der gewählte Wert für das minimale Leistungslimit ist kleiner als der empfohlene Mindestwert von {min} W. Beim Betrieb des Wechselrichters mit dem gewählten Wert kann es zum Aufschwingen und zur Selbstabschaltung kommen.",
"BaseLoadLimit": "Grundlast",
"BaseLoadLimitHint": "Relevant beim Betrieb ohne oder beim Ausfall des Stromzählers. Solange es die sonstigen Bedinungen zulassen (insb. Batterieladung), wird diese Leistung auf die Wechselrichter verteilt.",
"TotalUpperPowerLimit": "Maximale Gesamtausgangsleistung",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@
"TargetPowerConsumptionHysteresisHint": "Only send a newly calculated power limit to the respective inverter if the absolute difference to the last reported power limit exceeds this amount.",
"LowerPowerLimit": "Minimum Power Limit",
"LowerPowerLimitHint": "This value must be selected so that stable operation is possible at this limit. If the inverter could only be operated with a lower limit, it is put into standby instead if it is battery-powered.",
"LowerPowerLimitWarning": "The selected value for the minimum power limit is lower than the recommended minimum value of {min} W. If the inverter is operated at the selected value, it may oscillate and shut down automatically.",
"BaseLoadLimit": "Base Load",
"BaseLoadLimitHint": "Relevant for operation without power meter or when the power meter fails. As long as the other conditions allow (battery charge in particular), the inverters are configured to output this amount of power in total.",
"TotalUpperPowerLimit": "Maximum Total Output",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@
"TargetPowerConsumptionHysteresisHint": "Only send a newly calculated power limit to the inverter if the absolute difference to the last reported power limit exceeds this amount.",
"LowerPowerLimit": "Minimum Power Limit",
"LowerPowerLimitHint": "This value must be selected so that stable operation is possible at this limit. If the inverter could only be operated with a lower limit, it is put into standby instead if it is battery-powered.",
"LowerPowerLimitWarning": "The selected value for the minimum power limit is lower than the recommended minimum value of {min} W. If the inverter is operated at the selected value, it may oscillate and shut down automatically.",
"BaseLoadLimit": "Base Load",
"BaseLoadLimitHint": "Relevant for operation without power meter or when the power meter fails. As long as the other conditions allow (in particular battery charge), this limit is set on the inverter.",
"TotalUpperPowerLimit": "Maximum Total Output",
Expand Down
27 changes: 26 additions & 1 deletion webapp/src/views/PowerLimiterAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,23 @@
wide
/>

<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<div
v-if="lowerLimitWarning(powerLimiterConfigList.inverters[idx])"
class="alert alert-warning"
role="alert"
>
{{
$t('powerlimiteradmin.LowerPowerLimitWarning', {
min: getLowerLimitMinimum(powerLimiterConfigList.inverters[idx]),
})
}}
</div>
</div>
</div>

<InputElement
:label="$t('powerlimiteradmin.UpperPowerLimit')"
v-model="powerLimiterConfigList.inverters[idx].upper_power_limit"
Expand Down Expand Up @@ -590,6 +607,14 @@ export default defineComponent({
return inverter.channels > 1;
},
getLowerLimitMinimum(inv: PowerLimiterInverterConfig) {
// we can trust that the inverter info is actually available,
// as we only use this function in a context with a valid serial.
return this.getInverterInfo(inv.serial).channels * 13;
},
lowerLimitWarning(inv: PowerLimiterInverterConfig) {
return inv.lower_power_limit < this.getLowerLimitMinimum(inv);
},
getMetaData() {
this.dataLoading = true;
fetch('/api/powerlimiter/metadata', { headers: authHeader() })
Expand Down Expand Up @@ -627,7 +652,7 @@ export default defineComponent({
newInv.serial = metaInv.serial;
newInv.is_governed = false;
newInv.is_behind_power_meter = true;
newInv.lower_power_limit = 10 * metaInv.channels;
newInv.lower_power_limit = this.getLowerLimitMinimum(newInv);
newInv.upper_power_limit = Math.max(metaInv.max_power, 300);
inverters.push(newInv);
}
Expand Down

0 comments on commit 2c71dba

Please sign in to comment.