Skip to content

Commit 256c03d

Browse files
committed
Feature: DPL: make standby configurable for smart-buffer-powered inverters
Due to issues with some smart-buffers that will randomly reboot when the conencted inverter is not consuming any power we need to allow users to set smart-buffer-powered inverters to stay active at the lower limit instead of going into standby.
1 parent 7d354c7 commit 256c03d

File tree

8 files changed

+23
-4
lines changed

8 files changed

+23
-4
lines changed

include/Configuration.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ struct POWERLIMITER_INVERTER_CONFIG_T {
148148
bool IsGoverned;
149149
bool IsBehindPowerMeter;
150150
bool UseOverscaling;
151+
bool AllowStandby;
151152
uint16_t LowerPowerLimit;
152153
uint16_t UpperPowerLimit;
153154

include/defaults.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
#define POWERLIMITER_BATTERY_ALWAYS_USE_AT_NIGHT false
132132
#define POWERLIMITER_IS_INVERTER_BEHIND_POWER_METER true
133133
#define POWERLIMITER_USE_OVERSCALING false
134+
#define POWERLIMITER_ALLOW_STANDBY true
134135
#define POWERLIMITER_INVERTER_CHANNEL_ID 0
135136
#define POWERLIMITER_TARGET_POWER_CONSUMPTION 0
136137
#define POWERLIMITER_TARGET_POWER_CONSUMPTION_HYSTERESIS 0
@@ -190,4 +191,4 @@
190191
#define GRIDCHARGER_HUAWEI_OFFLINE_CURRENT 0.0
191192
#define GRIDCHARGER_HUAWEI_INPUT_CURRENT_LIMIT 0.0
192193
#define GRIDCHARGER_HUAWEI_FAN_ONLINE_FULL_SPEED false
193-
#define GRIDCHARGER_HUAWEI_FAN_OFFLINE_FULL_SPEED false
194+
#define GRIDCHARGER_HUAWEI_FAN_OFFLINE_FULL_SPEED false

src/Configuration.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ void ConfigurationClass::serializePowerLimiterConfig(PowerLimiterConfig const& s
222222
t["is_behind_power_meter"] = s.IsBehindPowerMeter;
223223
t["power_source"] = s.PowerSource;
224224
t["use_overscaling_to_compensate_shading"] = s.UseOverscaling;
225+
t["allow_standby"] = s.AllowStandby;
225226
t["lower_power_limit"] = s.LowerPowerLimit;
226227
t["upper_power_limit"] = s.UpperPowerLimit;
227228
}
@@ -639,6 +640,7 @@ void ConfigurationClass::deserializePowerLimiterConfig(JsonObject const& source,
639640
inv.IsBehindPowerMeter = s["is_behind_power_meter"] | POWERLIMITER_IS_INVERTER_BEHIND_POWER_METER;
640641
inv.PowerSource = s["power_source"] | PowerLimiterInverterConfig::InverterPowerSource::Battery;
641642
inv.UseOverscaling = s["use_overscaling_to_compensate_shading"] | POWERLIMITER_USE_OVERSCALING;
643+
inv.AllowStandby = s["allow_standby"] | POWERLIMITER_ALLOW_STANDBY;
642644
inv.LowerPowerLimit = s["lower_power_limit"] | POWERLIMITER_LOWER_POWER_LIMIT;
643645
inv.UpperPowerLimit = s["upper_power_limit"] | POWERLIMITER_UPPER_POWER_LIMIT;
644646
}

src/PowerLimiterSmartBufferInverter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ uint16_t PowerLimiterSmartBufferInverter::getMaxReductionWatts(bool allowStandby
99

1010
if (!isProducing()) { return 0; }
1111

12-
if (allowStandby) { return getCurrentOutputAcWatts(); }
12+
if (allowStandby && _config.AllowStandby) { return getCurrentOutputAcWatts(); }
1313

1414
if (getCurrentOutputAcWatts() <= _config.LowerPowerLimit) { return 0; }
1515

@@ -61,7 +61,7 @@ uint16_t PowerLimiterSmartBufferInverter::applyReduction(uint16_t reduction, boo
6161

6262
auto low = std::min(getCurrentLimitWatts(), getCurrentOutputAcWatts());
6363
if (low <= _config.LowerPowerLimit) {
64-
if (allowStandby) {
64+
if (allowStandby && _config.AllowStandby) {
6565
standby();
6666
return std::min(reduction, getCurrentOutputAcWatts());
6767
}
@@ -81,7 +81,7 @@ uint16_t PowerLimiterSmartBufferInverter::applyReduction(uint16_t reduction, boo
8181
return reduction;
8282
}
8383

84-
if (allowStandby) {
84+
if (allowStandby && _config.AllowStandby) {
8585
standby();
8686
return std::min(reduction, getCurrentOutputAcWatts());
8787
}

webapp/src/locales/de.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@
725725
"TotalUpperPowerLimitHint": "Die Wechselrichter werden so eingestellt, dass sie in Summe höchstens diese Leistung erbringen.",
726726
"UpperPowerLimit": "Maximales Leistungslimit",
727727
"UpperPowerLimitHint": "Der Wechselrichter wird stets so eingestellt, dass höchstens diese Ausgangsleistung erreicht wird. Dieser Wert muss so gewählt werden, dass die Strombelastbarkeit der AC-Anschlussleitungen eingehalten wird.",
728+
"AllowStandby": "Standby erlauben",
729+
"AllowStandbyHint": "Erlaubt dem Wechselrichter in Standby zu gehen, wenn das berechnete Leistungslimit unter dem minimalen Leistungslimit liegt.",
728730
"SocThresholds": "Batterie State of Charge (SoC) Schwellwerte",
729731
"IgnoreSoc": "Nur Spannungs-Schwellwerte nutzen",
730732
"IgnoreSocHint": "Falls aktiviert werden nur die Spannungs-Schwellwerte berücksichtigt. Deaktiviere diesen Schalter, um Batterie State of Charge (SoC) Schwellwerte zu konfigurieren (nicht empfohlen, da der SoC-Wert häufig ungenau ist).",

webapp/src/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@
725725
"TotalUpperPowerLimitHint": "The inverters are configured to output this maximum amount of power in total.",
726726
"UpperPowerLimit": "Maximum Power Limit",
727727
"UpperPowerLimitHint": "The inverter is always set such that no more than this output power is achieved. This value must be selected to comply with the current carrying capacity of the AC connection cables.",
728+
"AllowStandby": "Allow Standby",
729+
"AllowStandbyHint": "Allow the inverter to go into standby if the calculated power limit is below the minimum power limit.",
728730
"SocThresholds": "Battery State of Charge (SoC) Thresholds",
729731
"IgnoreSoc": "Use Voltage Thresholds Only",
730732
"IgnoreSocHint": "When enabled, only voltage thresholds are considered. Disable this switch to configure and use battery State of Charge (SoC) thresholds (not recommended as the SoC value is often inaccurate).",

webapp/src/types/PowerLimiterConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export interface PowerLimiterInverterConfig {
2828
is_behind_power_meter: boolean;
2929
power_source: number;
3030
use_overscaling_to_compensate_shading: boolean;
31+
allow_standby: boolean;
3132
lower_power_limit: number;
3233
upper_power_limit: number;
3334
}

webapp/src/views/PowerLimiterAdminView.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@
161161
</div>
162162
</div>
163163

164+
<InputElement
165+
:label="$t('powerlimiteradmin.AllowStandby')"
166+
:tooltip="$t('powerlimiteradmin.AllowStandbyHint')"
167+
v-if="powerLimiterConfigList.inverters[idx].power_source == 2"
168+
v-model="powerLimiterConfigList.inverters[idx].allow_standby"
169+
type="checkbox"
170+
wide
171+
/>
172+
164173
<InputElement
165174
v-if="
166175
powerLimiterConfigList.inverters[idx].power_source != 0 &&
@@ -726,6 +735,7 @@ export default defineComponent({
726735
newInv.upper_power_limit = Math.max(metaInv.max_power, 300);
727736
newInv.power_source = 0; // battery
728737
newInv.use_overscaling_to_compensate_shading = false;
738+
newInv.allow_standby = true;
729739
inverters.push(newInv);
730740
}
731741

0 commit comments

Comments
 (0)