Filter results by

Device management tasks

Device management tasks can be performed only when the corresponding physical device is online and has a valid registration status.

A device type owner can create tasks to Read, Write, and Execute to their devices via ARTIK cloud services. Tasks are asynchronous jobs which can run across multiple devices for a given device type. The following are the supported tasks:

  • Deep read of a Device Property. This sends a Read operation directly to the device(s) using LWM2M. Upon successful completion, the Device Mirror will be updated with new values.
  • Deep write of a Device Property. This sends a Write operation directly to the device(s) using LWM2M. Upon successful completion, the Device Mirror will also be updated with new values.
  • Execution of a Device Property. This sends an Execute operation directly to the device(s) using LWM2M.
  • Bulk write of a Server Property. This will update the value of a Server Property for one or more devices in a single task.

Deep read/write of a property means that the tasks are performed directly on the device, not on the Device Mirror. The properties on the Device Mirror are updated as the result of deep read/write.

ARTIK cloud services use an OTA Update task to handle OTA updates.

Tasks are asynchronous, meaning that the API to create a task will return immediately before the task begins to run. To get the current state of a task, the task status must be retrieved by calling the REST API.

Task execution

Tasks will attempt to issue the operation to a device if the device is currently registered with and connected to ARTIK cloud services via LWM2M. Otherwise the task will be queued until the device registers with ARTIK cloud services. Also, any failed attempts to communicate with the device will requeue the task and retry when the device re-registers or updates registration.

Tasks API reference

REST APIs for managing tasks are documented in the API reference. Also see the possible task statuses, device task statuses, and device task error codes.

Task expiration

Tasks have an active period during which ARTIK cloud services will try to issue the task to the devices. When this active period ends, the task expires and any remaining pending devices will be marked as FAILED with error code 4004.

The default expiration time for tasks is 7 days. This default can be overriden per task or per device type. If taskParameters.expiresAfter is set when creating the task, this value will be used. Otherwise, if taskExpiresAfter has been set in the device type configuration, then this value will be used.

Task lifetime

Tasks will remain accessible through the APIs for 30 days from when the task was created, after which they will be removed from ARTIK cloud services.

Device task errors

Code Error message Condition
4001 Device is not registered Error indicating that the device is not registered - currently used for firmware update only
4004 Device task expired The device task expired
4006 Task rejected by the user The user has rejected the OTA update
4010 Unauthorized - access right permission denied CoAP 4.01 error code returned from client
4000 Invalid value CoAP 4.04 error code returned from client. The specific error message originates from the client response.
4050 Method is not allowed CoAP 4.05 error code returned from client
4030 Forbidden - duplicate endpoint client name CoAP 4.03 error code returned from client
4040 Resource is not found CoAP 4.03 error code returned from client
4150 Unsupported content format CoAP 4.15 error code returned from client
4060 Not acceptable - specified format is not supported CoAP 4.15 error code returned from client
5000 Internal server error AKC internal error