Set Device Measurement Points


After a device receives a set device measurement point request, it updates the value of the measurement points of the device according to the request.

Note

Set the parameters according to the parameters defined in the model.


Downstream

  • Request TOPIC: /sys/{productKey}/{deviceKey}/thing/service/measurepoint/set
  • Reply TOPIC: /sys/{productKey}/{deviceKey}/thing/service/measurepoint/set_reply

Sample Request Format

{
    "id": "123",
    "version": "1.0",
    "params": {
        "temperature": 30.5
    },
    "method": "thing.service.measurepoint.set"
}

Sample Response Format

{
    "id": "123",
    "code": 200,
    "data": {}
}

Request Parameter Description

Parameters Type Mandatory/Optional Description
id String Mandatory The message ID. It is a reserved parameter that is reserved for future use.
version String Mandatory The version of the protocol. The current version is 1.0.
params Object Mandatory The parameters used for setting the value of the measurement point of the device.
temperature Float Optional The identifier of the measurement point that you want to modify. In this example, the measurement point has the identifier temperature. The value you set must match the data type defined for this measurement point.​ For example, when the data type of this parameter is set to float in the model, the value here must be a float.
method String Mandatory The request method.

Response Parameter Description

Parameter Type Mandatory/Optional Description
code Integer Mandatory The return code. “200” indicates that the request operation is executed successfully.
data JSON Optional The detailed returned information in JSON format.

Error Codes

For the description of error codes, see Error Codes.