Trying higher buffer for MQTT

This commit is contained in:
Gunnar Skjold
2022-02-06 19:28:32 +01:00
parent 5c7c0699b2
commit 35eb69bebb
3 changed files with 4 additions and 4 deletions

View File

@@ -1024,7 +1024,7 @@ void MQTT_connect() {
mqtt->disconnect();
yield();
} else {
mqtt = new MQTTClient(512);
mqtt = new MQTTClient(1024);
ws.setMqtt(mqtt);
}

View File

@@ -13,7 +13,7 @@ bool JsonMqttHandler::publish(AmsData* data, AmsData* previousState) {
return false;
if(data->getListType() == 1) {
char json[192];
char json[256];
snprintf_P(json, sizeof(json), JSON1_JSON,
WiFi.macAddress().c_str(),
clientId.c_str(),
@@ -26,7 +26,7 @@ bool JsonMqttHandler::publish(AmsData* data, AmsData* previousState) {
);
return mqtt->publish(topic, json);
} else if(data->getListType() == 2) {
char json[384];
char json[512];
snprintf_P(json, sizeof(json), JSON2_JSON,
WiFi.macAddress().c_str(),
clientId.c_str(),
@@ -52,7 +52,7 @@ bool JsonMqttHandler::publish(AmsData* data, AmsData* previousState) {
return mqtt->publish(topic, json);
} else if(data->getListType() == 3) {
if(data->getPowerFactor() == 0) {
char json[512];
char json[768];
snprintf_P(json, sizeof(json), JSON3_JSON,
WiFi.macAddress().c_str(),
clientId.c_str(),