From 9dc7129ad749ee4342e9d3409dba0be3d53ae6a4 Mon Sep 17 00:00:00 2001 From: Patrick Amrhein Date: Mon, 20 May 2024 20:51:54 +0200 Subject: [PATCH] Bugfix: setLimit after iv reboot --- src/plugins/zeroExport/zeroExport.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/zeroExport/zeroExport.h b/src/plugins/zeroExport/zeroExport.h index 97353a6a..ae57b375 100644 --- a/src/plugins/zeroExport/zeroExport.h +++ b/src/plugins/zeroExport/zeroExport.h @@ -485,6 +485,17 @@ class ZeroExport { mLog["i"] = inv; mCfg->groups[group].inverters[inv].waitAck = 0; mLog["wA"] = mCfg->groups[group].inverters[inv].waitAck; + + mCfg->groups[group].inverters[inv].limit = mCfg->groups[group].inverters[inv].powerMin; + iv->powerLimit[0] = static_cast(mCfg->groups[group].inverters[inv].limit * 10.0); + iv->powerLimit[1] = AbsolutNonPersistent; + if (iv->setDevControlRequest(ActivePowerContr)) { + mApp->triggerTickSend(iv->id); + mCfg->groups[group].inverters[inv].waitAck = 60; + mCfg->groups[group].inverters[inv].action = zeroExportAction_t::doNone; + mCfg->groups[group].inverters[inv].actionTimer = 0; + mCfg->groups[group].inverters[inv].actionTimestamp = millis(); + } sendLog(); clearLog(); }