# 联动管理接口
# 1 联动管理-只允许操作应用所属项目下的
# 1.1 联动列表查询
- 请求url:
/space/ruleengine/rule/getList
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
type | String | 否 | 事件触发类型(app(应用触发), device(设备触发), timer(定时器触发)) |
keyWords | String | 否 | 联动名称/联动ID |
pageSize | Int | 是 | 每页数量 |
pageNumber | Int | 是 | 页码 |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/rule/getList?
type=
&keyWords=
&pageSize=1
&pageNumber=1
&token=
1
2
3
4
5
6
2
3
4
5
6
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
pageSize | Int | 每页数据量 | "pageSize": 10 |
pageNumber | Int | 当前页码 | "pageNumber": 1 |
totalRow | Int | 列表总条数 | "totalRow": 2 |
totalPage | Int | 总页码 | "totalPage": 2 |
list | array | 数据列表 | |
id | Int | 联动名称联动id | "id": 88 |
name | String | 联动名称 | "name": "10202" |
event | array | 触发事件名称 | "event": ["事件名称01"] |
action | String | 执行动作名称 | "action": "deviceAssign1" |
effectivePeriod | String | 有效周期内容 | "effectivePeriod": "永久有效" |
status | Int | 状态(0:关,1:开) | "status": 0 |
beginDate | String | 起始时间 | "beginDate": "1000-01-01T00:00:00.000+0800" |
endDate | String | 结束时间 | "endDate": "1000-01-01T00:00:00.000+0800" |
validAll | Boolean | 有效周期 | "validAll": true |
- 返回示例:
{
"code": 0,
"data": {
"list": [
{
"beginDate": "1000-01-01T00:00:00.000+0800",
"effectivePeriod": "{\"Tuesday\":{\"startInclude\":\"0:00\",\"endExclude\":\"23:59\"},\"Thursday\":{\"startInclude\":\"0:00\",\"endExclude\":\"23:59\"}}",
"endDate": "1000-01-01T00:00:00.000+0800",
"name": "10202",
"action": "deviceAssign-1",
"id": 88,
"event": [
"事件",
"3231",
"1qazsw",
"事件名称01"
],
"validAll": false,
"status": 0
},
{
"beginDate": "1000-01-01T00:00:00.000+0800",
"effectivePeriod": "永久有效",
"endDate": "1000-01-01T00:00:00.000+0800",
"name": "33",
"action": "deviceAssign1",
"id": 83,
"event": [
"事件名称01"
],
"validAll": true,
"status": 0
}
],
"pageNumber": 1,
"pageSize": 10,
"totalPage": 2,
"totalRow": 2
},
"message": "ok"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 1.2 删除联动
- 请求url:
/space/ruleengine/rule/deleteById
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 联动ID |
token | String | 是 | token(带在url里面) |
- 请求示例:
/space/ruleengine/rule/deleteById?
id=
&token=
1
2
3
2
3
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
code | Int | 状态码 | "code": 0 |
success | Boolean | 是否成功 | "success": true |
- 返回示例:
{
"code": 0,
"success": true
}
1
2
3
4
2
3
4
# 1.3 修改联动状态
- 请求url:
/space/ruleengine/rule/updateStatusById
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 联动id |
status | int | 是 | 1 为正常启用即状态开,0 为停用即状态关, -1 为删除 |
token | String | 是 | token(带在url里面) |
- 请求示例:
/space/ruleengine/rule/updateStatusById?token=
1
注:id和status为一个对象
{
id:xx,
status:1
}
1
2
3
4
2
3
4
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
code | Int | 状态码 | "code": 0 |
success | Boolean | 是否成功 | "success": true |
- 返回示例:
{
"code": 0,
"success": true
}
1
2
3
4
5
2
3
4
5
# 1.4 联动测试
- 请求url:
/space/ruleengine/rule/test
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 联动ID |
token | String | 是 | token(带在url里面) |
- 返回参数
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
code | Int | 状态码 | "code": 0 |
success | Boolean | 是否成功 | "success": true |
- 返回示例:
{ "code": 0, "success": true}
1
# 1.5 添加联动
- 请求url:
/space/ruleengine/rule/add
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
name | String | 是 | 联动名称,长度20 |
description | String | 是 | 联动说明,长度50 |
eventId | long | 是 | 事件ID,多个事件以英文逗号分隔 |
actionId | long | 是 | 动作ID |
validAll | int | 是 | 生效类型,1-永久有效,0-固定时间段 |
validPeriod | Json | 是 | “全天有效”的时候为空,“固定时间段有效”显示对应的有效时间数组, 格式请严格按照周一到周日示例,否则联动不会生效 |
beginDate | String | 否 | validAll为固定时间段时不能为空,起始时间,格式yyyy-MM-dd |
endDate | String | 否 | validAll为固定时间段时不能为空,结束时间,格式yyyy-MM-dd |
token | String | 是 | token(带在url里面) |
- 请求示例(1)
{
"name": "testrulename",
"description": "testdescription",
"eventId": 145,
"actionId": 112,
"validAll": 0, //固定时间段
"validPeriod": "{ \"Monday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }, \"Tuesday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\"
}, \"Wednesday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }, \"Thursday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\"
}, \"Friday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }, \"Saturday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\"
}, \"Sunday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }}",
"beginDate": "2020-08-31",
"endDate": "2020-09-09"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
- 请求示例(2)
{
"name": "testrulename",
"description": "testdescription",
"eventId": 145,
"actionId": 112,
"validAll": 1, //永久有效
"validPeriod": "",
"beginDate": "",
"endDate": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
code | Int | 状态码 | "code": 0 |
success | Boolean | 是否成功 | "success": true |
id | Int | 联动ID | "id": 1 |
- 返回示例:
{
"code": 0,
"success": true,
"data": {
"id": 1
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 1.6 修改联动
- 请求url:
/space/ruleengine/rule/modify
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 联动id |
name | String | 是 | 联动名称,长度20 |
description | String | 是 | 联动说明,长度50 |
eventId | long | 是 | 事件ID,多个事件以英文逗号分隔 |
actionId | long | 是 | 动作ID |
validAll | int | 是 | 生效类型,1-永久有效,0-固定时间段 |
validPeriod | Json | 是 | “全天有效”的时候为空,“固定时间段有效”显示对应的有效时间数组, 格式请严格按照周一到周日示例,否则联动不会生效 |
beginDate | String | 否 | validAll为固定时间段时不能为空,起始时间,格式yyyy-MM-dd |
endDate | String | 否 | validAll为固定时间段时不能为空,结束时间,格式yyyy-MM-dd |
token | String | 是 | token(带在url里面) |
- 请求示例(1)
{
"id": 113,
"name": "testrulename",
"description": "testdescription1111",
"eventId": 145,
"actionId": 112,
"validAll": 0, //固定时间段
"validPeriod": "{ \"Monday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }, \"Tuesday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\"
}, \"Wednesday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }, \"Thursday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\"
}, \"Friday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }, \"Saturday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\"
}, \"Sunday\":{ \"startInclude\":\"0:00\", \"endExclude\":\"23:59\" }}",
"beginDate": "2020-08-31",
"endDate": "2020-09-09"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
- 请求示例(2)
{
"id": 113,
"name": "testrulename",
"description": "testdescription1111",
"eventId": 145,
"actionId": 112,
"validAll": 1, //永久有效
"validPeriod": "",
"beginDate": "",
"endDate": ""
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
code | Int | 状态码 | "code": 0 |
success | Boolean | 是否成功 | "success": true |
- 返回示例:
{
"code": 0,
"success": true
}
1
2
3
4
5
2
3
4
5
# 1.7 联动详情
- 请求url:
/space/ruleengine/rule/getById
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 联动id |
token | String | 是 | token |
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
id | Int | 联动id | "id": 113 |
name | String | 联动名称 | "name": "testactionname" |
description | String | 联动说明 | "description": "testdescription1111" |
validAll | Boolean | 生效周期类型(1:全天有效, 0:固定时间段) | "validAll": true |
validPeriod | String | 有效期,JSON字符串(全天有效时为空) | "validPeriod": "" |
beginDate | String | 起始时间 | "beginDate": "1000-01-01T00:00:00.000+0800" |
endDate | String | 结束时间 | "endDate": "1000-01-01T00:00:00.000+0800" |
status | Boolean | 启用状态,0-停用,1-启用 | "status": 0 |
eventObj | array | ||
id | Int | 事件id | "id": 145 |
name | String | 事件名称 | "name": "测试对象模型消息002" |
type | String | 事件触发类型名称 | "type": "app" |
condition | String | 触发条件 | "condition":"[]" |
actionObj | array | ||
actionId | Int | 动作id | "actionId": 156 |
actionName | String | 动作名称 | "actionName": "tee" |
actionType | String | 动作类型(app/推送消息至应用-携带空间设备:无,appWithNearbyDevices/推送至应用-携带空间设备:携带,device/推送消息至设备-指定设备,nearbyDevices/推送消息至设备-事件所在范围内的设备,toAlarm/转换为告警,toNotification/转换为通知) | "actionType": "device" |
actionExplain | String | 动作说明 | "actionExplain": "tet" |
applyDevice | String | 具体应用(appid)/具体设备(DIN/subID) | applyDevice": "200200000000001108,200200000000000336,200200000000001104" |
msgType | String | 消息类型(original/custom) | "msgType": "custom" |
actionContent | String | 消息内容 | "actionContent": "{"action":"open","device_id":"%%(value.device)","item":"%%(value.list[0])","item2":"%%(value.list[2])"}" |
createdTime | String | 创建时间 | "createdTime": "2020-08-24T17:45:57.000+0800" |
sinkConfig | String | 动作sinkConfig | "sinkConfig": "{"nearbySearch"{"objectPoiCode":"w0701003","deviceAssign":"deviceId"}}" |
- 返回示例:
{
"code": 0,
"data": {
"actionObj": {
"actionType": "device",
"msgType": "custom",
"actionContent": "{\"action\":\"open\",\"device_id\":\"%%(value.device)\",\"item\":\"%%(value.list[0])\",\"item2\":\"%%(value.list[2])\"}",
"actionExplain": "tet",
"actionId": 156,
"createdTime": "2020-08-24T17:45:57.000+0800",
"sinkConfig": "{\"nearbySearch\":{\"objectPoiCode\":\"w0701003\",\"deviceAssign\":\"deviceId\"}}",
"deviceAssign": "deviceId",
"applyDevice": "200200000000001108,200200000000000336,200200000000001104",
"actionName": "tee"
},
"beginDate": "1000-01-01T00:00:00.000+0800",
"endDate": "1000-01-01T00:00:00.000+0800",
"name": "testactionname",
"description": "testdescription1111",
"id": 113,
"validAll": true,
"validPeriod": "",
"eventObj": [
{
"condition": "[{\"type\":\"objmodel\",\"attr\":\"故障(Fault)\",\"oper\":\"=\",\"val\":\"1\",\"obj\":{\"id\":\"Fault\",\"name\":\"故障\",\"type\":\"enum\",\"modelName\":\"生活水泵\",\"modelId\":105,\"define\":{\"mapping\":{\"0\":\"无故障\",\"1\":\"有故障\"},\"type\":\"enum\"}}}]",
"name": "测试对象模型消息002",
"id": 145,
"type": "app"
}
],
"status": 0
},
"success": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 2. 动作管理-只允许操作应用所属项目下的
# 2.1 动作列表查询
- 请求url:
/space/ruleengine/action/getList
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
actionType | String | 否 | 动作类型(app,device,toAlarm,toNotification) |
actionName | String | 否 | 动作名称/动作ID |
pageSize | int | 是 | 每页数量 |
pageNumber | int | 是 | 页码 |
token | String | 是 | token |
- 请求示例:
/ruleengine/action/getList?
pageNumber=
&pageSize=
&token=
1
2
3
4
2
3
4
- 返回参数:
字段 | 参数类型 | 字段描述 | 示例 |
---|---|---|---|
pageSize | Int | 每页数据量 | "pageSize": 10 |
pageNumber | Int | 当前页码 | "pageNumber": 1 |
totalRow | Int | 列表总条数 | "totalRow": 2 |
totalPage | Int | 总页码 | "totalPage": 1 |
list | array | ||
actionId | Int | 动作id | "actionId": 158 |
actionName | String | 动作名称 | "actionName": "rar" |
actionType | String | 动作类型 | "actionType": "device" |
actionExplain | String | 动作说明 | "actionExplain": "fee" |
msgType | String | 消息类型(original/custom) | "msgType": "origin" |
msgContent | String | 消息内容 | "msgContent": "" |
createdTime | String | 创建时间 | "createdTime": "2020-08-25T11:54:35.000+0800" |
datapoint | String | 功能码 | "datapoint": "112233" |
appid | Int | appid | "appid": 0 |
din | String | 设备在微瓴唯一标识 | "din": "200200000000001108,200200000000001104,200200000000000336" |
link | array | 联动规则名称 | "link": [] |
sinkConfig | String | 动作sinkConfig | "sinkConfig": "{"nearbySearch":{"objectPoiCode":"w0701003","deviceAssign":"deviceId"}}" |
- 返回示例:
{
"code": 0,
"data": {
"totalRow": 2,
"pageNumber": 1,
"totalPage": 1,
"pageSize": 10,
"list": [
{
"actionType": "device",
"datapoint": "112233",
"msgType": "origin",
"msgContent": "",
"actionExplain": "fee",
"appid": 0,
"din": "200200000000001108,200200000000001104,200200000000000336",
"link": [],
"actionId": 158,
"createdTime": "2020-08-25T11:54:35.000+0800",
"sinkConfig": "{\"nearbySearch\":{\"objectPoiCode\":\"w0701003\",\"deviceAssign\":\"deviceId\"}}",
"actionName": "rar"
},
{
"actionType": "app",
"datapoint": "",
"msgType": "origin",
"msgContent": "",
"actionExplain": "action_explain",
"appid": 100323,
"din": "",
"link": [],
"actionId": 157,
"createdTime": "2020-08-25T11:10:05.000+0800",
"sinkConfig": "{\"nearbySearch\":{\"objectPoiCode\":\"\",\"deviceAssign\":\"deviceType\"}}",
"actionName": "log_action"
}
]
},
"success": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 2.2 添加动作
- 请求url:
/space/ruleengine/action/add
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
actionName | String | 是 | 动作名称,长度15 |
actionType | String | 是 | 动作类型-app(推送消息至应用)/appWithNearbyDevices(推送消息至应用,携带空间设备)/device(推送消息至设备)/nearbyDevices(推送消息至设备,携带空间设备)/toAlarm(转告警)/toNotification(转通知) |
actionExplain | String | 是 | 动作说明,长度50 |
appId | String | 是 | 应用id,actionType为app/appWithNearbyDevices时不能为空 |
deviceId | String | 否 | 设备id,actionType为device/nearbyDevices时不能为空,为空的话表示没有关联设备 |
dataPoint | String | 否 | dp,actionType类型为device/nearbyDevices时不能为空 |
msgType | String | 是 | 消息类型:origin/custom,当actionType为toAlarm/toNotification时,msgType填origin |
msgContent | String | 否 | 消息内容,msgType值为custom时,msgContent必填 |
token | String | 是 | token(带在url里面) |
sinkConfig | JSON | 是 | 数据下沉配置 |
sinkConfig里面参数 | 说明(字段没有特别说明的都为必填项) | ||
{ "nearbySearch": { "objectLevel": 9, "limit": "1", "objectPoiCode": "w0715000", "scopeLevel": "0", "deviceAssign": "deviceType", "scopeRadius": "12" } } | JSON | 是 | 推送消息至应用,携带空间设备 objectLevel 为要搜索的目标的层级固定填9,即设备层级 limit 为设备限定数量,0~200,默认20个 objectPoiCode 为设备类型编码 scopeLevel 为空间范围,0-同一项目,6-同一建筑,7-同一楼层,8-同一房间/位置区域 deviceAssign 为指定设备 deviceType-按设备类型,deviceId-指定设备 scopeRadius 为搜索半径,单位米,精确到小数点后2位,大于0 |
{ "nearbySearch": { "objectPoiCode": "", "deviceAssign": "deviceType" } } | JSON | 是 | 推送消息至应用,不携带空间设备 objectPoiCode 为设备类型编码 deviceAssign 为指定设备 deviceType-按设备类型,deviceId-指定设备 |
{ "nearbySearch": { "objectPoiCode": "", "deviceAssign": "deviceType" } } | 是 | 推送消息至设备,指定设备 objectPoiCode 为设备类型编码,为空表示全部 deviceAssign 为指定设备 deviceType-按设备类型,deviceId-指定设备 | |
{ "nearbySearch": { "objectLevel": 9, "limit": "11", "objectPoiCode": "", "scopeLevel": "6", "deviceAssign": "deviceType", "scopeRadius": "12" } } | JSON | 是 | 推送消息至设备,事件范围内所在设备 objectLevel 为要搜索的目标的层级固定填9,即设备层级 limit 为设备限定数量,0~200,默认20个 objectPoiCode 为设备类型编码 scopeLevel 为空间范围,0-同一项目,6-同一建筑,7-同一楼层,8-同一房间/位置区域 deviceAssign 为指定设备 deviceType-按设备类型,deviceId-指定设备 scopeRadius 为搜索半径,单位米,精确到小数点后2位,大于0 |
{ "toAlarmConfig": { "secondAlarmTypeName": "入侵检测", "secondAlarmType": "invade", "positionType": "origin", "advice": "test_advice", "firstAlarmTypeName": "安防监控", "description": test_description", "alarmLevel": "2", "position": "", "firstAlarmType": "security_monitoring" } } | JSON | 是 | 转换为告警 secondAlarmTypeName 为二级告警类型名称 secondAlarmType 为二级告警类型 positionType 为告警位置,origin-事件所在位置 custom-自定义位置 advice 为告警处理建议,可以为空 firstAlarmTypeName 为一级告警类型名称 description 为告警描述,可以为空 alarmLevel 为告警级别,1-提示,2-一般,3-紧急,4-严重,5-致命 position 为自定义位置 firstAlarmType 为一级告警类型 |
{ "toNotificationConfig": { "firstNotificationType": "device", "positionType": "origin", "secondNotificationTypeName": "设备", "secondNotificationType": "device", "description": "", "firstNotificationTypeName": "设备", "position": "" } } | JSON | 是 | 转换为通知 firstNotificationType 为一级通知类型 positionType 为告警位置,origin-事件所在位置 custom-自定义位置 firstNotificationTypeName 为一级通知类型名称 secondNotificationType 为二级通知类型 secondNotificationTypeName 为二级通知类型名称 description 为通知描述,可以为空 position 为自定义位置 |
- 请求示例:
{
"actionName": "testactionname",
"actionType": "app",
"actionExplain": "testdescription",
"appId": 145,
"deviceId": 112,
"dataPoint": 1,
"msgType": "origin",
"msgContent": "",
"sinkConfig": "{\"toAlarmConfig\":{\"secondAlarmTypeName\":\"火警\",\"secondAlarmType\":\"fire_alarm\",\"positionType\":\"custom\",\"advice\":\"4444444444\",\"firstAlarmTypeName\":\"消防\",\"description\":\"3333333333\",\"alarmLevel\":\"3\",\"position\":\"222222222222222\",\"firstAlarmType\":\"fire_protecting\"}}"
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
- 返回示例:
{
"code": 0,
"data": {
"id": 159
},
"success": true
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# 2.3 删除动作
- 请求url:
/space/ruleengine/action/deleteById
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 动作id |
token | String | 是 | token(带在url里面) |
- 请求示例:
{ "id": 159}
1
- 返回示例:
{ "code": 0, "success": true}
1
# 2.4 修改动作
- 请求url:
/space/ruleengine/action/modify
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 动作id |
actionName | String | 是 | 动作名称,长度15 |
actionType | String | 是 | 动作类型-app(推送消息至应用)/appWithNearbyDevices(推送消息至应用,携带空间设备)/device(推送消息至设备)/nearbyDevices(推送消息至设备,携带空间设备)/toAlarm(转告警)/toNotification(转通知) |
actionExplain | String | 是 | 动作说明,长度50 |
appId | String | 是 | 应用id,actionType为app/appWithNearbyDevices时不能为空 |
deviceId | String | 否 | 设备id,actionType为device/nearbyDevices时不能为空,为空的话表示没有关联设备 |
dataPoint | String | 否 | dp,actionType类型为device/nearbyDevices时不能为空 |
msgType | String | 是 | 消息类型:origin/custom,当actionType为toAlarm/toNotification时,msgType填origin |
msgContent | String | 否 | 消息内容,msgType值为custom时,msgContent必填 |
sinkConfig | JSON | 是 | 动作sinkConfig,参见添加动作接口sinkConfig字段 |
token | String | 是 | token(带在url里面) |
- 请求示例:
{
"id": 159,
"actionName": "testactionname",
"actionType": "app",
"actionExplain": "testdescription1",
"appId": 145,
"deviceId": 112,
"dataPoint": 1,
"msgType": "origin",
"msgContent": "",
"sinkConfig": "{\"toAlarmConfig\":{\"secondAlarmTypeName\":\"火警\",\"secondAlarmType\":\"fire_alarm\",\"positionType\":\"custom\",\"advice\":\"4444444444\",\"firstAlarmTypeName\":\"消防\",\"description\":\"3333333333\",\"alarmLevel\":\"3\",\"position\":\"222222222222222\",\"firstAlarmType\":\"fire_protecting\"}}"
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
- 返回示例:
{
"code": 0,
"success": true
}
1
2
3
4
2
3
4
# 2.5 动作详情信息
- 请求url:
/space/ruleengine/action/getById
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 动作id |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/action/getById?token=&id=
1
- 返回参数:
返回参数 | 参数类型 | 参数说明 |
---|---|---|
code | String | 错误码,0表示成功,其他见错误码 |
message | String | 执行结果消息 |
data | Json | 查询结果 |
actionId | Long | 动作Id |
actionName | String | 动作名称 |
actionType | String | 动作类型--app/device/toAlarm/toNotification |
actionExplain | String | 动作说明 |
appid | Long | appid |
deviceId | String | deviceId |
msgType | String | 消息类型:origin/custom |
link | Array | 与动作相关的联动名称列表 |
msgContent | String | 消息详情--如果msgType是origin则是空 |
sinkConfig | JSON | 动作sinkConfig |
datapoint | String | dp功能码 |
- 返回示例:
{ "code": 0, "data": { "actionType": "device", "datapoint": "123123", "msgType": "custom", "msgContent": "{\"action\":\"open\",\"device_id\":\"%%(value.device)\",\"item\":\"%%(value.list[0])\",\"item2\":\"%%(value.list[2])\"}", "actionExplain": "tet", "appid": 0, "link": [ "testactionname" ], "actionId": 156, "sinkConfig": "{\"nearbySearch\":{\"objectPoiCode\":\"w0701003\",\"deviceAssign\":\"deviceId\"}}", "deviceId": "200200000000001108,200200000000000336,200200000000001104", "actionName": "tee" }, "success": true}
1
# 2.6 获取项目下所有不同的动作名称
- 请求url:
/space/ruleengine/action/getNames
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
token | String | 是 | token(带在url里面) |
- 请求示例:
/space/ruleengine/action/getNames?
token=
1
2
2
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
code | String | 错误码,0表示成功,其他见错误码 |
message | String | 执行结果消息 |
data | Json | 查询结果 |
list | jsonArray | 动作名称 |
totalRow | Integer | 动作名称总数 |
- 返回示例:
{
"code": 0,
"data": {
"list": [
"测试名称",
"测试",
"test"
],
"totalRow": 3
},
"message": "ok"
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 2.7 根据设备ID查询动作列表
- 请求url:
/space/ruleengine/action/getByDeviceID
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
deviceId | String | 是 | 设备id,逗号分隔,最多100个 |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/action/getByDeviceID?
deviceId=
&token=
1
2
3
2
3
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
list | jsonMap | key为deviceId,value为关联的action数组列表 |
actionId | Int | 动作id |
actionName | String | 动作名称 |
actionType | String | 动作类型(pushApply/pushDeivce) |
actionExplain | String | 动作说明 |
appid | String | 具体应用 |
deviceId | String | 设备id |
datapoint | Int | dp功能码 |
msgType | String | 消息类型(original/custom) |
msgContent | String | 消息内容 |
sinkConfig | String | 数据下沉对象配置 |
- 返回示例:
{
"code":0,
"message":"ok",
"data":{
"pageNumber":1,
"pageSize":10,
"totalPage":20,
"totalRow":200,
"list":{
"$deviceId1":[
{
"actionExplain":"123",
"actionId":123,
"actionName":"测试动作1",
"actionType":"pushApply",
"appid":"123456",
"datapoint":123,
"deviceId":"200200000000001108",
"msgContent":"12312313213131131311313",
"msgType":"custom",
"sinkConfig":"{\"nearbySearch\":{\"objectPoiCode\":\"w0701003\",\"deviceAssign\":\"deviceId\"}}"
}
],
"$deviceId2":[
{
"actionExplain":"123",
"actionId":123,
"actionName":"测试动作1",
"actionType":"pushApply",
"appid":"123456",
"datapoint":123,
"deviceId":"200200000000001108",
"msgContent":"12312313213131131311313",
"msgType":"custom",
"sinkConfig":"{\"nearbySearch\":{\"objectPoiCode\":\"w0701003\",\"deviceAssign\":\"deviceId\"}}"
}
]
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 2.8 根据应用ID查询动作列表
- 请求url:
/space/ruleengine/action/getByAppID
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
appId | String | 是 | 应用id,逗号分隔,最多10个 |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/action/getByAppID?appId=&token=
1
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
list | jsonMap | key为deviceId,value为关联的action数组列表 |
actionId | Int | 动作id |
actionName | String | 动作名称 |
actionType | String | 动作类型(pushApply/pushDeivce) |
actionExplain | String | 动作说明 |
appid | String | 具体应用 |
deviceId | String | 设备id |
msgType | String | 消息类型(original/custom) |
msgContent | String | 消息内容 |
- 返回示例:
{
"code":0,
"message":"ok",
"data":{
"pageNumber":1,
"pageSize":10,
"totalPage":20,
"totalRow":200,
"list":{
"$appID1":[
{
"actionExplain":"123",
"actionId":123,
"actionName":"测试动作1",
"actionType":"app",
"appid":"123456",
"msgContent":"12312313213131131311313",
"msgType":"custom"
}
],
"$appID2":[
{
"actionExplain":"123",
"actionId":123,
"actionName":"测试动作1",
"actionType":"app",
"appid":"123456",
"msgContent":"12312313213131131311313",
"msgType":"custom"
}
]
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 3.事件管理-只允许操作应用所属项目下的
# 3.1 事件列表查询
- 请求url:
/space/ruleengine/event/getList
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
type | String | 否 | 事件触发类型(app, device, timer) |
keyWords | String | 否 | 事件名称/事件id |
pageSize | Int | 是 | 每页数量 |
pageNumber | Int | 是 | 页码 |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/event/getList?type=&keyWords=&pageSize=&pageNumber=&token=
1
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
pageSize | Int | 每页数据量 |
pageNumber | Int | 当前页码 |
totalRow | Int | 列表总条数 |
totalPage | Int | 总页码 |
list | array | |
id | Int | 事件id |
name | String | 事件名称 |
triggerType | String | 事件触发类型(app) |
triggerCondition | String | 触发条件 |
effectivePeriod | String | 有效期 |
link | array | 已关联联动名称 |
createdTime | String | 创建时间 |
poiCode | String | 设备或应用系统分类编号--当触发类型为deviceType返回 |
din | String | 设备的din--当触发类型为device的时候返回 |
- 返回示例:
{
"code": 0,
"data": {
"list": [
{
"triggerCondition": "[{\"type\":\"custom\",\"attr\":\"test\",\"oper\":\"=\",\"val\":\"23\",\"obj\":\"\"}]",
"name": "测试测试对象模型消息",
"link": [
"log——rule"
],
"createdTime": "2020-08-19T17:29:55.000+0800",
"id": 147,
"triggerType": "app",
"triggerTime": "",
"poiCode": ""
},
{
"triggerCondition": "[{\"type\":\"objmodel\",\"attr\":\"状态(Status)\",\"oper\":\">\",\"val\":\"1\",\"obj\":{\"id\":\"Status\",\"name\":\"状态\",\"type\":\"int\",\"modelName\":\"红外对射感烟探测器
\",\"modelId\":138,\"define\":{\"type\":\"int\"}}}]",
"name": "测试对象模型消息003",
"link": [
"测试对象模型事件联动001"
],
"createdTime": "2020-08-19T15:37:37.000+0800",
"id": 146,
"triggerType": "deviceType",
"triggerTime": "",
"poiCode": "w0701003"
}
"pageNumber": 1,
"pageSize": 10,
"totalPage": 1,
"totalRow": 2
},
"message": "ok"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 3.2 添加事件
- 请求url:
/space/ruleengine/event/add
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
eventName | String | 是 | 事件名称,长度15 |
triggerType | String | 是 | 事件触发类型 timer(定时器)/app(应用触发)/device(设备触发) |
eventExplain | String | 是 | 事件说明,长度50 |
triggerTime | String | 是 | 触发时间--对应触发类型为timer,注意:该参数为cron表达式,从分钟开始写起,后台会缺省补充秒那一位为0,否则会校验失败 |
msgContent | String | 是 | 触发消息内容--对应触发类型为app/device |
appId | Long | 否 | 上报应用appid--对应触发类型为app |
din | String | 是 | din--对应触发类型的deviceId |
poiCode | String | 否 | 设备类型--对应触发类型为device |
token | String | 是 | token(带在url里面) |
msgContent(格式为JSON串) | 字段释义 |
---|---|
[{ "type": "custom", "attr":"content.properties.test_six", "oper":"<", "val":"23", obj": { "id": 9, "name": "test", "type": "double", "modelId": "3414", "modelName": "直流屏", "eventId": "12", "eventName": "事件名称", "define": "属性定义"} ] | type : custom - 自定义数据,objmodel - 标准对象模型数据 attr : 匹配属性,用来与上报消息格式字段匹配 oper : 判断符号,如>、<、>=等 val : 判断值 obj : 消息管理对象模型属性,当数据类型为标准对象模型数据时存在 { id : 属性id name : 属性名称 type : 属性类型 modelId : 属性所属对象模型编号 modelName : 属性所属对象模型名称 eventId : 属性所属对象模型事件编号,为空时属性直属于对象模型 eventName : 属性所属对象模型事件名称 define : "" 属性定义} |
请求示例:
- 定时器触发
{
"eventName": "testEventName",
"triggerType": "timer",
"eventExplain": "testexplain",
"appId": "10000",
"din": "",
"triggerTime": "0/1 * * * ?", //每分钟执行一次,后台会在cron前面补充0,即0 0/1 * * * ?
"msgContent": "[{\"attr\":\"123\",\"oper\":\"!=\",\"val\":\"12\"}]",
"poiCode": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
- 应用触发 - 标准对象模型
{
"eventName": "testEventName",
"triggerType": "app",
"eventExplain": "testexplain",
"appId": "10000",
"din": "",
"triggerTime": "",
"msgContent": "[{\"type\":\"objmodel\",\"attr\":\"content.properties.test_six\",\"oper\":\"<\",\"val\":\"23\",\"obj\":{\"id\":\"test_six\",\"name\":\"test_six\",\"type\":\"double\",\"modelName\":\"直流屏\",\"modelId\":3414,\"define\":{\"unit\":\"33\",\"min\":1,\"max\":3,\"step\":1,\"type\":\"double\"}}}]",
"poiCode": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
- 应用触发 - 自定义模型
{
"eventName": "testEventName",
"triggerType": "app",
"eventExplain": "testexplain",
"appId": "10000",
"din": "",
"triggerTime": "",
"msgContent": "[{\"attr\":\"123\",\"oper\":\"!=\",\"val\":\"12\"}]",
"poiCode": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
- 设备触发 - 标准对象模型
{
"eventName": "testEventName",
"triggerType": "deviceType",
"eventExplain": "testexplain",
"appId": "10000",
"din": "",
"triggerTime": "",
"msgContent": "[{\"type\":\"objmodel\",\"attr\":\"properties.sad\",\"oper\":\"=\",\"val\":\"2\",\"obj\":{\"id\":\"sad\",\"name\":\"sda1\",\"type\":\"bool\",\"modelName\":\"高压配电设备-未分类\",\"modelId\":116,\"define\":{\"mapping\":{\"0\":\"1\",\"1\":\"2\",\"true\":\"2\",\"false\":\"1\"},\"type\":\"bool\"}}}]",
"poiCode": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
- 设备触发 - 自定义模型
{
"eventName": "testEventName",
"triggerType": "deviceType",
"eventExplain": "testexplain",
"appId": "10000",
"din": "",
"triggerTime": "",
"msgContent": "[{\"attr\":\"123\",\"oper\":\"!=\",\"val\":\"12\"}]",
"poiCode": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
返回参数:
返回参数 | 参数类型 | 参数说明 |
---|---|---|
code | String | 错误码,0表示成功,其他表示失败 |
data | Json | 执行结果消息 |
- 返回示例:
{
"code": 0,
"data": {
"id": 148
},
"success": true
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# 3.3 删除事件
- 请求url:
/space/ruleengine/event/deleteById
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 事件id |
token | String | 是 | token(带在url里面) |
- 请求示例:
{
"id": "148"
}
1
2
3
2
3
- 返回示例:
{
"code": 0,
"success": true
}
1
2
3
4
2
3
4
# 3.4 修改事件
- 请求url:
/space/ruleengine/event/modify
- 请求方式:
POST
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | Int | 是 | 事件id |
eventName | String | 是 | 事件名称,长度15 |
triggerType | String | 是 | 事件触发类型 timer/app/device |
eventExplain | String | 是 | 事件说明,长度50 |
triggerTime | Long | 是 | 触发事件--对应触发类型为timer,注意:该参数为cron表达式,从分钟开始写起,后台会缺省补充秒那一位为0,否则会校验失败 |
msgContent | String | 是 | 触发消息内容--对应触发类型为app/device(参数格式可参考【3.2 添加事件】msgContent 字段说明) |
appId | Long | 否 | 上报应用appid--对应触发类型为app |
din | String | 是 | din--对应触发类型为device |
poiCode | String | 否 | 设备类型--对应触发类型为device |
token | String | 是 | token(带在url里面) |
- 请求示例:
{
"id":149,
"eventName": "testEventName",
"triggerType": "timer",
"eventExplain": "testexplain",
"appId": "10000",
"din": "",
"triggerTime": "0/1 * * * ?", //每分钟执行一次,后台会在cron前面补充0,即0 0/1 * * * ?
"msgContent": "[{\"attr\":\"123\",\"oper\":\"!=\",\"val\":\"12\"}]",
"poiCode": ""
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
- 返回示例:
{
"code": 0,
"success": true
}
1
2
3
4
2
3
4
# 3.5 事件详情信息
- 请求url:
/space/ruleengine/event/getById
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
id | long | 是 | 事件id |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/event/getById?
id=
&token=
1
2
3
2
3
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
code | String | 错误码,0表示成功,其他见错误码 |
success | boolean | 是否执行成功 |
data | Json | 查询结果 |
eventId | Long | 事件Id |
eventName | String | 事件名称 |
triggerType | String | 事件触发类型--app/timer/device |
eventExplain | String | 事件说明 |
appId | Long | 应用上报appid--timer时为空 |
din | String | 设备id--触发类型为device时不为空 |
msgContent | String | 触发消息--timer时为空 |
triggerTime | String | 触发事件--app时为空 |
link | Array(String) | 与事件相关的联动名称列表 |
createdTime | Date | 创建时间 |
poiCode | String | poicode |
- 返回示例:
{
"code": 0,
"data": {
"eventId": 149,
"msgContent": "[{\"attr\":\"123\",\"oper\":\"!=\",\"val\":\"12\"}]",
"appId": 10000,
"eventExplain": "testexplain",
"din": "",
"link": [
"testrule001"
],
"eventName": "testEventName",
"createdTime": "2020-08-25T19:40:48.000+0800",
"triggerType": "timer",
"triggerTime": "0 0/1 * * * ?",
"poiCode": ""
},
"success": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 3.6 获取项目下所有不同的事件名称
- 请求url:
/space/ruleengine/event/getNames
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
token | String | 是 | token |
- 请求示例:
/space/ruleengine/event/getNames?
token=
1
2
2
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
code | String | 错误码,0表示成功,其他见错误码 |
message | String | 执行结果消息 |
data | Json | 查询结果 |
list | jsonArray(String) | 事件名称 |
totalRow | Integer | 事件名称总数 |
- 返回示例:
{
"code": 0,
"message": "ok",
"data": {
"list": ["事件名称", "事件", "test"],
"totalRow": 3
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 3.7 根据设备ID查询事件列表
- 请求url:
/space/ruleengine/event/getByDeviceID
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
deviceId | String | 是 | 设备id,逗号分隔,最多100个 |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/event/getByDeviceID?
deviceId=
&token=
1
2
3
2
3
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
data | jsonMap | key为deviceId,value为关联的event数组列表 |
id | Int | 事件id |
name | String | 事件名称 |
triggerType | String | 事件触发类型(device) |
triggerCondition | String | 触发条件 |
- 返回示例:
{
"code": 0,
"data": {
"200900000000006754": [
{
"triggerCondition": "[{\"type\":\"custom\",\"attr\":\"fgd\",\"oper\":\">\",\"val\":\"gw\",\"obj\":\"\"}]",
"name": "test01",
"id": 212,
"triggerType": "device"
}
],
"200900000000006751": [
{
"triggerCondition": "[{\"type\":\"objmodel\",\"attr\":\"sda1(sad)\",\"oper\":\"=\",\"val\":\"567\",\"obj\":{\"id\":\"sad\",\"name\":\"sda1\",\"type\":\"bool\",\"modelName\":\"高压配电设备-未分类
\",\"modelId\":116,\"define\":{\"mapping\":{\"0\":\"1\",\"1\":\"2\",\"true\":\"2\",\"false\":\"1\"},\"type\":\"bool\"}}}]",
"name": "test02",
"id": 214,
"triggerType": "device"
}
],
"200900000000006750": [
{
"triggerCondition": "[{\"type\":\"custom\",\"attr\":\"fgd\",\"oper\":\">\",\"val\":\"gw\",\"obj\":\"\"}]",
"name": "test03",
"id": 212,
"triggerType": "device"
}
]
},
"success": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 3.8 根据应用ID查询事件列表
- 请求url:
/space/ruleengine/event/getByAppID
- 请求方式:
GET
- 请求参数:
请求参数 | 参数类型 | 是否必填 | 参数说明 |
---|---|---|---|
appId | String | 是 | 应用id,逗号分隔,最多100个 |
token | String | 是 | token |
- 请求示例:
/space/ruleengine/event/getByAppID?
appID=
1
2
2
- 返回参数
返回参数 | 参数类型 | 参数说明 |
---|---|---|
data | jsonMap | key为deviceId,value为关联的event数组列表 |
id | Int | 事件id |
name | String | 事件名称 |
triggerType | String | 事件触发类型(app) |
triggerCondition | String | 触发条件 |
- 返回示例:
{
"code": 0,
"data": {
"100483": [
{
"triggerCondition": "[{\"attr\":\"testlf\",\"oper\":\">\",\"val\":\"888\"}]",
"name": "应用上报触发事件01",
"id": 143,
"triggerType": "app"
},
{
"triggerCondition": "[{\"attr\":\"123\",\"oper\":\"!=\",\"val\":\"12\"}]",
"name": "testEventNamelf0907",
"id": 233,
"triggerType": "app"
}
],
"100399": [
{
"triggerCondition": "[{\"type\":\"custom\",\"attr\":\"1\",\"oper\":\">\",\"val\":\"1\",\"obj\":\"\"},{\"type\":\"custom\",\"attr\":\"1\",\"oper\":\">\",\"val\":\"1\",\"obj\":\"\"},
{\"type\":\"custom\",\"attr\":\"2\",\"oper\":\"=\",\"val\":\"1\",\"obj\":\"\"},{\"type\":\"custom\",\"attr\":\"4\",\"oper\":\">\",\"val\":\"4\",\"obj\":\"\"},
{\"type\":\"custom\",\"attr\":\"6\",\"oper\":\">\",\"val\":\"6\",\"obj\":\"\"},{\"type\":\"custom\",\"attr\":\"7\",\"oper\":\">=\",\"val\":\"45\",\"obj\":\"\"},
{\"type\":\"custom\",\"attr\":\"234\",\"oper\":\">\",\"val\":\"324\",\"obj\":\"\"},{\"type\":\"custom\",\"attr\":\"7654\",\"oper\":\">=\",\"val\":\"345\",\"obj\":\"\"},
{\"type\":\"custom\",\"attr\":\"215435\",\"oper\":\"<=\",\"val\":\"5431\",\"obj\":\"\"}]",
"name": "应用上报触发事件02",
"id": 218,
"triggerType": "app"
},
{
"triggerCondition": "[{\"type\":\"objmodel\",\"attr\":\"设备状态(Status)\",\"oper\":\">\",\"val\":\"1\",\"obj\":{\"id\":\"Status\",\"name\":\"设备状态\",\"type\":\"int\",\"modelName\":\"火灾自动报警及联动系统-未分
类\",\"modelId\":2118,\"define\":{\"type\":\"int\"}}},{\"type\":\"objmodel\",\"attr\":\"告警(device_fault)-时间戳(eventTs)\",\"oper\":\"<\",\"val\":\"1\",\"obj\":
{\"id\":\"eventTs\",\"name\":\"时间戳\",\"type\":\"long\",\"modelName\":\"火灾自动报警及联动系统-未分类\",\"modelId\":2118,\"eventName\":\"告警\",\"eventId\":\"device_fault\",\"define\":
{\"type\":\"long\"}}}]",
"name": "应用上报触发事件03",
"id": 219,
"triggerType": "app"
}
]
},
"success": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41