设备事件上报的订阅
说明
Topic
💡
Payload
[
{
"productId": "product1",//用户输入产品Id
"deviceId": "device1",//用户输入的设备id
"events": [
{
"eventType": "info",//事件类型级别
"key": "event1",
"value": {
"Wf": 1,
"Alarm": true
},
"time": 1524448722000,//事件上报时间戳
"module": ""
},
{
"eventType": "info",
"key": "event2",
"value": {
"Power": 1.001
},
"time": 1524448722000,
"module": ""
}
]
},
{
"productId": "product1",
"deviceId": "device2",
"events": [
{
"eventType": "info",
"key": "event1",
"value": {
"Wf": 1,
"Alarm": true
},
"time": 1524448722000,
"module": ""
},
{
"eventType": "info",
"key": "event2",
"value": {
"Power": 1.001
},
"time": 1524448722000,
"module": ""
}
]
}
]
字段说明
字段名称 | 字段类型 | 字段描述 | 是否必传 |
---|---|---|---|
productId | string | 产品ID | 是 |
deviceId | string | 设备ID | 是 |
events | Object[] | 事件信息集合 | 是 |
key | string | 事件identifier,事件唯一标识符 | 是 |
value | dynamic | 事件数据字典 | 是 |
eventType | string | 事件类型(info、alert、error) | 是 |
time | long | 上报时间,毫秒级时间戳 | 是 |
module | string | 事件所属模块,不传或为空时则为默认模块 | 否 |
修改于 2024-05-22 01:41:46