[CUB-230] ESP32 offline status buffering and replay on reconnect #21

Open
opened 2026-05-27 09:50:44 -04:00 by Hermes · 3 comments
Owner

Migration dry-run sample. Imported from Linear to validate Gitea issue formatting, labels, and comments before the full migration.

Imported from Linear: CUB-230
Linear URL: https://linear.app/cubecraft-creations/issue/CUB-230/esp32-offline-status-buffering-and-replay-on-reconnect

Description

When venue Wi-Fi drops, ESP32 buffers status locally (SPIFFS) and replays on reconnect. Define: max buffer, FIFO eviction, MQTT replay protocol, hub-side dedup via (camera_id, recorded_at) uniqueness.

Imported Linear metadata

  • Linear ID: CUB-230
  • State: In Review
  • Priority: Urgent
  • Project: RemoteRig
  • Labels: Pip
  • Due date: none
  • Original assignee: unassigned
  • Creator: CubeCraft Creations
  • Linear branch name: cubecraftcreations1/cub-230-esp32-offline-status-buffering-and-replay-on-reconnect
  • Children:
    • CUB-239 — Hub-side dedup for ESP32 offline status replay (camera_id, recorded_at uniqueness)
  • Linear comments archived/importable: 3
> **Migration dry-run sample.** Imported from Linear to validate Gitea issue formatting, labels, and comments before the full migration. Imported from Linear: **CUB-230** Linear URL: https://linear.app/cubecraft-creations/issue/CUB-230/esp32-offline-status-buffering-and-replay-on-reconnect ## Description When venue Wi-Fi drops, ESP32 buffers status locally (SPIFFS) and replays on reconnect. Define: max buffer, FIFO eviction, MQTT replay protocol, hub-side dedup via (camera_id, recorded_at) uniqueness. ## Imported Linear metadata - Linear ID: CUB-230 - State: In Review - Priority: Urgent - Project: RemoteRig - Labels: Pip - Due date: none - Original assignee: unassigned - Creator: CubeCraft Creations - Linear branch name: cubecraftcreations1/cub-230-esp32-offline-status-buffering-and-replay-on-reconnect - Children: - CUB-239 — Hub-side dedup for ESP32 offline status replay (camera_id, recorded_at uniqueness) - Linear comments archived/importable: 3
Hermes added the priority/urgentagent/pipstate/in-reviewproject/remoterig labels 2026-05-27 09:50:44 -04:00
Author
Owner

Imported Linear comment from CubeCraft Creations at 2026-05-23T12:29:49.397Z on CUB-230:


Hub dedup work split to new sub-issue CUB-239 (created as CUB-239 instead of CUB-240 — corrected from earlier comment).

Evidence summary for firmware (ESP32) portion:

  • Branch: agent/pip/CUB-230-offline-buffer-replay
  • Commit: 1efd48e
  • PR: #10

Moving to In Review — firmware portion is complete with evidence. Hub dedup tracked in CUB-239.

Imported Linear comment from **CubeCraft Creations** at `2026-05-23T12:29:49.397Z` on **CUB-230**: --- Hub dedup work split to new sub-issue **CUB-239** (created as CUB-239 instead of CUB-240 — corrected from earlier comment). **Evidence summary for firmware (ESP32) portion:** - Branch: `agent/pip/CUB-230-offline-buffer-replay` - Commit: `1efd48e` - PR: https://code.cubecraftcreations.com/CubeCraft-Creations/remote-rig/pulls/10 Moving to In Review — firmware portion is complete with evidence. Hub dedup tracked in CUB-239.
Author
Owner

Imported Linear comment from CubeCraft Creations at 2026-05-23T07:42:56.807Z on CUB-230:


Pip Dispatch Result — Partial

Firmware (ESP32) — COMPLETE:

  • SPIFFS buffer: /status_buffer.json with JSON array of {recorded_at, status} entries
  • FIFO eviction: removes oldest entry when max_buffer_entries exceeded (default 100)
  • MQTT replay: replays buffered entries on reconnect, clears buffer after replay
  • Configurable via esp32-config.json: max_buffer_entries, buffer_file

Evidence:

  • Branch: agent/pip/CUB-230-offline-buffer-replay
  • Commit: 1efd48e
  • PR: #10
  • Firmware file: firmware/src/esp32-mqtt-bridge.cpp

⚠️ Issues:

  1. .pio/build/ artifacts committed — need to remove build outputs from the branch
  2. Hub-side dedup NOT implemented — the (camera_id, recorded_at) uniqueness check in the Go backend was not done; tracking as CUB-240

Next: Hub dedup work split to new sub-issue CUB-240, will dispatch to Dex.

Imported Linear comment from **CubeCraft Creations** at `2026-05-23T07:42:56.807Z` on **CUB-230**: --- ## Pip Dispatch Result — Partial **Firmware (ESP32) — COMPLETE:** - SPIFFS buffer: `/status_buffer.json` with JSON array of `{recorded_at, status}` entries - FIFO eviction: removes oldest entry when `max_buffer_entries` exceeded (default 100) - MQTT replay: replays buffered entries on reconnect, clears buffer after replay - Configurable via `esp32-config.json`: `max_buffer_entries`, `buffer_file` **Evidence:** - Branch: `agent/pip/CUB-230-offline-buffer-replay` - Commit: `1efd48e` - PR: https://code.cubecraftcreations.com/CubeCraft-Creations/remote-rig/pulls/10 - Firmware file: `firmware/src/esp32-mqtt-bridge.cpp` **⚠️ Issues:** 1. **`.pio/build/` artifacts committed** — need to remove build outputs from the branch 2. **Hub-side dedup NOT implemented** — the (camera_id, recorded_at) uniqueness check in the Go backend was not done; tracking as CUB-240 **Next:** Hub dedup work split to new sub-issue CUB-240, will dispatch to Dex.
Author
Owner

Imported Linear comment from CubeCraft Creations at 2026-05-22T02:28:31.613Z on CUB-230:


@larry: missing @otto: context — cannot break down

Imported Linear comment from **CubeCraft Creations** at `2026-05-22T02:28:31.613Z` on **CUB-230**: --- @larry: missing @otto: context — cannot break down
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CubeCraft-Creations/remote-rig#21