Updated on 2022-12-05 GMT+08:00

Delivering a Command to a Device

Topic

Topic

/v1/devices/{ deviceId}/command

Publisher

IoT platform

Subscriber

Edge device

Parameter Description

Field

Mandatory/Optional

Type

Description

deviceId

Mandatory

String

Unique device ID generated by the IoT platform, which corresponds to the device client ID.

msgType

Mandatory

String

This field has a fixed value of cloudReq, which indicates a request delivered by the IoT platform.

serviceId

Mandatory

String

Service ID.

cmd

Mandatory

String

Command name of a service.

paras

Mandatory

ObjectNode

Command parameter.

mid

Mandatory

Int

Command ID.

Example

{
         "msgType": "cloudReq",
         "mid": 54132,
         "cmd": "command1",
         "paras": {
                   "temperature": 123
         },
         "serviceId": "service1",
         "deviceId": "D23pigXo"
}