Reporting Offline Measurepoint Information


Configure the following parameters according to the parameters defined in the model. If part of the data fails to be sent in the request, the entire request will fail, and the first return code that occurs will be returned.


Upstream

  • Request TOPIC: sys/${productKey}/integration/measurepoint/post
  • Response TOPIC: sys/${productKey}/integration/measurepoint/post_reply

Sample Request Format

{
    "id":"123",
    "version":"1.0",
    "params":[
        {
            "deviceKey":"device1",
            "measurepoints":{
                "Power":{
                    "value":1,
                    "quality":9
                },
                "temp":1.02,
                "branchCurr":[
                    "1.02",
                    "2.02",
                    "7.93"
                ]
            },
            "time":123456
        },
        {
            "deviceKey":"device1",
            "measurepoints":{
                "Power":{
                    "value":2,
                    "quality":9
                },
                "temp":2.02,
                "branchCurr":[
                    "2.02",
                    "3.02",
                    "9.93"
                ]
            },
            "time":123567
        },
        {
            "deviceKey":"device2",
            "measurepoints":{
                "Power":{
                    "value":1,
                    "quality":9
                },
                "temp":1.02,
                "branchCurr":[
                    "1.02",
                    "2.02",
                    "7.93"
                ]
            },
            "time":123456
        }
    ],
    "method":"integration.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 Array Mandatory The parameters required for reporting measurement points.
deviceKey String Optional The device key.
measurepoints Object Mandatory The list of the identifiers for the measurement points to be reported.
power String 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. Similar to the above, the value you set must match the data type defined for this parameter.
temp String 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 String 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 Mandatory The timestamp for the measurement point.
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.
1257 Device not found The device does not exist.