Skip to content

Publish config_ack after applying config #13

Description

@TalkingJupiter

Context

The host-side design (host/example.md) expects the device to confirm provisioning: the fake ESP32 publishes a config_ack to repacss/devices/<mac>/ack, and the ingestion service subscribes to that topic. The real firmware applies config silently — the Radxa has no way to tell "config applied" apart from "config lost in transit," which matters since the provisioning flow is the foundation everything else sits on.

Scope

Publish an ack from the firmware after a received config is parsed and applied.

Implementation notes

  • Natural place is the config path in TelemetrySender.cpp (onMqttMessage → after setConfig).
  • Ack topic can be built alongside the other bootstrap topics in buildMqttIdentity (repacss/devices/<mac>/ack).
  • Suggested payload: message_type: "config_ack", mac, accepted: true, and config_version once the schema question in the config-alignment issue settles.
  • Decide whether a rejected config also produces an ack with accepted: false and the parser's error string — that would make host-side debugging of bad configs much easier than reading device serial logs.

Acceptance criteria

  • After a valid config is applied, an ack is visible on repacss/devices/<mac>/ack.
  • The ingestion/provisioning service can correlate the ack to the config it sent.
  • Ack publish failure is logged and does not disrupt telemetry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions