diff --git a/src/PowerLimiterSolarInverter.cpp b/src/PowerLimiterSolarInverter.cpp index 0f1c811b8..4baef515f 100644 --- a/src/PowerLimiterSolarInverter.cpp +++ b/src/PowerLimiterSolarInverter.cpp @@ -27,6 +27,14 @@ uint16_t PowerLimiterSolarInverter::getMaxIncreaseWatts() const return maxTotalIncrease; } + // when the current limit is less than 15% of the max power of the inverter + // the output will not match the limit as the inverters are not able to work + // with those low limits. In this case we assume that the inverter is able to + // provide more power and we return the maximum possible increase. + // thanks spcqike for creating a table that can be found here: + // https://github.com/hoylabs/OpenDTU-OnBattery/issues/1087#issuecomment-2216787552 + if (getCurrentLimitWatts() < getInverterMaxPowerWatts() * 0.15) { return maxTotalIncrease; } + auto pStats = _spInverter->Statistics(); std::vector dcMppts = _spInverter->getMppts(); size_t dcTotalMppts = dcMppts.size(); @@ -37,7 +45,7 @@ uint16_t PowerLimiterSolarInverter::getMaxIncreaseWatts() const auto expectedPowerPercentage = 0.97; // use the scaling threshold as the expected power percentage if lower, - // but only when overscalingis enabled and the inverter does not support PDL + // but only when overscaling is enabled and the inverter does not support PDL if (_config.UseOverscaling && !_spInverter->supportsPowerDistributionLogic()) { expectedPowerPercentage = std::min(expectedPowerPercentage, static_cast(_config.ScalingThreshold) / 100.0); }