Skip to content

fix: replace bounded publish() with beginPublish/endPublish in onProgress#694

Merged
BrentIO merged 1 commit into
mainfrom
fix/693
Jun 22, 2026
Merged

fix: replace bounded publish() with beginPublish/endPublish in onProgress#694
BrentIO merged 1 commit into
mainfrom
fix/693

Conversation

@BrentIO

@BrentIO BrentIO commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces mqttClient.publish(topic, buffer) in the onProgress OTA callback with the beginPublish / BufferingPrint / endPublish pattern used everywhere else for large MQTT payloads
  • The simple publish() overload silently drops payloads over 192 bytes; the onProgress JSON with release_url and title exceeds that limit, causing the broker to retain the initial {in_progress:true, update_percentage:0} message unchanged for the duration of the download
  • Also removes the 384-byte char buffer[384] stack allocation from the callback

Test plan

  • Trigger a forced OTA (HTTP POST) with a release_url in the body and confirm update_percentage and title advance in HA during download
  • Trigger a non-forced OTA (MQTT update/set ON) and confirm the same behavior is unaffected
  • Confirm onComplete still publishes {in_progress:false} retained after the update finishes

Closes #693

🤖 Generated with Claude Code

…ress

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 <noreply@anthropic.com>
@BrentIO BrentIO merged commit 4a3d721 into main Jun 22, 2026
2 checks passed
@BrentIO BrentIO deleted the fix/693 branch June 22, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: forced OTA onProgress MQTT publish fails silently when release_url is present

1 participant