diff --git a/src/devices/mixing.cpp b/src/devices/mixing.cpp index fe7c09b8b..995045676 100644 --- a/src/devices/mixing.cpp +++ b/src/devices/mixing.cpp @@ -103,7 +103,7 @@ void Mixing::show_values(uuid::console::Shell & shell) { // publish values via MQTT // ideally we should group up all the mixing units together into a nested JSON but for now we'll send them individually void Mixing::publish_values() { - DynamicJsonDocument doc(EMSESP_MAX_JSON_SIZE_SMALL); + StaticJsonDocument doc; switch (type_) { case Type::HC: diff --git a/src/mqtt.h b/src/mqtt.h index daf26098e..6c8ced445 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -37,9 +37,9 @@ using uuid::console::Shell; -#define EMSESP_MAX_JSON_SIZE_SMALL 200 // for smaller json docs -#define EMSESP_MAX_JSON_SIZE_MEDIUM 800 // for smaller json docs from ems devices -#define EMSESP_MAX_JSON_SIZE_LARGE 1500 // for large json docs from ems devices, like boiler or thermostat data +#define EMSESP_MAX_JSON_SIZE_SMALL 200 // for smaller json docs when using StaticJsonDocument +#define EMSESP_MAX_JSON_SIZE_MEDIUM 800 // for smaller json docs from ems devices, when using StaticJsonDocument +#define EMSESP_MAX_JSON_SIZE_LARGE 1500 // for large json docs from ems devices, like boiler or thermostat data. Using DynamicJsonDocument namespace emsesp {