Device Software Updates
Device-side perspective of OTA update management — how updates reach devices and how status is tracked.
For the server-side management API, see System > Software Updates.
Update Lifecycle (Device Perspective)
Server deploys update
→ MQTT message to device topic
→ Device downloads package
→ Device applies update
→ Device reports status back via MQTT/telemetry
Status Tracking
Each device has an UpdateStatus record tracking:
- Current version
- Target version
- Download progress
- Installation status:
pending|downloading|installing|completed|failed|rolled_back - Error details (if failed)
Rollback
If an update fails:
- Server triggers rollback via
SoftwareUpdatesService.rollbackDeployment() - MQTT command sent to device to revert
UpdateStatusmarked asrolled_back
Prisma Models
SoftwareUpdate— Package metadata (version, changelog, file URL)UpdateStatus— Per-device installation tracking (tenant-scoped)
Related Modules
SoftwareUpdatesModule— Server-side managementMqttModule— Update delivery channelTelemetryModule— Status reporting