Skip to content

设备告警消息

获取设备告警消息。该消息是由设备触发后通知平台。

消息类型一

运动告警消息:MESSAGE_DEVICE_MOTION

声音告警消息:MESSAGE_DEVICE_SOUND

边界入侵消息: MESSAGE_BORDER_INTRUSION

越界侦测消息:MESSAGE_CROSS_BORDER_DETECTION

data 结构

参数名称参数类型参数含义说明
deviceIdString设备 id
detectTimeString告警时间毫秒

示例

运动告警消息:

json
{
  "...": "...",
  "msgList": [
    {
      "msgType": "MESSAGE_DEVICE_MOTION",
      "timeStamp": "1583317657000",
      "data": {
        "deviceId": "xxxxS_abcde",
        "detectTime": "1584599831303"
      }
    }
  ]
}

声音告警消息:

json
{
  "...": "...",
  "msgList": [
    {
      "msgType": "MESSAGE_DEVICE_SOUND",
      "timeStamp": "1583317657000",
      "data": {
        "deviceId": "xxxxS_abcde",
        "detectTime": "1584599831303"
      }
    }
  ]
}

边界入侵告警消息:

json
{
  "...": "...",
  "msgList": [
    {
      "msgType": "MESSAGE_BORDER_INTRUSION",
      "timeStamp": "1583317657000",
      "data": {
        "deviceId": "xxxxS_abcde",
        "detectTime": "1584599831303"
      }
    }
  ]
}

越界侦测告警消息:

json
{
  "...": "...",
  "msgList": [
    {
      "msgType": "MESSAGE_CROSS_BORDER_DETECTION",
      "timeStamp": "1583317657000",
      "data": {
        "deviceId": "xxxxS_abcde",
        "detectTime": "1584599831303"
      }
    }
  ]
}

消息类型二

区域入侵消息:MESSAGE_REGIONAL_INVASION

人形告警:MESSAGE_DEVICE_HUMAN

data 结构

参数名称参数类型参数含义说明
deviceIdString设备 id
detectTimeString告警时间毫秒
deviceNameString设备名称
deviceAddressString设备地址
regionString设备所在企业编码(本级企业)
regionNameString设备所在企业名称(本级企业)
storeIdString设备所属节点编码
storeNameString设备所属节点名称

示例

区域入侵告警消息:

json
{
  "...": "...",
  "msgList": [
    {
      "msgType": "MESSAGE_REGIONAL_INVASION",
      "timeStamp": "1583317657000",
      "data": {
        "deviceId": "xxxxS_abcde",
        "detectTime": "1584599831303",
        "region": "11111",
        "deviceAddress": "100 street",
        "deviceName": "1101",
        "regionName": "apple",
        "storeId": "1221912131",
        "storeName": "小店"
      }
    }
  ]
}

人形告警消息:

json
{
  "...": "...",
  "msgList": [
    {
      "msgType": "MESSAGE_DEVICE_HUMAN",
      "timeStamp": "1583317657000",
      "data": {
        "deviceId": "xxxxS_abcde",
        "detectTime": "1584599831303",
        "region": "11111",
        "deviceAddress": "100 street",
        "deviceName": "1101",
        "regionName": "apple",
        "storeId": "1221912131",
        "storeName": "小店"
      }
    }
  ]
}