Skip to content

Device messages (MQTT)

On this page: the MQTT topics of a Lutra box, when it sends what, the common envelope, telemetry versions, events and the device shadow. External devices use a subset; see External devices.

Topics

Topic Direction Contents
lutra/v1/{thingName}/telemetry box to cloud Readings, every interval_s (default 300 s) and on a state change
lutra/v1/{thingName}/events box to cloud Immediately: alarms, DI changes, bus errors, start-up, updates, crash summaries
lutra/v1/{thingName}/cmd cloud to box Signed commands from the fixed list
lutra/v1/{thingName}/cmd/result box to cloud Result of a command, with old and new value
$aws/things/{thingName}/shadow/... both Settings: desired by the cloud, reported by the box

The device policy allows a box only its own topics. Messages are published with QoS 1.

When a box sends

  • Telemetry every interval_s seconds (30 to 3600, default 300) and immediately when a state changes (points, device reachable, status, on/off and mode; not ordinary measured numbers), at most once per 30 seconds.
  • Events immediately.
  • A box only connects with a complete identity, a valid clock and a network. It creates messages as soon as it has an identity and a valid clock, also without network; they wait in the offline buffer.

Envelope and duplicates

  • Every message carries a start-up counter boot and a sequence number seq; the pair is unique per box. The cloud drops duplicates, so resending is always safe.
  • Only values with status ok count as a reading. Values that are not valid (no flow, no answer, unknown) travel separately, so the cloud can show why a value is missing.

Telemetry versions

Version Adds
"v": 2 Readings per device with the device's fixed id (d1 to d8), so the cloud links readings to the device, not to a position in a list
"v": 3 pts: the box's own points as quantities, for example digital input roles (cover_state, pump_running)

Device readings use the profile's own point names; the cloud maps them to quantities through the profile. Each resulting row has a status: ok, out_of_range, invalid, no_flow, comm_error, no_answer or unknown.

To be confirmed

A complete field-by-field schema of box telemetry and events is not published yet. External devices use the simpler, documented "v": 3 format in External devices.

Events

Examples of events a box sends: start-up, input changes, ota_restart, ota_ok, ota_failed, ota_rollback, and in the switching build output_change, output_refused, alarm_on, alarm_off, backwash_done, aborted_by_restart, stopped_for_update.

Device shadow

The shadow carries ordinary settings both ways.

  • reported (box): firmware version, build (read or switching), board, settings with their revision ("rev": {"cfg": N}), refused wishes in rejected, and in the switching build the list of outputs.
  • desired (cloud): a wish, which must carry the base revision it was made on ("base_rev": {"cfg": N}).
  • The box processes a wish, then clears everything it saw from desired: desired works as a mailbox.

Details of the revision rule: Remote commands and settings.

Last reviewed: 2026-11-24. Applies to Lutra Lite 0.4.1.