Query the most recent piece of data for the device
such as, request: http://api.dessmonitor.com/public/?sign=69d579a61f9568227a940befe987a8b70f42a899&salt=2594478891299802506&token=355e07ae268f6e3c5c5e0c9d5c1072c23914cef48a290dc587e42f5a190a6cbd&action=queryDeviceLastData&i18n=zh_CN&pn=J1817101731142&devcode=752&devaddr=1&sn=687484400018&source=1&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1
| parameter |
description |
required |
| action |
queryDeviceLastData |
true |
| i18n |
International language, seeMulti-language support |
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 |
| dat[x].title |
The name of the device protocol field |
true |
| dat[x].unit |
The unit of the device protocol field, Some fields have units, Such as the electric hair unit W of the inverter, Others may not have units, Such as serial number |
false |
| dat[x].val |
The value of the Device Protocol field |
true |
In particular, it is worth mentioning: dat[0], dat[1], Always uniquely identified the data details and timestamp when the data occurred (device time zone), Timestamp format: yyyy-mm-dd hh:mi:ss.
{
"err":0,
"desc":"ERR_NONE",
"dat":[
{
"title":"id",
"val":"cac824e415f211e7bde91c6f6593e938"
},
{
"title":"Timestamp",
"val":"2017-03-31 17:17:59"
},
{
"title":"Serial number",
"val":"687484400018"
},
{
"title":"PV1 Input voltage",
"unit":"V",
"val":"608.4"
},
{
"title":"PV2 Input voltage",
"unit":"V",
"val":"582.9"
},
Object{...},
Object{...},
Object{...},
Object{...},
Object{...},
Object{...},
Object{...},
Object{...},
Object{...}
]
}
possible error:
| Returns an error code |
description |
detailed description |
| 0x0006 |
ERR_FORMAT_ERROR |
parameter error |
| 0x000C |
ERR_NO_RECORD |
no records(The device has no data) |
| 0x0102 |
ERR_NOT_FOUND_DEVICE |
device not found |