Query the most recent raw data of the device
| parameter | description | required |
|---|---|---|
| action | queryDeviceLastRawData | true |
| pn | Digital collector number | true |
| devcode | Device protocol encoding | true |
| devaddr | Device Address (485 bus) | true |
| sn | Device serial number | true |
response:
| parameter | description | required |
|---|---|---|
| id | The data is uniquely identified | true |
| dat | The original packet reported by the device is Base64 encoded | true |
| valid | Whether the current data is valid (in the business), 0 ? Valid : Invalid, This flag may be set automatically according to some rule at the time of data collection, or it may be set artificially. For example, in such a scenario, the first data of an inverter when it is turned on during the day may be somewhat abnormal, which can be found manually or automatically |
true |
| gts | The timestamp at which the data occurred(The time zone in which the device is located), format: yyyy-mm-dd hh:mi:ss | true |
{
"err":0,
"desc":"ERR_NONE",
"dat":{
"id":"53258de419e311e7bde91c6f6593e938",
"dat":"Njg3NDg0NDAwMDE4ICAgF8QWxQBiALAAnAAHAAAELwAAA5IAAAAADEUMSQkbCWMIzxOIE4gTiAE4AVEBOAAAB7kBKAF2////////Awf/////////AA0iAAAADjAwMDEyMDAwMDExNjAwMDA2NzAwMDAzMzYwMDAwMzM2MDAwMTIwMDAwMTAwMDEwMDE4OTAwMDMzNjA1MDAwMDMzNjA4NjY4MDM5OTUxNjExMDcwOTE1Mzcx",
"valid":0,
"gts":"2017-04-05 17:37:27"
}
}
possible error:
| Returns an error code | description | detailed description |
|---|---|---|
| 0x0006 | ERR_FORMAT_ERROR | parameter error |
| 0x000C | ERR_NO_RECORD | No record (no data for the device) |
| 0x0102 | ERR_NOT_FOUND_DEVICE | device not found |