Reporting Offline Measurement Points


A device can publish a message to this topic to report offline measurement points (stored in TSDB) to the cloud. Reported offline measurement points mainly backfills data and will not trigger alerts or stream processing.

Note

Configure the input and output parameters according to the parameters defined in the model.


Upstream

  • Request TOPIC: /sys/{productKey}/{deviceKey}/thing/measurepoint/resume

  • Reply TOPIC: /sys/{productKey}/{deviceKey}/thing/measurepoint/resume_reply

Sample Request Format

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

Sample Response Format

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

Request Parameter Description

Parameter

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 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

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 of 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.