Query alarms on Devices

for example: http://api.shinemonitor.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=0&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1

Parameter Description Required
action queryDeviceWarning True
pn Datalogger number True
devcode Device protocol code True
devaddr Device address (485 bus True
sn Device serial number True
level Alarm level, If this parameter is not passed, it indicates that you do not care False
handle Has it been processed, true? Processed: Not processed, If this parameter is not passed, it indicates that you do not care False
sdate Starting time (Device time zone), format: yyyy-mm-dd hh:mi:ss, If this parameter is not passed, it indicates that you do not care False
edate Ending time (Device time zone), format:: yyyy-mm-dd hh:mi:ss, If this parameter is not passed, it indicates that you do not care, Both sdate and edate must exist simultaneously. When querying, use a semi open interval, which means sdate<=date<edate False
i18n Internationalized language, refer to Multi-Language Support True
page Paging processing, page number, starting from 0. If this parameter is not passed, it is defaulted to 0 False
pagesize Paging processing, with 1 to 50 records per page. If this parameter is not passed, it defaults to 1 False

response:

Parameter Description Required
total Total number of alarms True
page Paging processing, which page True
pagesize Paging processing, number of alarms per page True
warning[x].id Alarm unique identification True
warning[x].uid The owner ID of the Plant, which may be 0, does not belong to any Plant owner when an alarm occurs on the Device True
warning[x].pid The Plant ID may be 0, and the Device may not have been added to any Plant when an alarm occurs True
warning[x].pn Datalogger number True
warning[x].devcode Device protocol code 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 Is it an alarm based on the operating status of the device ? true : false True
warning[x].level Alarm level True
warning[x].code Alarm encoding False
warning[x].desc Alarm description True
warning[x].handle Alarm processed ? true : false True
warning[x].gts Alarm generation time, format: yyyy-mm-dd hh:mi:ss, Device Time Zone True
warning[x].cts Alarm disappearance time, 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":"市电频率高",
                "handle":true,
                "gts":"2017-06-22 02:16:21"
            }
        ]
    }
}

Possible errors:

Response error code Description Details
0x0006 ERR_FORMAT_ERROR Parameter error
0x0007 ERR_MISSING_PARAMETER Missing necessary parameters
0x0102 ERR_NOT_FOUND_DEVICE Device not found
0x0108 ERR_NOT_FOUND_DEVICE_WARNING Device Alarm not found
Copyright © eybond 2022 all right reserved,powered by Gitbook文档更新时间: 2023-07-18 13:51:38

results matching ""

    No results matching ""