智能小程序 Ray 开发面板 SDK —— 智能设备模型通用能力一键执行 SDK 汇总(一)

getTapToRunRules

描述

查询当前家庭下可绑定的一键执行列表,会去掉失效或自动化规则。

请求参数

参数数据类型说明是否必填
devIdstring设备 ID,默认从设备环境中取
gidstring家庭 ID,默认从当前家庭中取
containStandardZigBeeboolean是否包含标准场景,默认为 false

返回参数

参数数据类型说明
responseArray一键执行列表
response.actionsArray<ISceneAction>执行动作
response.backgroundstring背景图地址
response.boundForPanelboolean面板绑定
response.boundForWiFiPanelbooleanWiFi 面板绑定
response.coverIconstring图标
response.displayColorstring背景颜色
response.enabledboolean规则是否启用
response.idstring执行规则 ID
response.namestring联动名称或备注

ISceneAction

参数数据类型说明
actionDisplaystring执行动作的显示名称
actionExecutorstring执行动作的执行者
actionStrategystring执行动作的策略
entityIdstring实体ID,表示动作所属的实体的ID
gmtModifiednumber修改时间戳
idstring动作的唯一ID
orderNumnumber动作的顺序号
ruleIdstring规则ID,表示动作所属的规则的ID
statusboolean动作状态

👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。   

请求示例

import { SmartTapToRunAbility } from '@ray-js/panel-sdk';
 
const TapToRun = new SmartTapToRunAbility();
TapToRun.getTapToRunRules()
  .then((response) => {
    console.log(response);
  })
  .catch();
 
console.log('=== result: ', result);

返回示例

️🚫 注意,返回示例仅供参考,其包含字段大于返回参数定义范围,请勿使用除本文返回参数定义以外的返回数据,否则可能会导致程序异常。

[
  {
    "actions": [
      {
        "actionDisplay": "开关 : 开启",
        "actionDisplayNew": {
          "83": [
            "开关",
            "开启"
          ]
        },
        "actionExecutor": "dpIssue",
        "actionStrategy": "edge",
        "attribute": 0,
        "devDelMark": false,
        "enabled": true,
        "entityId": "some deviceId",
        "entityName": "调试产品-幻彩3路-vdevo",
        "executorProperty": {
          "83": true
        },
        "extraProperty": {},
        "gmtModified": 1718024675855,
        "id": "some id",
        "offGwSync": false,
        "orderNum": 1,
        "ruleId": "some ruleId",
        "status": true,
        "uid": "some uid"
      }
    ],
    "alarmIssue": false,
    "attribute": 4,
    "auditStatus": 0,
    "background": "",
    "boundForPanel": false,
    "boundForWiFiPanel": false,
    "code": "",
    "commonField": "{\"subMatchType\":1}",
    "containDeviceDelete": false,
    "coverIcon": "some cover icon",
    "description": "",
    "disableTime": 0,
    "displayColor": "BA7B69",
    "enabled": true,
    "forceCloudTrigger": false,
    "gmtCreate": 1705027381008,
    "gmtModified": 1718024675861,
    "id": "some id",
    "iotAutoAlarm": false,
    "isAlarmIssue": false,
    "isLogicRule": false,
    "linkageType": 0,
    "localLinkage": false,
    "logicRule": false,
    "matchType": 1,
    "name": "打开三路开关",
    "needCleanGidSid": false,
    "needValidOutOfWork": false,
    "newLocalScene": false,
    "offGwSync": false,
    "offGwSyncSuccess": false,
    "orderWeight": 1,
    "outOfWork": 0,
    "ownerId": "some owner id",
    "panelType": 0,
    "permissionCode": "",
    "ruleGenre": 1,
    "ruleSource": 0,
    "ruleType": 3,
    "runtimeEnv": "prod",
    "scenarioRule": true,
    "status": true,
    "statusConditions": [],
    "stickyOnTop": true,
    "subMatchType": 1,
    "uid": "some uid"
  }
]

👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。  

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IoT砖家涂拉拉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值