Overview
Implement OTA status topic publishing to report download progress, verification status, and update state over MQTT.
Description
Aeolus publishes OTA progress to the ota/status topic so administrators can monitor update progress in real-time. The current Linux OTA implementation exists but doesn't publish status to MQTT.
Requirements
-
Status Topic
- Publish to
m/{domain}/c/{ctrl_channel}/ota/status
- Update on state transitions
- Update on download progress (every 5%)
- Use SenML format
-
Status Fields
state - Current state (idle, downloading, verifying, ready, restarting, aborted)
bytes - Bytes downloaded so far
total - Total bytes expected
progress - Percentage complete (0-100)
error - Error message (if any)
-
State Publishing
- Publish on each state transition
- Publish periodically during download
- Publish final status on completion/abort
- Retain last status message
-
OTA Config Topic
- Subscribe to
m/{domain}/c/{ctrl_channel}/ota/cfg
- Parse update trigger
- Support URL, hash, and size fields
-
OTA Data Topic
- Subscribe to
m/{domain}/c/{ctrl_channel}/ota
- Receive firmware binary via MQTT streaming
- Alternative to HTTP download
Status Format
[
{
"n": "state",
"vs": "downloading"
},
{
"n": "bytes",
"v": 65536,
"u": "By"
},
{
"n": "total",
"v": 1324740,
"u": "By"
}
]
Reference
See Aeolus implementation:
src/management/ota.c
docs/ota.md
- Current OTA implementation in
pkg/ota/ota.go
Acceptance Criteria
Priority
High
Overview
Implement OTA status topic publishing to report download progress, verification status, and update state over MQTT.
Description
Aeolus publishes OTA progress to the
ota/statustopic so administrators can monitor update progress in real-time. The current Linux OTA implementation exists but doesn't publish status to MQTT.Requirements
Status Topic
m/{domain}/c/{ctrl_channel}/ota/statusStatus Fields
state- Current state (idle, downloading, verifying, ready, restarting, aborted)bytes- Bytes downloaded so fartotal- Total bytes expectedprogress- Percentage complete (0-100)error- Error message (if any)State Publishing
OTA Config Topic
m/{domain}/c/{ctrl_channel}/ota/cfgOTA Data Topic
m/{domain}/c/{ctrl_channel}/otaStatus Format
[ { "n": "state", "vs": "downloading" }, { "n": "bytes", "v": 65536, "u": "By" }, { "n": "total", "v": 1324740, "u": "By" } ]Reference
See Aeolus implementation:
src/management/ota.cdocs/ota.mdpkg/ota/ota.goAcceptance Criteria
Priority
High