From 1acefd8b8c493b07fc23e9cacf33e3b26adad6e4 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Tue, 5 Sep 2023 22:09:16 +0200 Subject: [PATCH] Fix: Do not resend fetch limit request if the last one failed Due to side effects it is possible that the inverter receives the request but the DTU does not receive the answer. In this case the DTU would resend the request but the inverter would generate a event log entry (DTU command failed) because it received the message twice. --- lib/Hoymiles/src/Hoymiles.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Hoymiles/src/Hoymiles.cpp b/lib/Hoymiles/src/Hoymiles.cpp index 62f346c0..f579106f 100644 --- a/lib/Hoymiles/src/Hoymiles.cpp +++ b/lib/Hoymiles/src/Hoymiles.cpp @@ -64,8 +64,7 @@ void HoymilesClass::loop() iv->sendAlarmLogRequest(force); // Fetch limit - if ((iv->SystemConfigPara()->getLastLimitRequestSuccess() == CMD_NOK) - || ((millis() - iv->SystemConfigPara()->getLastUpdateRequest() > HOY_SYSTEM_CONFIG_PARA_POLL_INTERVAL) + if (((millis() - iv->SystemConfigPara()->getLastUpdateRequest() > HOY_SYSTEM_CONFIG_PARA_POLL_INTERVAL) && (millis() - iv->SystemConfigPara()->getLastUpdateCommand() > HOY_SYSTEM_CONFIG_PARA_POLL_MIN_DURATION))) { _messageOutput->println("Request SystemConfigPara"); iv->sendSystemConfigParaRequest();