Query the latest data of the Device

for example: http://api.shinemonitor.com/public/?sign=69d579a61f9568227a940befe987a8b70f42a899&salt=2594478891299802506&token=355e07ae268f6e3c5c5e0c9d5c1072c23914cef48a290dc587e42f5a190a6cbd&action=queryDeviceLastData&i18n=zh_CN&pn=J1817101731142&devcode=752&devaddr=1&sn=687484400018&source=0&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1

Parameter Description Required
action queryDeviceLastData True
i18n Internationalized language, refer to Multi-Language Support True
pn Datalogger number True
devcode Device protocol code True
devaddr Device address (485 bus) True
sn Device serial number True

response:

Parameter Description Required
dat[x].title Name of the Device protocol field True
dat[x].unit The unit of the Device protocol field. Some fields have units, such as the power output unit W of the Inverter, while others may not have units, such as the serial number False
dat[x].val The value of the Device protocol field True

It should be noted that dat [0] and dat [1] always represent the unique identification of data details and the timestamp of the time when the data occurred (in the time zone where the device is located). The timestamp format is yyyy mm dd hh: mi: ss.

{
    "err":0,
    "desc":"ERR_NONE",
    "dat":[
        {
            "title":"id",
            "val":"cac824e415f211e7bde91c6f6593e938"
        },
        {
            "title":"时间戳",
            "val":"2017-03-31 17:17:59"
        },
        {
            "title":"序列号",
            "val":"687484400018"
        },
        {
            "title":"PV1输入电压",
            "unit":"V",
            "val":"608.4"
        },
        {
            "title":"PV2输入电压",
            "unit":"V",
            "val":"582.9"
        },
        Object{...},
        Object{...},
        Object{...},
        Object{...},
        Object{...},
        Object{...},
        Object{...},
        Object{...},
        Object{...}
    ]
}

Possible errors:

Response error code Description Details
0x0006 ERR_FORMAT_ERROR Parameter error
0x000C ERR_NO_RECORD No record (the Device has no data)
0x0102 ERR_NOT_FOUND_DEVICE Device not found
Copyright © eybond 2022 all right reserved,powered by Gitbook文档更新时间: 2023-07-18 10:34:38

results matching ""

    No results matching ""