Query alarms on the device

such as, request: http://api.dessmonitor.com/public/?sign=7f220b6f21d0b52d0452d9c66ffe1f4f84635b81&salt=2337424845041575962&token=91a6c87e89acbfb2fa482f3b02ee071ee58ea0293dd92f243a88ee51415f497f&action=queryDeviceWarning&device=COLLECTOR0001&devcode=512&devaddr=1&sn=687489900018&level=0&handle=true&i18n=zh_CN&page=0&pagesize=1&source=1&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1

parameter description required
action queryDeviceWarning true
pn Digital collector number true
devcode Device protocol encoding true
devaddr Device Address (485 bus) true
sn Device serial number true
level Alarm level, if you do not pass this parameter, ignore it false
handle Whether it has been processed, true ? Processed : Unprocessed, if you do not pass this parameter, ignore it false
sdate Start time (device time zone), format: yyyy-mm-dd hh:mi:ss, if you do not pass this parameter, ignore it false
edate Deadline (device time zone), format: yyyy-mm-dd hh:mi:ss, if you do not pass this parameter, ignore it, sdate and edate must be both, and the half-open interval is used when querying, as sdate <= date < edate false
i18n International language, seeMulti-language support false
page pagination processing, page number, start at 0, if you do not pass this parameter, it defaults to 0 false
pagesize pagination processing, The number of records per page, 1 ~ 50, if you do not pass this parameter, it defaults to 1 false

response:

parameter description required
total Total number of alarms true
page pagination processing, page number true
pagesize pagination processing, The number of alerts per page true
warning[x].id The alarm is uniquely identified true
warning[x].uid The plant owner ID, which may be 0, does not belong to any plant owner at the time of the alarm true
warning[x].pid The power station ID, which may be 0, may not have been added to any power station when the alarm occurred true
warning[x].pn Digital collector number true
warning[x].devcode Device protocol encoding true
warning[x].devaddr Device Address (485 bus) true
warning[x].sn Device serial number true
warning[x].alias Device alias true
warning[x].status Whether it is based on</a>alarm of the running status of the device ? true : false true
warning[x].level Alarm level true
warning[x].code Alarm code false
warning[x].desc Alarm description true
warning[x].handle The alarm has been handled ? true : false true
warning[x].gts The time when the alarm was generated,format: yyyy-mm-dd hh:mi:ss, Device time zone true
warning[x].cts The time the alarm disappears, format: yyyy-mm-dd hh:mi:ss, Device time zone false
{
    "err":0,
    "desc":"ERR_NONE",
    "dat":{
        "total":8,
        "page":0,
        "pagesize":1,
        "warning":[
            {
                "id": "591afb417044a46e4c5ba050",
                "uid":1,
                "pid":1,
                "pn":"COLLECTOR0000",
                "devcode":512,
                "devaddr":1,
                "sn":"0123456789",
                "status":false,
                "level":0,
                "code":"F0001",
                "desc":"High mains frequency",
                "handle":true,
                "gts":"2017-06-22 02:16:21"
            }
        ]
    }
}

possible error:

Returns an error code description detailed description
0x0006 ERR_FORMAT_ERROR parameter error
0x0007 ERR_MISSING_PARAMETER The necessary parameter are missing
0x0102 ERR_NOT_FOUND_DEVICE device not found
0x0108 ERR_NOT_FOUND_DEVICE_WARNING Device alarm not found

results matching ""

    No results matching ""