Query the device status

Possible states of the deviceThe following table is shown below:

status value(HEX) description
DEVICE_STATUS_ONLINE 0x00 Online, working properly
DEVICE_STATUS_OFFLINE 0x01 Offline, it may be that the data collector attached to the device is offline, or the device itself is offline (the data collector cannot obtain data from the device)
DEVICE_STATUS_FAULT 0x02 Fault, where a device has a fault-level alarm or has some registers or fields that identify that the device is running in a fault state
DEVICE_STATUS_STANDBY 0x03 In standby, there are registers or fields that identify the device that is running in standby
DEVICE_STATUS_WARNING 0x04 Alarm, where a warning level alarm has occurred on the device or there are registers or fields that identify that the device is running in an alarm state
DEVICE_STATUS_ERROR 0x05 Error, the device has an error level alarm or there are some registers or fields that identify that the device is running in an error state
DEVICE_STATUS_PROTOCOL_ERROR 0x06 The protocol error causes the packets collected by the data collector from the device to be inconsistent with the protocol

such as, request: http://api.dessmonitor.com/public/?sign=7f220b6f21d0b52d0452d9c66ffe1f4f84635b81&salt=2337424845041575962&token=91a6c87e89acbfb2fa482f3b02ee071ee58ea0293dd92f243a88ee51415f497f&action=queryDeviceStatus&device=COLLECTOR0001,512,1,687489900018;COLLECTOR0002,512,2,687489900019&source=1&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1

parameter description required
action queryDeviceStatus true
device Digital collector number, Device protocol encoding, Device Address (485 bus), Device serial number(pn,devcode,devaddr,sn), 多个用";"号隔开, 一次最多支持256个 true

response:

parameter description required
device[x].pn Digital collector number true
device[x].devcode Device protocol encoding true
device[x].devaddr Device Address (485 bus) true
device[x].sn Device serial number true
device[x].status device status true

notice, The interface is failing quickly:If a device information is considered to be incorrect (formative), the interface will immediately return an error.

Also, the order of the devices returned may differ from the order passed at query time.

{
    "err":0,
    "desc":"ERR_NONE",
    "dat":{
        "device":[
            {
                "pn":"COLLECTOR0001",
                "devcode":512,
                "devaddr":1,
                "sn":"687489900018",
                "status":1
            },
            {
                "pn":"COLLECTOR0002",
                "devcode":512,
                "devaddr":2,
                "sn":"687489900019",
                "status":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
0x000D ERR_OVER_LIMIT Limit exceeded
0x000C ERR_NO_RECORD No record (no data for the device)
0x0102 ERR_NOT_FOUND_DEVICE device not found

results matching ""

    No results matching ""