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

Response for Delivering a Command to a Device

Topic

Topic

/v1/devices/{ deviceId}/commandResponse

Publisher

Edge device

Subscriber

IoT platform

Parameter Description

Field

Mandatory/Optional

Type

Description

msgType

Mandatory

String

This field has a fixed value of deviceRsp, which indicates a response returned by a device.

mid

Mandatory

Int

Command ID.

errcode

Mandatory

Int

Result code for request processing. The options are as follows:

  • 0: success
  • non-0: failure

body

Optional

ObjectNode

Command response.

Example

{
         "body": {
                   "orginParameters": {
                            "temperature": 123
                   },
                   "state": "ok"
         },
         "errcode": 0,
         "mid": 54132,
         "msgType": "deviceRsp"
}