Query the number of alarms on the device
Possiblealarm level for the deviceThe following table is shown below:
| status | value | description |
|---|---|---|
| DEVICE_WARNING_LEVEL_WARNING | 0x00 | warning |
| DEVICE_WARNING_LEVEL_ERROR | 0x01 | error |
| DEVICE_WARNING_LEVEL_FAULT | 0x02 | fault |
| DEVICE_WARNING_LEVEL_OFFLINE | 0x03 | offline |
Distinguish from the severity of the alarm: DEVICE_WARNING_LEVEL_WARNING < DEVICE_WARNING_LEVEL_ERROR < DEVICE_WARNING_LEVEL_FAULT.
| parametr | description | required |
|---|---|---|
| action | queryDeviceWarningCount | 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, such as sdate <= date < edate | false |
response:
| parameter | description | required |
|---|---|---|
| count | The number of unhandled alerts | true |
{
"err":0,
"desc":"ERR_NONE",
"dat":{
"count": 0
}
}
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 |