Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed Nov 3, 2024
1 parent 9fe6a30 commit fbd7d1f
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 274 deletions.
1 change: 1 addition & 0 deletions include/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ using PowerMeterHttpSmlConfig = struct POWERMETER_HTTP_SML_CONFIG_T;

struct POWERLIMITER_INVERTER_CONFIG_T {
uint64_t Serial;
bool IsGoverned;
bool IsBehindPowerMeter;
bool IsSolarPowered;
bool UseOverscalingToCompensateShading;
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void ConfigurationClass::serializePowerLimiterConfig(PowerLimiterConfig const& s
JsonObject t = inverters.add<JsonObject>();

t["serial"] = serialStr(s.Serial);
t["is_governed"] = s.IsGoverned;
t["is_behind_power_meter"] = s.IsBehindPowerMeter;
t["is_solar_powered"] = s.IsSolarPowered;
t["use_overscaling_to_compensate_shading"] = s.UseOverscalingToCompensateShading;
Expand Down Expand Up @@ -461,6 +462,7 @@ void ConfigurationClass::deserializePowerLimiterConfig(JsonObject const& source,
JsonObject s = inverters[i];

inv.Serial = serialBin(s["serial"] | String("0")); // 0 marks inverter slot as unused
inv.IsGoverned = s["is_governed"] | false;
inv.IsBehindPowerMeter = s["is_behind_power_meter"] | POWERLIMITER_IS_INVERTER_BEHIND_POWER_METER;
inv.IsSolarPowered = s["is_solar_powered"] | POWERLIMITER_IS_INVERTER_SOLAR_POWERED;
inv.UseOverscalingToCompensateShading = s["use_overscaling_to_compensate_shading"] | POWERLIMITER_USE_OVERSCALING_TO_COMPENSATE_SHADING;
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
"ConfigHintNoBatteryInterface": "SoC-basierte Schwellwerte können nur mit konfigurierter Batteriekommunikationsschnittstelle genutzt werden.",
"General": "Allgemein",
"Enable": "Aktiviert",
"GovernInverter": "Steuere {name}",
"GovernInverter": "Steuere Wechselrichter \"{name}\"",
"VerboseLogging": "@:base.VerboseLogging",
"SolarPassthrough": "Solar-Passthrough",
"EnableSolarPassthrough": "Aktiviere Solar-Passthrough",
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
"ConfigHintNoBatteryInterface": "SoC-based thresholds can only be used if a battery communication interface is configured.",
"General": "General",
"Enable": "Enable",
"GovernInverter": "Govern {name}",
"GovernInverter": "Govern Inverter \"{name}\"",
"VerboseLogging": "@:base.VerboseLogging",
"SolarPassthrough": "Solar-Passthrough",
"EnableSolarPassthrough": "Enable Solar-Passthrough",
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@
"ConfigHintNoBatteryInterface": "SoC-based thresholds can only be used if a battery communication interface is configured.",
"General": "General",
"Enable": "Enable",
"GovernInverter": "Govern {name}",
"GovernInverter": "Govern Inverter \"{name}\"",
"VerboseLogging": "@:base.VerboseLogging",
"SolarPassthrough": "Solar-Passthrough",
"EnableSolarPassthrough": "Enable Solar-Passthrough",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/types/PowerLimiterConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface PowerLimiterMetaData {

export interface PowerLimiterInverterConfig {
serial: string;
is_governed: boolean;
is_behind_power_meter: boolean;
is_solar_powered: boolean;
use_overscaling_to_compensate_shading: boolean;
Expand Down
Loading

0 comments on commit fbd7d1f

Please sign in to comment.