From 0154da91ab98adea64837aa90b0df1396ff96b5f Mon Sep 17 00:00:00 2001 From: Bernhard Kirchen Date: Sat, 23 Mar 2024 17:38:48 +0100 Subject: [PATCH] fix VE.Direct live data response size PLLIMIT would not (always) be part of the JSON string transmitted to the web application and trip it. with the help of the ArduinoJson assistant, new values to use in the response size calculation were introduced. also, importantly, a constant offset was added for the DPL status and the JSON structure sourrounding the MPPTs. --- src/WebApi_ws_vedirect_live.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WebApi_ws_vedirect_live.cpp b/src/WebApi_ws_vedirect_live.cpp index 58aaba035..bc63cd0d5 100644 --- a/src/WebApi_ws_vedirect_live.cpp +++ b/src/WebApi_ws_vedirect_live.cpp @@ -62,7 +62,8 @@ bool WebApiWsVedirectLiveClass::hasUpdate(size_t idx) uint16_t WebApiWsVedirectLiveClass::responseSize() const { - return VictronMppt.controllerAmount() * (1024 + 128); + // estimated with ArduinoJson assistant + return VictronMppt.controllerAmount() * (1024 + 512) + 128/*DPL status and structure*/; } void WebApiWsVedirectLiveClass::sendDataTaskCb()