Skip to content

Device States

The device is always in one of several states. The state determines which configuration file is active, whether a user is assigned, and what the device is allowed to do.

The current state is reported in devdata.core.state on every uplink. The complete list of state codes is:

CodeStateDescription
UUnallocatedNo user assigned; unallocdata.json is active
AAllocatedUser assigned; allocdata.json is active
EErrorA fatal error occurred; the device waits for recovery
DDFUDevice Firmware Update in progress
PProvisioningDevice is in provisioning mode (configuration / setup)
IReservedAppears in the JSON reference, not yet documented
BReservedAppears in the JSON reference, not yet documented
WReservedAppears in the JSON reference, not yet documented
// Example uplink showing the current state
{
"devdata": {
"core": {
"state": "A",
"ts": 987654321
}
}
}

The device moves between states based on backend commands, local actions, or hardware events.

TransitionTrigger
Unallocated → Allocatedalloc_local devwork, or IES allocation
Allocated → Unallocatedreturn_local devwork, or IES return
Any → Provisioningdevcfg.fw.prov_start set to true
Provisioning → Unallocatedreturn_local devwork, or 180s inactivity timeout
Any → DFUdevcfg.fw.dfu_start set to true, or BLE DFU characteristic
Any → ErrorFatal runtime error (crashes, corrupt filesystem, etc.)