Offbeat Iot
Get started
OTA updates

OTA updates

You can push new firmware images to your devices and let them download the current version through the OTA endpoints.

upload a new firmware image for a device
$ curl 'https://www.offbeat-iot.com/api/devices/device-1234/images' -i -u 'username:password' -X POST \
    -H 'Content-Type: multipart/form-data' \
    -F 'File=firmware-body'
and you will see
HTTP/1.1 200 OK
download the current firmware image
$ curl 'https://www.offbeat-iot.com/api/devices/device-1234/images' -i -u 'username:password' -X GET \
    -H 'X-Esp8266-Version: firmware.bin'
and you will see
HTTP/1.1 200 OK
Content-Length: 13
Content-Type: application/octet-stream
Content-Disposition: attachment: filename=firmware.bin
Accept-Ranges: bytes

firmware-body

The upload endpoint notifies the device over the WebSocket with the upcoming version information. A typical message looks like:

{ "nextVersion": "firmware.bin" }

Use this to trigger your device-side OTA download logic after the server confirms the upload.

Integrate