http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/template/list
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| appId | 是 | Integer | 应用标识 |
| pager | 否 | Pager | 分页参数 |
正确的Json返回结果:
{
"code": 0,
"data": {
"pager": {
"hasPrevPage": false,
"currPageRows": 10,
"pageRows": 10,
"paged": false,
"pageStartRow": 0,
"pageIndex": 1,
"hasNextPage": true,
"pageEndRow": 9,
"totalPages": 6,
"defaultPageRows": 20,
"totalRows": 56
},
"list": [{
"summary": "数联02",
"sceneType": 0,
"sceneName": "数联02",
"pictureUrl": "",
"sceneId": 1001,
"sceneDeviceVOList": [{
"deviceTypeId": 431,
"productId": 11305,
"productName": "西门子 10A 智能插座(2USB)/11305"
}]
}]
},
"msg": "成功"
}
| 字段名称 | 字段类型 | 字段说明 |
|---|---|---|
| pager | Object | 分页相关信息 |
| list | List | 场景模版列表 |
| summary | String | 场景简介 |
| sceneType | Integer | 场景类型 |
| sceneName | String | 场景名称 |
| pictureUrl | String | 图片地址 |
| sceneId | Integer | 场景ID |
| sceneDeviceVOList | List | 场景设备列表 |
| deviceTypeId | Integer | 设备类型ID |
| productId | Integer | 产品ID |
| productName | Integer | 产品名称 |
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/template/detail
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| sceneId | 是 | Integer | 场景模版ID |
正确的Json返回结果:
{
"code": 0,
"data": {
"summary": "全部关全部关",
"sceneName": "全部关",
"pictureUrl": "",
"sceneId": 1235,
"detail": {
"conditionInstances": [{
"deviceTypeId": 12288,
"conditionName": "海曼智能水浸探测器-状态",
"operatorName": "是",
"conditionTypeId": 1,
"conProductId": 12288,
"deviceTypeName": "海曼智能水浸探测器",
"conditionValueName": "是漏水",
"condtionOptionId": 824,
"conditionInstanceId": 7439
}],
"actions": [{
"deviceTypeId": 13254,
"actionsItems": [{
"functionName": "三路开关",
"unitCode": "无",
"configDataField": "Switch_3_OnOff_Null",
"functionParamName": "关"
},
{
"functionName": "二路开关",
"unitCode": "无",
"configDataField": "Switch_2_OnOff_Null",
"functionParamName": "关"
},
{
"functionName": "一路开关",
"unitCode": "无",
"configDataField": "Switch_1_OnOff_Null",
"functionParamName": "关"
}
],
"actionsType": 1,
"deviceTypeName": "三路智能开关",
"actionsId": 5130,
"actProductId": 13254
}]
}
},
"msg": "成功"
}
| 字段名称 | 字段类型 | 字段说明 |
|---|---|---|
| pager | Object | 分页相关信息 |
| list | List | 场景列表信息 |
| summary | String | 场景简介 |
| sceneName | String | 场景名称 |
| pictureUrl | String | 图片地址 |
| sceneId | Integer | 场景模版ID |
| detail | Object | 场景模版详情 |
| userConditionInstances | List | 场景详情-条件列表 |
| deviceTypeId | Integer | 设备类型ID |
| conditionName | String | 条件名称 |
| operatorName | String | 操作名称 |
| conditionTypeId | Integer | 条件类型ID |
| conProductId | Integer | 产品ID |
| deviceTypeName | String | 条件类型名称 |
| conditionValueName | String | 条件值名称 |
| condtionOptionId | Integer | 条件选项名称 |
| conditionInstanceId | Integer | 条件实例ID |
| actions | List | 场景模版详情-动作列表 |
| deviceTypeId | Integer | 设备类型ID |
| deviceTypeName | String | 设备类型名称 |
| actionsType | Integer | 动作类型 |
| actionsId | String | 动作Id |
| actProductId | String | 产品ID |
| actionsItems | List | 动作明细 |
| functionName | String | 方法名称 |
| unitCode | String | 单位 |
| configDataField | String | 配置数据列 |
| functionParamName | String | 方法参数名称 |
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/template/adapt
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| conDeviceIdsStr | 否 | String | 条件对应传入的设备ID {"conditionInstanceId":"deviceId", ...} |
| actDeviceIdsStr | 是 | String | 动作对应传入的设备ID {"actionsId":"deviceId", ...} |
| appId | 是 | Integer | 应用标识 |
| userId | 是 | Integer | 用户ID |
| sceneId | 是 | Integer | 场景模版Id |
| userSceneName | 是 | String | 实例场景名称 |
正确的Json返回结果:
{
"code": 0,
"data": {
"summary": "C-Life,生活本该如此,畅享智能场景!",
"sceneId": 0,
"validity": 1,
"detail": {
"userActions": [{
"pictureUrl": "http://skintest.hetyj.com/a9283a016c2040b43ec70263eb025a45.png",
"delayTime": 0,
"deviceId": "77E5389FC3AD4DECE3C56FBCDCFC63FF",
"deviceName": "天王盖地虎WIFI版(普通设备)",
"userActionsType": 1,
"userActionsId": 79674,
"userActionsItems": [{
"functionParamId": 4237,
"unitCode": "",
"configDataField": "Switch",
"deviceFunctionId": 1623,
"deviceFunctionName": "开关",
"functionParamName": "开",
"actionParamValue": "1"
}]
}],
"userConditionInstances": [{
"conditionOptionName": "定时时间",
"conditionName": "定时参数",
"conditionValueName": "07:00",
"conditionTypeName": "定时时间",
"repetition": "0,1,2,3,4,5,6,",
"operatorName": "是",
"conditionTypeId": 3,
"conditionId": 25,
"userConditionInstanceId": 31687,
"unitCode": "",
"conditionValue": "07:00|0,1,2,3,4,5,6,",
"conditionTypeKey": "TIMMING",
"timePoint": "07:00",
"operatorId": 1
}],
"expression": "&&",
"enableTime": "MON,TUE,WED,THU,FRI,SAT,SUN;00:00-23:59"
},
"userSceneId": "772303c4704e4906bc2c34401871a9b2",
"userSceneName": "定时-07:00开启设备",
"runStatus": 1,
"userSceneType": 0
},
"msg": "成功"
}
| 字段名称 | 字段类型 | 字段说明 |
|---|---|---|
| summary | String | 场景简介 |
| sceneId | Integer | 场景模板ID |
| validity | Integer | 场景是否有效 |
| userSceneId | String | 实例场景ID |
| userSceneName | String | 实例场景名称 |
| runStatus | Integer | 场景状态 |
| userSceneType | Integer | 实例场景类型 |
| detail | Object | 实例场景详情 |
| userActions | List | 场景详情-动作列表 |
| pictureUrl | String | 图片地址 |
| delayTime | String | 延迟时间 |
| deviceId | String | 设备ID |
| deviceName | String | 设备名称 |
| userActionsType | String | 动作类型 |
| userActionsId | String | 实例动作Id |
| userActionsItems | List | 实例动作明细 |
| functionParamId | Integer | 方法参数ID |
| unitCode | String | 单位 |
| configDataField | String | 配置数据列 |
| deviceFunctionId | Integer | 设备方法ID |
| deviceFunctionName | String | 设备方法名称 |
| functionParamName | String | 方法参数名称 |
| actionParamValue | String | 动作参数值 |
| userConditionInstances | List | 场景详情-条件列表 |
| conditionOptionName | String | 条件选项名称 |
| conditionName | String | 条件名称 |
| conditionValueName | String | 条件值名称 |
| conditionTypeName | String | 条件类型名称 |
| repetition | String | 重复执行日期 |
| operatorName | String | 操作名称 |
| conditionTypeId | Integer | 条件类型ID |
| conditionId | Integer | 条件ID |
| userConditionInstanceId | Integer | 实例条件实例Id |
| unitCode | String | 单位 |
| conditionValue | String | 条件值 |
| conditionTypeKey | String | 条件类型key |
| timePoint | String | 时间节点 |
| operatorId | Integer | 操作Id |
| expression | String | 条件表达式 |
| enableTime | String | 场景开启时间 |
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/list
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| appId | 是 | Integer | 应用标识 |
| userId | 是 | Integer | 用户ID |
| pager | 否 | Pager | 分页参数 |
正确的Json返回结果:
{
"code":0,
"data":{
"pager":{
"hasPrevPage":false,
"currPageRows":5,
"pageRows":10,
"paged":false,
"pageStartRow":0,
"pageIndex":1,
"hasNextPage":false,
"pageEndRow":9,
"totalPages":1,
"defaultPageRows":20,
"totalRows":5
},
"list":[
{
"summary":"C-Life,生活本该如此,畅享智能场景!",
"sceneId":0,
"validity":1,
"detail":{
"userActions":[
{
"pictureUrl":"http://skintest.hetyj.com/a9283a016c2040b43ec70263eb025a45.png",
"delayTime":0,
"deviceId":"77E5389FC3AD4DECE3C56FBCDCFC63FF",
"deviceName":"天王盖地虎WIFI版(普通设备)",
"userActionsType":1,
"userActionsId":79674,
"userActionsItems":[
{
"functionParamId":4237,
"unitCode":"",
"configDataField":"Switch",
"deviceFunctionId":1623,
"deviceFunctionName":"开关",
"functionParamName":"开",
"actionParamValue":"1"
}
]
}
],
"userConditionInstances":[
{
"conditionOptionName":"定时时间",
"conditionName":"定时参数",
"conditionValueName":"07:00",
"conditionTypeName":"定时时间",
"repetition":"0,1,2,3,4,5,6,",
"operatorName":"是",
"conditionTypeId":3,
"conditionId":25,
"userConditionInstanceId":31687,
"unitCode":"",
"conditionValue":"07:00|0,1,2,3,4,5,6,",
"conditionTypeKey":"TIMMING",
"timePoint":"07:00",
"operatorId":1
}
],
"expression":"&&",
"enableTime":"MON,TUE,WED,THU,FRI,SAT,SUN;00:00-23:59"
},
"userSceneId":"772303c4704e4906bc2c34401871a9b2",
"userSceneName":"定时-07:00开启设备",
"runStatus":1,
"userSceneType":0
}
]
},
"msg":"成功"
}
| 字段名称 | 字段类型 | 字段说明 |
|---|---|---|
| pager | Object | 分页相关信息 |
| list | List | 场景列表信息 |
| summary | String | 场景简介 |
| sceneId | Integer | 场景模板ID |
| validity | Integer | 场景是否有效 |
| userSceneId | String | 实例场景ID |
| userSceneName | String | 实例场景名称 |
| runStatus | Integer | 场景状态 |
| userSceneType | Integer | 实例场景类型 |
| detail | Object | 实例场景详情 |
| userActions | List | 场景详情-动作列表 |
| pictureUrl | String | 图片地址 |
| delayTime | String | 延迟时间 |
| deviceId | String | 设备ID |
| deviceName | String | 设备名称 |
| userActionsType | String | 动作类型 |
| userActionsId | String | 实例动作Id |
| userActionsItems | List | 实例动作明细 |
| functionParamId | Integer | 方法参数ID |
| unitCode | String | 单位 |
| configDataField | String | 配置数据列 |
| deviceFunctionId | Integer | 设备方法ID |
| deviceFunctionName | String | 设备方法名称 |
| functionParamName | String | 方法参数名称 |
| actionParamValue | String | 动作参数值 |
| userConditionInstances | List | 场景详情-条件列表 |
| conditionOptionName | String | 条件选项名称 |
| conditionName | String | 条件名称 |
| conditionValueName | String | 条件值名称 |
| conditionTypeName | String | 条件类型名称 |
| repetition | String | 重复执行日期 |
| operatorName | String | 操作名称 |
| conditionTypeId | Integer | 条件类型ID |
| conditionId | Integer | 条件ID |
| userConditionInstanceId | Integer | 实例条件实例Id |
| unitCode | String | 单位 |
| conditionValue | String | 条件值 |
| conditionTypeKey | String | 条件类型key |
| timePoint | String | 时间节点 |
| operatorId | Integer | 操作Id |
| expression | String | 条件表达式 |
| enableTime | String | 场景开启时间 |
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/detail
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| appId | 是 | Integer | 应用标识 |
| userId | 是 | Integer | 用户ID |
| userSceneId | 是 | Integer | 实例场景ID |
正确的Json返回结果:
{
"code": 0,
"data": {
"summary": "C-Life,生活本该如此,畅享智能场景!",
"sceneId": 0,
"validity": 1,
"detail": {
"userActions": [{
"pictureUrl": "http://skintest.hetyj.com/a9283a016c2040b43ec70263eb025a45.png",
"delayTime": 0,
"deviceId": "77E5389FC3AD4DECE3C56FBCDCFC63FF",
"deviceName": "天王盖地虎WIFI版(普通设备)",
"userActionsType": 1,
"userActionsId": 79674,
"userActionsItems": [{
"functionParamId": 4237,
"unitCode": "",
"configDataField": "Switch",
"deviceFunctionId": 1623,
"deviceFunctionName": "开关",
"functionParamName": "开",
"actionParamValue": "1"
}]
}],
"userConditionInstances": [{
"conditionOptionName": "定时时间",
"conditionName": "定时参数",
"conditionValueName": "07:00",
"conditionTypeName": "定时时间",
"repetition": "0,1,2,3,4,5,6,",
"operatorName": "是",
"conditionTypeId": 3,
"conditionId": 25,
"userConditionInstanceId": 31687,
"unitCode": "",
"conditionValue": "07:00|0,1,2,3,4,5,6,",
"conditionTypeKey": "TIMMING",
"timePoint": "07:00",
"operatorId": 1
}],
"expression": "&&",
"enableTime": "MON,TUE,WED,THU,FRI,SAT,SUN;00:00-23:59"
},
"userSceneId": "772303c4704e4906bc2c34401871a9b2",
"userSceneName": "定时-07:00开启设备",
"runStatus": 1,
"userSceneType": 0
},
"msg": "成功"
}
| 字段名称 | 字段类型 | 字段说明 |
|---|---|---|
| summary | String | 场景简介 |
| sceneId | Integer | 场景模板ID |
| validity | Integer | 场景是否有效 |
| userSceneId | String | 实例场景ID |
| userSceneName | String | 实例场景名称 |
| runStatus | Integer | 场景状态 |
| userSceneType | Integer | 实例场景类型 |
| detail | Object | 实例场景详情 |
| userActions | List | 场景详情-动作列表 |
| pictureUrl | String | 图片地址 |
| delayTime | String | 延迟时间 |
| deviceId | String | 设备ID |
| deviceName | String | 设备名称 |
| userActionsType | String | 动作类型 |
| userActionsId | String | 实例动作Id |
| userActionsItems | List | 实例动作明细 |
| functionParamId | Integer | 方法参数ID |
| unitCode | String | 单位 |
| configDataField | String | 配置数据列 |
| deviceFunctionId | Integer | 设备方法ID |
| deviceFunctionName | String | 设备方法名称 |
| functionParamName | String | 方法参数名称 |
| actionParamValue | String | 动作参数值 |
| userConditionInstances | List | 场景详情-条件列表 |
| conditionOptionName | String | 条件选项名称 |
| conditionName | String | 条件名称 |
| conditionValueName | String | 条件值名称 |
| conditionTypeName | String | 条件类型名称 |
| repetition | String | 重复执行日期 |
| operatorName | String | 操作名称 |
| conditionTypeId | Integer | 条件类型ID |
| conditionId | Integer | 条件ID |
| userConditionInstanceId | Integer | 实例条件实例Id |
| unitCode | String | 单位 |
| conditionValue | String | 条件值 |
| conditionTypeKey | String | 条件类型key |
| timePoint | String | 时间节点 |
| operatorId | Integer | 操作Id |
| expression | String | 条件表达式 |
| enableTime | String | 场景开启时间 |
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/list/ids
密钥类型:仅支持项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| userSceneIdList | 是 | String | 实例场景ID列表,如["4d677871", "4f9ebe395"] |
正确的Json返回结果:
{
"code":0,
"data":[
{
"sceneId":0,
"validity":0,
"userSceneId":"5b1540488c864625a2b2c005008aeb1e",
"userSceneName":"智能插座",
"runStatus":0,
"userSceneType":1
},
{
"sceneId":873,
"validity":0,
"userSceneId":"ea38962f25b34f89a3ad53a087e0b077",
"userSceneName":"艾美face场景1-用户离开",
"runStatus":0,
"userSceneType":1
}
],
"msg":"成功"
}
| 字段名称 | 字段类型 | 字段说明 |
|---|---|---|
| sceneId | Integer | 场景模板ID |
| validity | Integer | 场景是否有效 |
| userSceneId | String | 实例场景ID |
| userSceneName | String | 实例场景名称 |
| runStatus | Integer | 场景状态 |
| userSceneType | Integer | 实例场景类型 |
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/start
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| userSceneId | 是 | String | 实例场景ID |
正确的Json返回结果:
{
"data": true,
"code": 0
}
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/stop
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| userSceneId | 是 | String | 实例场景ID |
正确的Json返回结果:
{
"data": true,
"code": 0
}
http请求方式: POST
https://iot-cloudapi.clife.cn/v5x/open/api/scene/user/delete
密钥类型:仅限项目密钥
| 参数名称 | 是否必须 | 字段类型 | 参数说明 |
|---|---|---|---|
| userSceneId | 是 | String | 实例场景ID |
正确的Json返回结果:
{
"data": {},
"code": 0
}