Skip to content

Device Actions

Device actions are one‑shot devwork commands that reboot, debug, or change the allocation state of the device. They do not modify the filesystem.

⚠ CRITICAL — the devwork envelope for EVERY command on this page MUST be:

{ "devwork": { "actions": [ ... ] } }

The bare array format ("devwork": [...]) is wrong and the device will ignore it.

ActionDescription
rebootReboot the device
debugRequest debug information
alloc_localPerform a local allocation
return_localPerform a local return (de‑allocate)

Reboots the device immediately. No parameter is required.

{
"devwork": {
"actions": [
{ "a": "reboot" }
]
}
}

Requests debug information from the device. The device responds with an uplink message containing diagnostic data.

{
"devwork": {
"actions": [
{ "a": "debug" }
]
}
}

Performs a local allocation using the /allocdata.json file on the device’s filesystem. This transitions the device from unallocated to allocated state without contacting the IES.

Configuration variables

  • a (Required, string): Must be alloc_local.
  • p (Optional, object):
ParameterTypeRequiredDescription
userobjectnoJSON object to initialise user/application data post‑allocation
{
"devwork": {
"actions": [
{
"a": "alloc_local",
"p": {
"user": {
"user_name": "Jane Doe",
"user_role": "Visitor"
}
}
}
]
}
}

Performs a local return (de‑allocation) using the /unallocdata.json file on the device’s filesystem. This transitions the device from allocated back to unallocated state.

Configuration variables

  • a (Required, string): Must be return_local.
{
"devwork": {
"actions": [
{ "a": "return_local" }
]
}
}

This action also exits the provisioning state when called from provisioning mode.