Feature: Added option to set runtime values to zero when inverter becames unreachable

This commit is contained in:
Thomas Basler
2023-09-02 12:22:22 +02:00
parent 4f85d5286d
commit 6127fbe940
13 changed files with 120 additions and 0 deletions

View File

@@ -55,4 +55,9 @@ bool RealTimeRunDataCommand::handleResponse(InverterAbstract* inverter, fragment
void RealTimeRunDataCommand::gotTimeout(InverterAbstract* inverter)
{
inverter->Statistics()->incrementRxFailureCount();
if (inverter->getZeroValuesIfUnreachable() && !inverter->isReachable()) {
Hoymiles.getMessageOutput()->println("Set runtime data to zero");
inverter->Statistics()->zeroRuntimeData();
}
}