# getTargetHomeInfo ^5.11.0
获取指定家庭信息以及设备列表
# 请求参数
- N/A
# 接口调用示例
this.$bridge
.getTargetHomeInfo()
.then(res => {
this.$toast(res)
})
.catch(err => {
//集成异常上报
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
homeId | String | N/A | 家庭ID |
homeName | String | N/A | 家庭名称 |
isOwner | Number | 0 /1 | 是否为家庭主人:0 非 /1 是 |
deviceList | Array附表1 | N/A | 设备列表 |
roomList ^5.4.1 | Array附表2 | N/A | 房间列表 |
- 附表1:
deviceList
返回参数
Prop | Type | Value | Description |
---|---|---|---|
masterId ^5.4.1 | String | N/A | 设备所属网关ID |
roomId ^5.4.1 | String | N/A | 所属房间ID |
roomName ^5.4.1 | String | N/A | 所属房间名称 |
deviceId | String | N/A | 设备ID |
deviceName | String | N/A | 设备名称 |
deviceType | String | N/A | 设备类型 |
deviceSubType | String | N/A | 设备子类型 |
deviceSn | String | N/A | 设备SN(加密格式) |
deviceSn8 | String | N/A | 设备SN8(非加密格式) |
isOnline | Number | N/A | 设备是否在线:0 离线 /1 ,在线 |
isLocal | Number | N/A | 是否是本地家庭:0 否 /1 是 |
attrs | String | N/A | 套装数据endlist |
- 附表2:
roomList
返回参数 ^5.4.1
Prop | Type | Value | Description |
---|---|---|---|
roomId | String | N/A | 房间ID |
name | String | N/A | 房间名称 |
des | String | N/A | 房间描述 |
icon | String | N/A | 房间icon |
isDefault | Number | N/A | 是否默认房间:0 否 /1 是 |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 请求失败错误码:-1 请求失败 |
errorMessage | String | N/A | 错误消息(如有) |
# 返回示例
{
"homeId":"1146279",
"isLocal":"0",
"homeName":"008的家",
"address":"广东省 深圳市 南山区",
"areaId":"101280604",
"coordinate":"113.942340, 22.529814",
"isOwner":"1",
"deviceList":[],
"roomList":[
{
"roomId":"566465",
"name":"客厅",
"des":"系统默认客厅",
"icon":"1",
"isDefault'":"1"
},
{
"roomId":"566469",
"name":"卫生间",
"des":"系统默认卫生间",
"icon":"5",
"isDefault'":"1"
},
{
"roomId":"566473",
"name":"厨房",
"des":"系统默认厨房",
"icon":"3",
"isDefault'":"1"
}
],
"homeId":"1146279",
}
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