Appearance
OTA firmware updates
Ship a new firmware or software binary to devices that implement the Autoconnecto OTA contract (shared attributes + HTTPS chunk download).
Who this is for
- Operators: upload and assign packages from OTA in the app (Firmware / Software tabs).
- Firmware authors: implement the download loop — ESP32 helpers live in the Autoconnecto Arduino SDK (
OtaUpdate.h, seesdk/OTA.md).
Operator flow
- Open OTA in the sidebar.
- Choose Firmware (FOTA) or Software (SOTA).
- Upload package — title, version, optional compatible device profile, and a file.
- Assign to a single device, a device profile, or a device type.
- Watch Device status. In-flight rows refresh every few seconds.
| Kind | Shared attributes | Device progress | Typical device action |
|---|---|---|---|
| Firmware | fw_* | fw_state | Flash ESP32 OTA partition and reboot |
| Software | sw_* | sw_state | Save file on LittleFS; apply in sketch (no reboot) |
When you assign to a profile and leave Profile default = Yes, new devices created on that profile automatically queue the same package.
What the platform does
- Stores the binary on this server’s disk. A software update does not delete those files.
- Creates a
device_ota_updatesrow per target device. - Writes shared attributes (
fw_*orsw_*). - The device downloads chunks over HTTPS using its device token (
/firmwareor/software). - The device reports client attribute
fw_stateorsw_state. The platform maps that onto the update row.
Safety rules
- A device may download chunks only for a package it was assigned and that is still non-terminal.
- If the package has a compatible profile, assign only includes devices on that profile.
- You cannot delete a package while any update for it is still in progress.
- Server flag
OTA_ENABLED=falserejects upload / assign / delete and stops the queue cron.
Device requirements
- FOTA: subscribe to
fw_*, flash, reportfw_state(ESP32:examples/OtaFirmwareUpdate_mqtt). - SOTA: subscribe to
sw_*, write file, reportsw_state(ESP32:examples/OtaSoftwareUpdate_mqtt). - The device must reach
https://api.autoconnecto.in(or your API host), not localhost.
Related
- In-app: Help → Operate → Ship an OTA update
- Env vars:
backend/ENVIRONMENT.md(OTA section) - Protocol detail for firmware authors: Autoconnecto SDK
OTA.md
