Skip to content

Commit de835ab

Browse files
committed
fix BarKeuken tele/+/state unhandled exception: increase MQTT buffer size
1 parent f5dfa3f commit de835ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/PubSubClient/src/PubSubClient.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
#endif
2323

2424
// MQTT_MAX_PACKET_SIZE : Maximum packet size
25-
// EP: INCREASED MQTT_MAX_PACKET_SIZE FROM 128 to 512
25+
// EP: INCREASED MQTT_MAX_PACKET_SIZE FROM 128 to 1024
2626
#ifndef MQTT_MAX_PACKET_SIZE
27-
#define MQTT_MAX_PACKET_SIZE 512
27+
#define MQTT_MAX_PACKET_SIZE 1024
2828
#endif
2929

3030
// MQTT_KEEPALIVE : keepAlive interval in Seconds

src/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void callback(String topic, byte* message, unsigned int length) {
208208
}
209209
dbSerial.println();
210210

211-
StaticJsonBuffer<512> jsonBuffer;
211+
StaticJsonBuffer<1024> jsonBuffer;
212212
JsonObject& mqttjson = jsonBuffer.parseObject(messageTemp);
213213

214214
if(((topic=="tele/fleurblinds/SENSOR") && (mqttjson.containsKey("SHUTTER-1"))) || ((topic=="tele/fleurblinds/RESULT") && (mqttjson.containsKey("SHUTTER-1")))) {

0 commit comments

Comments
 (0)