设备消息(按自定义topic上报消息)
事件说明
JSON示例
{
"event_type": "device_messages_report",
"instance_id": "yvS58FQ8",
"event_time": "2023-04-05 17:24:02",
"event_id": "b8e9f4f7-d647-40aa-b0a4-b5008b83e69e",
"body": {
"device_id": "0a329b1dfb394ef3b",
"device_name": "device1",
"time": "2023-04-05 17:23:05",
"product_id": "6c771e17e5f1f80",
"product_name": "product1",
"topic": "自定义topic名称"
"data": {
//动态json,非固定结构
}
}
}
字段说明
用户可以根据字段说明编写SQL语句,用于过滤出需要的事件数据
名称 | 类型 | 说明 |
---|---|---|
event_type | String | 事件类型,与SQL语句中的表名一致,固定为device_messages_report |
instance_id | String | 实例ID |
event_time | String | 事件触发时间,格式yyyy-MM-dd HH:mm:ss |
event_id | String | 事件ID,用于跟踪指定事件 |
body | Object | 事件消息体 |
body.device_id | String | 设备ID |
body.device_name | String | 设备名称 |
body.time | String | 事件上报时间,格式yyyy-MM-dd HH:mm:ss |
body.product_id | String | 产品ID |
body.product_name | String | 产品名称 |
body.topic | String | 自定义toic名称 |
body.data | Object | 设备自定义topic上报消息(动态json,非固定结构) |