Skip to content

Commit

Permalink
Feature: DPL: keep inverter running if solar powered
Browse files Browse the repository at this point in the history
avoid shutting down the inverter at all if the calculated power limit
falls below the lower power limit or if the power meter value is
outdated. do this only if the inverter is setup to be solar powered.
  • Loading branch information
schlimmchen committed Mar 9, 2024
1 parent 91f8f61 commit 80edbec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/PowerLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,15 @@ bool PowerLimiterClass::shutdown(PowerLimiterClass::Status status)
_shutdownPending = true;

_oTargetPowerState = false;
_oTargetPowerLimitWatts = Configuration.get().PowerLimiter.LowerPowerLimit;

auto const& config = Configuration.get();
if ( (Status::PowerMeterTimeout == status ||
Status::CalculatedLimitBelowMinLimit == status)
&& config.PowerLimiter.IsInverterSolarPowered) {
_oTargetPowerState = true;
}

_oTargetPowerLimitWatts = config.PowerLimiter.LowerPowerLimit;
return updateInverter();
}

Expand Down

0 comments on commit 80edbec

Please sign in to comment.