Your first device¶
Devices in SimpleOTA can be created in two ways:
- Auto-registration (recommended): the device's first call to
/api/v1/ota/check/with a project token registers it. - Manual via the dashboard or developer API: useful for pre-allocating identifiers in a factory environment.
Option A: auto-register from curl¶
Pretend to be a device:
curl -X POST https://simpleota.com/api/v1/ota/check/ \
-H "Authorization: Bearer ${PROJECT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"device_id": "esp32-demo-0001",
"framework": "arduino",
"chip_family": "esp32",
"board_id": "esp32dev",
"current_build_number": 0,
"hardware_revision": "rev-a"
}'
You should receive a 200 with {"update_available": false} because no deployment
yet targets the device.
Open the dashboard and you'll see the new device with a last_seen
timestamp.
Option B: manual creation¶
- Project → Devices → New device.
- Set the device id (must be unique per project), framework, chip family, and any compatibility metadata.
- Save.
The device starts with current_build_number = 0 until it reports
otherwise.
Identifiers¶
device_id is whatever you want: MAC address, serial number, UUID. It
must be stable across reboots and unique within a project. The
cohort math relies on device_id being deterministic: change it and the
device gets a different cohort bucket.
Next¶
For a real Arduino device, the SimpleOTAClient library handles the polling, download, and reboot loop in a few lines of code.
For a production fleet, swap from the project token to a per-device token. You can either issue one from the device detail page after the device auto-registers, or pre-provision the device row and its token from the dashboard's Add device form before flashing. See Device tokens for both flows.