Updated on 2022-02-24 GMT+08:00

Commands

On the device list, click a device to open the Device Details page.

  • On the Commands page, you can deliver commands to an individual device. Specifically, click Send Command, select a command and set command parameters in the dialog box displayed, and click Confirm.
    NOTE:
    • IoT Device Management can deliver commands only to NB-IoT devices. To deliver commands to MQTT devices, call the IoT platform APIs.
    • The commands can be delivered only after being defined in the product model.
    • The parameters with the asterisk (*) are mandatory. The parameters displayed vary by command.
  • The Commands tab page displays historical commands delivered by the IoT platform or NA to the device. On this page, you can view information such as the creation time of the command delivery task, the time at which the IoT platform sent the command, the time at which the command was delivered, and the command status. This information helps you learn the command execution status. The task status transition is listed in Table 1. If there are many historical commands, you can filter them by Command ID, Status, and Period.
Table 1 Task status transition

Status

Description

Pending

  • For an NB-IoT device that uses the pending delivery mode, the IoT platform caches a command if the device does not report data. The task status is Pending.
  • This status does not exist for an NB-IoT device that uses the immediate delivery mode.
  • This status does not exist for an MQTT device.

Expired

  • For an NB-IoT device that uses the pending delivery mode, if the IoT platform does not deliver a command to the device within the specified expiration time, the task status is Expired. The expiration time is subject to the value of expireTime carried by the NA. If expireTime is not carried, the default value (48 hours) is used.
  • This status does not exist for an NB-IoT device that uses the immediate delivery mode.
  • This status does not exist for an MQTT device.

Canceled

If you cancel a pending task, the task status is Canceled.

Sent

  • For an NB-IoT device that uses the pending delivery mode, the IoT platform sends the cached command when receiving data reported by the device. In this case, the task status changes from Pending to Sent.
  • For an NB-IoT device that uses the immediate delivery mode, if the device is online when an IoT platform issues a command, the task status is Sent.
  • If an MQTT device is online when the IoT platform issues a command, the task status is Sent.

Timed out

If the IoT platform does not receive a response within 180 seconds after issuing a command to an NB-IoT device, the task status is Timed out. This status does not exist for an MQTT device.

Delivered

If the IoT platform receives a response from a device, the task status is Delivered.

Successful

If the IoT platform receives a result indicating that the command is successfully executed, the task status is Successful.

Failed

  • If the IoT platform receives a result indicating that the command fails to be executed, the task status is Failed.
  • For an NB-IoT device that uses the immediate delivery mode, if the device is offline when an IoT platform issues a command, the task status is Failed.
  • If an MQTT device is offline when the IoT platform issues a command, the task status is Failed.

If the NA calls the batch task creation API of the IoT platform to deliver control instructions to devices in batches, you can view the task execution status and result on the Command Delivery page.