Service MQTT API (DAQAstra)
All DAQAstra services communicate over MQTT using a publish / subscribe model.
A service topic prefix is always:
{firmware_name}/{service_name}
Spaces in service_name are converted to underscores.
Below each service lists:
- Command (subscription) topics it listens on
- Publish (output / status) topics it emits
- Payload schemas (JSON unless otherwise noted)
- Notes / semantics
Topic layouts are derived from the code in config-schema/src/schema/topics.rs (see the large comment block there) and the message structs in config-schema/src/messaging/*.rs.
If a field is optional it may be omitted or sent as null.
Version note: This document supersedes older copies that mixed legacy names. Always regenerate if message structs change.
Conventions
| Term | Meaning |
|---|---|
{prefix} | {firmware_name}/{service_name} |
| Boolean | true / false |
| Milliseconds | Unsigned 16/32-bit depending on context (see field) |
| Temperature | Degrees Celsius unless otherwise stated |
| Percent / Ratio | 0.0 – 1.0 floating-point |
| Integer ranges | Unless stated, unsigned and constrained by underlying hardware width |
actuator
Generic actuator command, state and fault reporting
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/command | in | cmd | { "command": "OPEN" } |
/state | out | telemetry | { "command": "OPEN", "state": "OPEN", "success": true } |
/fault | out | event | { "error": "Unknown State", "state": "Unknown", "attempted_command": "OPEN" } |
Payload Schemas
/command ActuatorCommand
{ "command": "OPEN" }
/state ActuatorState
{ "command": "OPEN", "state": "OPEN", "success": true }
/fault ActuatorFault
{ "error": "Unknown State", "state": "Unknown", "attempted_command": "OPEN" }
aht20
AHT20 humidity / temperature sensor data
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
| `` | out | telemetry | { "temperature": { "value":22.8, "unit":"C" }, "humidity": { "value":40.1, "unit":"%RH" }, "dewpoint": { "value":9.7,… |
Payload Schemas
`` Aht20Data
{ "temperature": { "value":22.8, "unit":"C" }, "humidity": { "value":40.1, "unit":"%RH" }, "dewpoint": { "value":9.7, "unit":"C" } }
analog_in
Analog input channel telemetry and configuration
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
'' | out | telemetry | { "value": 0.123, "unit": "V" } |
/config | in | cmd | { "conversion": { "Polynomial": [0.0, 1.0, 0.0, 0.0] } } |
Payload Schemas
'' AnalogInData
{ "value": 0.123, "unit": "V" }
/config AnalogConversionConfig
{ "conversion": { "Polynomial": [0.0, 1.0, 0.0, 0.0] } }
analog_out
DAC / analog output configuration and feedback
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "value": 2.5, "max_volts": 5.0, "enabled": true } |
/response | out | telemetry | { "value": 2.5, "max_volts": 5.0, "enabled": true, "error": null } |
Payload Schemas
/config DacConfig
{ "value": 2.5, "max_volts": 5.0, "enabled": true }
/response DacConfig
{ "value": 2.5, "max_volts": 5.0, "enabled": true, "error": null }
bang_bang
Bang-bang control loop command and status
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "upper_threshold": 50.0, "lower_threshold": 40.0, "update_frequency": 1000, "pause_output": false, "pause_target_in… |
/response | out | telemetry | { "upper_threshold": 50.0, "lower_threshold": 40.0, "update_frequency": 1000, "pause_output": false, "pause_target_in… |
/output | out | telemetry | { "output": true, "input": 41.2 } |
Payload Schemas
/config BangBangCommandandResponse
{ "upper_threshold": 50.0, "lower_threshold": 40.0, "update_frequency": 1000, "pause_output": false, "pause_target_input": false }
/response BangBangCommandandResponse
{ "upper_threshold": 50.0, "lower_threshold": 40.0, "update_frequency": 1000, "pause_output": false, "pause_target_input": false }
/output BangBangData
{ "output": true, "input": 41.2 }
bme280
BME280 environmental sensor (temperature, pressure, humidity, dewpoint)
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "standby":"62ms", "mode":"Weather", "offset":0.0 } |
/data | out | telemetry | { "temperature": { "value":23.5, "unit":"C" }, "pressure": { "value":101325, "unit":"Pa" }, "humidity": { "value":45.… |
/response | out | telemetry | { "temperature": { "value":23.5, "unit":"C" }, "pressure": { "value":101325, "unit":"Pa" }, "humidity": { "value":45.… |
Payload Schemas
/config Bme280Command
{ "standby":"62ms", "mode":"Weather", "offset":0.0 }
/data Bme280Data
{ "temperature": { "value":23.5, "unit":"C" }, "pressure": { "value":101325, "unit":"Pa" }, "humidity": { "value":45.2, "unit":"%RH" }, "dewpoint": { "value":11.2, "unit":"C" } }
/response Bme280Data
{ "temperature": { "value":23.5, "unit":"C" }, "pressure": { "value":101325, "unit":"Pa" }, "humidity": { "value":45.2, "unit":"%RH" }, "dewpoint": { "value":11.2, "unit":"C" } }
command
Send an arbitrary command to another service in-firmware
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
| `` | in | cmd | { "data":true } |
complementary_pwm
Complementary PWM output pair with deadtime
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "enable":true, "duty":0.4, "frequency":20000, "deadtime":0.02 } |
/response | out | telemetry | { "enable":true, "duty":0.4, "frequency":20000, "deadtime":0.02, "error":null } |
Payload Schemas
/config ComplementaryPwmCommand
{ "enable":true, "duty":0.4, "frequency":20000, "deadtime":0.02 }
/response ComplementaryPwmCommandResponse
{ "enable":true, "duty":0.4, "frequency":20000, "deadtime":0.02, "error":null }
digital_in
Digital input state reporting
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/out | out | telemetry | { "data": true } |
digital_out
Digital output control and feedback
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "command": true } |
/response | out | telemetry | { "data": true } |
Payload Schemas
/config DigitalOutCommand
{ "command": true }
/response DigitalOutData
{ "data": true }
flowmeter
Flow meter pulse counting and rate reporting
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "slope":1.0, "offset":0.0, "measurement_interval":1000 } |
/response | out | telemetry | { "slope":1.0, "offset":0.0, "measurement_interval":1000 } |
/data | out | telemetry | { "value": 3.21, "units": "L/min" } |
Payload Schemas
/config FlowMeterConfig
{ "slope":1.0, "offset":0.0, "measurement_interval":1000 }
/response FlowMeterConfig
{ "slope":1.0, "offset":0.0, "measurement_interval":1000 }
/data FlowMeterData
{ "value": 3.21, "units": "L/min" }
ir_cam
IR camera max pixel and frame row data. One frame consists of 36 rows of 24 pixels.
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/max | out | telemetry | { "data": 41.7 } |
/{row} | out | telemetry | [23.1, 23.5, 23.6, ... 24 vals] |
Payload Schemas
/max IrCamMaxData
{ "data": 41.7 }
/{row} IrCamFrameRow
[23.1, 23.5, 23.6, ... 24 vals]
loadcell
Load cell data (publishes raw/converted weight) and tare command
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
| `` | out | telemetry | { "value": 12.34, "unit": "g" } |
/tare | in | cmd | true |
math
Arbitrary math expression using other services in a firmware. Result will either be f32 or bool depending on the configured output type of the channel.
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/pause | in | cmd | true |
/ch{0..num_channels} | in | telemetry | {"data": 1.0 } or {"data": true } |
/response | out | telemetry | { "data":true } |
Payload Schemas
/pause MathPauseCommand
true
/ch{0..num_channels} MathResult
{"data": 1.0 } or {"data": true }
/response MathPauseResponse
{ "data":true }
mpu6050
MPU6050 IMU configuration and accel/gyro telemetry
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "accel": 2, "gyro": 1 } |
/accel | out | telemetry | { "x":0.01, "y":-0.02, "z":0.98, "temp":36.5, "roll":1.2, "pitch":-0.7 } |
/gyro | out | telemetry | { "x":0.1, "y":-0.1, "z":0.05, "temp":36.5 } |
/response | out | telemetry | { "accel": "2g", "gyro": "250dps" } |
Payload Schemas
/config MpuConfig
{ "accel": 2, "gyro": 1 }
/accel MpuAccelData
{ "x":0.01, "y":-0.02, "z":0.98, "temp":36.5, "roll":1.2, "pitch":-0.7 }
/gyro MpuGyroData
{ "x":0.1, "y":-0.1, "z":0.05, "temp":36.5 }
/response MpuConfigResponse
{ "accel": "2g", "gyro": "250dps" }
pds
Power distribution system channel & rail configuration and telemetry
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "rail":"Vcc2I", "over_current_limit":10, "over_voltage_limit":26, "enable":true } |
/ch0 | out | telemetry | { "state":"Running", "current":0.12, "enabled":true, "power_good":true } |
/ch1 | out | telemetry | { "state":"Running", "current":0.5, "enabled":true, "power_good":true } |
/ch2 | out | telemetry | { "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false } |
/ch3 | out | telemetry | { "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false } |
/ch4 | out | telemetry | { "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false } |
/ch5 | out | telemetry | { "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false } |
/ch6 | out | telemetry | { "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false } |
/ch7 | out | telemetry | { "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false } |
/vcc1i | out | telemetry | { "state":"Running", "current":0.50, "voltage":5.05, "enabled":true } |
/vcc2i | out | telemetry | { "state":"Running", "current":0.40, "voltage":12.08, "enabled":true } |
Payload Schemas
/config PowerRailConfig
{ "rail":"Vcc2I", "over_current_limit":10, "over_voltage_limit":26, "enable":true }
/ch0 PowerChannelResponse
{ "state":"Running", "current":0.12, "enabled":true, "power_good":true }
/ch1 PowerChannelResponse
{ "state":"Running", "current":0.5, "enabled":true, "power_good":true }
/ch2 PowerChannelResponse
{ "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false }
/ch3 PowerChannelResponse
{ "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false }
/ch4 PowerChannelResponse
{ "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false }
/ch5 PowerChannelResponse
{ "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false }
/ch6 PowerChannelResponse
{ "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false }
/ch7 PowerChannelResponse
{ "state":"Disabled { rt: None }", "current":0, "enabled":false, "power_good":false }
/vcc1i PowerRailResponse
{ "state":"Running", "current":0.50, "voltage":5.05, "enabled":true }
/vcc2i PowerRailResponse
{ "state":"Running", "current":0.40, "voltage":12.08, "enabled":true }
pid
PID controller command, response, and output topics
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "kp":0.2, "ki":0.02, "kd":0.4, "setpoint":1.0, "pause_output":false, "pause_target_input":false } |
/response | out | telemetry | { "kp":0.2, "ki":0.02, "kd":0.4, "setpoint":1.0, "pause_output":false, "pause_target_input":false } |
/output | out | telemetry | { "output":0.15, "last_output":0.14, "setpoint":1.0, "input":0.92 } |
Payload Schemas
/config PidCommandAndResponse
{ "kp":0.2, "ki":0.02, "kd":0.4, "setpoint":1.0, "pause_output":false, "pause_target_input":false }
/response PidCommandAndResponse
{ "kp":0.2, "ki":0.02, "kd":0.4, "setpoint":1.0, "pause_output":false, "pause_target_input":false }
/output PidData
{ "output":0.15, "last_output":0.14, "setpoint":1.0, "input":0.92 }
pwm
Standard PWM output control and response
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "enable":true, "duty":0.5, "frequency":1000 } |
/response | out | telemetry | { "enable":true, "duty":0.5, "frequency":1000, "error":null } |
Payload Schemas
/config PWMCommand
{ "enable":true, "duty":0.5, "frequency":1000 }
/response PWMCommandResponse
{ "enable":true, "duty":0.5, "frequency":1000, "error":null }
qmc5883l
QMC5883L magnetometer heading / vector data and configuration
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "field_range":2, "data_rate":50, "oversample":512, "declination": -13.2 } |
| `` | out | telemetry | { "x": 120.0, "y": -30.5, "z": 5.2, "heading": 182.4 } |
/response | out | telemetry | { "success": { "field_range":2, "data_rate":50, "oversample":512, "declination": -13.2 }, "error": null } |
Payload Schemas
/config Qmc5883lConfig
{ "field_range":2, "data_rate":50, "oversample":512, "declination": -13.2 }
`` Qmc5883lData
{ "x": 120.0, "y": -30.5, "z": 5.2, "heading": 182.4 }
/response Qmc5883lConfigResponse
{ "success": { "field_range":2, "data_rate":50, "oversample":512, "declination": -13.2 }, "error": null }
stateful_actuator
Stateful actuator sequences, moves and status topics (schema-defined config)
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/command | in | cmd | { "command": "TRANSITION"} |
/fault | in | cmd | { "error": "Invalid State", "inputs": [true,false], "outputs": [true,false], "current_state": "IDLE" } |
/sequence | out | telemetry | { "name": "seq1", "success": true } |
/state | out | telemetry | { "success": true, "inputs": [true,false], "outputs": [true,false], "current_state": "IDLE" } |
Payload Schemas
/command StatefulActuatorCommand
{ "command": "TRANSITION"}
/fault StatefulActuatorFault
{ "error": "Invalid State", "inputs": [true,false], "outputs": [true,false], "current_state": "IDLE" }
/sequence StatefulActuatorSequenceStatus
{ "name": "seq1", "success": true }
/state StatefulActuatorState
{ "success": true, "inputs": [true,false], "outputs": [true,false], "current_state": "IDLE" }
stepper
Stepper driver motion command, response and status progress
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/config | in | cmd | { "target_accel":0.1, "max_velocity":0.5, "num_steps":2000, "direction":true, "enable":true } |
/response | out | telemetry | { "target_accel":0.1, "max_velocity":0.5, "num_steps":2000, "direction":true, "enable":true } |
/status | out | telemetry | { "percent": 42, "steps": 840, "position": 1234 } |
Payload Schemas
/config StepperConfig
{ "target_accel":0.1, "max_velocity":0.5, "num_steps":2000, "direction":true, "enable":true }
/response StepperConfig
{ "target_accel":0.1, "max_velocity":0.5, "num_steps":2000, "direction":true, "enable":true }
/status StepperStatus
{ "percent": 42, "steps": 840, "position": 1234 }
thermocouple
Thermocouple temperature readings
| Topic Suffix | Dir | Kind | Example JSON |
|---|---|---|---|
/temperature | out | telemetry | { "temperature": 23.5, "ambient": 22.1, "unit": "C", "error": null } |
Payload Schemas
/temperature ThermocoupleData
{ "temperature": 23.5, "ambient": 22.1, "unit": "C", "error": null }