From 01a502171019a4065cd792a5afd6b5d6a6f59f6a Mon Sep 17 00:00:00 2001 From: Brent Andrew Hendricks Date: Mon, 22 Jun 2026 07:05:46 -0400 Subject: [PATCH] fix: replace bounded publish() with beginPublish/endPublish in onProgress mqttClient.publish() silently drops payloads over 192 bytes (256-byte MQTT buffer minus 64 bytes of header/topic overhead). The onProgress JSON with release_url, title, and all state fields exceeds that limit, so the broker never receives percentage or title updates. Closes #693 Co-Authored-By: Claude Sonnet 4.6 --- Controller/Controller.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Controller/Controller.ino b/Controller/Controller.ino index ce34f48..514ea07 100644 --- a/Controller/Controller.ino +++ b/Controller/Controller.ino @@ -3724,9 +3724,11 @@ void otaFirmware_checkPending(){ mqttDoc["title"] = title; char topic[MQTT_TOPIC_UPDATE_STATE_PATTERN_LENGTH+1]; snprintf(topic, sizeof(topic), MQTT_TOPIC_UPDATE_STATE_PATTERN, deviceIdentity.data.uuid); - char buffer[384]; - serializeJson(mqttDoc, buffer, sizeof(buffer)); - mqttClient.publish(topic, buffer); + mqttClient.beginPublish(topic, measureJson(mqttDoc), false); + BufferingPrint bufferedClient(mqttClient, 32); + serializeJson(mqttDoc, bufferedClient); + bufferedClient.flush(); + mqttClient.endPublish(); } mqttClient.loop(); });