diff --git a/src/WebApi_ws_live.cpp b/src/WebApi_ws_live.cpp index 1756a5fe..4a88d165 100644 --- a/src/WebApi_ws_live.cpp +++ b/src/WebApi_ws_live.cpp @@ -67,6 +67,12 @@ void WebApiWsLiveClass::loop() addField(root, i, inv, c, FLD_IRR); } + if (inv->hasChannelFieldValue(CH0, FLD_EVT_LOG)) { + root[i][F("events")] = inv->EventLog()->getEntryCount(); + } else { + root[i][F("events")] = -1; + } + if (inv->getLastStatsUpdate() > _newestInverterTimestamp) { _newestInverterTimestamp = inv->getLastStatsUpdate(); }