getHomeInfo 获取家庭信息及其设备列表

getHomeInfo ^7.9

获取家庭信息及其设备列表

#请求参数

Prop Type Default Comment
homeId String N/A 家庭 id
isCurrentFamily String N/A 是否是当前家庭 ,0:否,1 是
hasRoomAndDeviceInfo String N/A 是否附带房间和设备信息,0:否,1 是

#引入接口模块

import bridge from '@minix-iot/etsbridge-sdk'

#接口调用示例

const params = {
  homeId: '家庭id',
  isCurrentFamily: '是否是当前家庭 ,0:否,1是',
  hasRoomAndDeviceInfo: '是否附带房间和设备信息,0:否,1是 ',
}
bridge
  .getHomeInfo(params)
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })

#接口返回示例

{
    "homeId": "123456",
    "homeName": "林首富之家",
    "isOwner": "1",
    "address": "string",
    "coordinate": "string",
    "areaid": "string",
    "isLocal": "0",
    "deviceList": [
        {
            "masterId": "xxx",
            "roomId": "xxx",
            "roomName": "xxx",
            "deviceId": "xxxxx",
            "deviceName": "xxxxxx",
            "deviceType": "xxxx",
            "deviceSubType": "xxxxx",
            "deviceSn": "xxxxxxxxx",
            "deviceSnDecrypt": "xxxxx",
            "deviceSn8": "xxxxxxxx",
            "isOnline": 1,
            "attrs": "xxx"
        }
    ],
    "roomList": [
        {
            "roomId": "xxx",
            "name": "xxx",
            "des": "xxx",
            "icon": "",
            "isDefault": "1"
        }
    ]
}
posted on 2024-12-27 09:31  AtlasLapetos  阅读(53)  评论(0)    收藏  举报