Report Device Measurement Points


A device can publish a message to this topic to report measurement points to the cloud. Reported measurement points might trigger alerts or stream processing.

Note

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


Upstream

  • Request TOPIC: /sys/{productKey}/{deviceKey}/thing/measurepoint/post
  • Reply TOPIC: /sys/{productKey}/{deviceKey}/thing/measurepoint/post_reply

Sample Request Format

{
    "id": "123",
    "version": "1.0",
    "params": {
        "measurepoints": {
            "Power": {
                "value": 1.0,
                "quality": 9
            },
            "temp": 1.02,
            "branchCurr": [
                "1.02", "2.02", "7.93"
            ]
        },
        "time": 123456
    },
    "method": "thing.measurepoint.post"
}

Sample Response Format

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

Request Parameter Description

Parameters Type Mandatory/Optional Description
id String Optional 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 reporting the device measurement points.
measurepoints Object Mandatory The list of the device’s measurement points.
Power Struct Optional The identifier of the measurement point that you want to report. In this example, the measurement point has the identifier Power. The value you set for the point must match the data type defined for this parameter. In this case, the data type for Power is struct, defined with 2 paramters value and quality.
value Integer Optional The parameter name of the struct data type of the measurement point Power. The value you set must match the data type defined for this parameter. For example, when the data type of this parameter is set to integer in the model, the value here must be an integer.
quality Integer Optional The parameter name of the struct data type of the measurement point Power. In this example, the quality parameter indicates the data quality. Similar to the above, the value you set must match the data type defined for this parameter.
temp Integer Optional The identifier of the measurement point that you want to report. In this example, the measurement point has the identifier temp. Similar to the above, the value you set must match the data type defined for this parameter.
branchCurr Array Optional The identifier of the measurement point that you want to report. In this example, the measurement point has the identifier branchCurr. Similar to the above, the value you set must match the data type defined for this parameter.
time Timestamp Optional The timestamp of the measurement point. When not specified, the value is the server time.
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.

Return Code

Return Code Error Message Explanation
1204 Model validate failed measurepoints contains invalid fields.