Skip to content

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, see sdk/OTA.md).

Operator flow ​

  1. Open OTA in the sidebar.
  2. Choose Firmware (FOTA) or Software (SOTA).
  3. Upload package — title, version, optional compatible device profile, and a file.
  4. Assign to a single device, a device profile, or a device type.
  5. Watch Device status. In-flight rows refresh every few seconds.
KindShared attributesDevice progressTypical device action
Firmwarefw_*fw_stateFlash ESP32 OTA partition and reboot
Softwaresw_*sw_stateSave 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 ​

  1. Stores the binary on this server’s disk. A software update does not delete those files.
  2. Creates a device_ota_updates row per target device.
  3. Writes shared attributes (fw_* or sw_*).
  4. The device downloads chunks over HTTPS using its device token (/firmware or /software).
  5. The device reports client attribute fw_state or sw_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=false rejects upload / assign / delete and stops the queue cron.

Device requirements ​

  • FOTA: subscribe to fw_*, flash, report fw_state (ESP32: examples/OtaFirmwareUpdate_mqtt).
  • SOTA: subscribe to sw_*, write file, report sw_state (ESP32: examples/OtaSoftwareUpdate_mqtt).
  • The device must reach https://api.autoconnecto.in (or your API host), not localhost.
  • In-app: Help → Operate → Ship an OTA update
  • Env vars: backend/ENVIRONMENT.md (OTA section)
  • Protocol detail for firmware authors: Autoconnecto SDK OTA.md

support@autoconnecto.in · founder@autoconnecto.in · +91 92121 00555 · app.autoconnecto.in