Skip to content

Commit ffa790e

Browse files
author
schoebli93
committed
added case when battery is dead (below 1%)
1 parent c6e84dd commit ffa790e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

powerOptimizerEFHStaeppel/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
const short WaterHeatPumpThresholdPower = 1500;
1919

2020
const ushort BatteryLevelThreshold = 950;
21+
const ushort BatteryLevelLowerThreshold = 10;
2122

2223
// Inverter IP Address
2324
const string IPAddress = "192.168.1.125"; // WiNet Espressif 192.168.1.125, LAN connector 192.168.1.172
@@ -105,7 +106,7 @@
105106
//logger.Log($"Load 1 Adjustment Mode as hex value:{loadAdjustmentModeHexAsString}");
106107

107108

108-
if (!waterHeatPumpEnabled && (DCPower - (WaterHeatPumpThresholdPower + loadPower) > 0) && (exportPower > 0) && (batteryLevel > BatteryLevelThreshold))
109+
if (!waterHeatPumpEnabled && (DCPower - (WaterHeatPumpThresholdPower + loadPower) > 0) && (exportPower > 0) && ((batteryLevel > BatteryLevelThreshold) || (BatteryLevelLowerThreshold < 10)))
109110
{
110111
waterHeatPumpEnabled = true;
111112
client.WriteSingleRegister(unitIdentifier, Load1Address, Load1ON);

0 commit comments

Comments
 (0)