# getDeviceList ^6.8
获取指定家庭指定房间的设备列表
# 请求参数
Prop | Type | Default | Comment |
---|---|---|---|
roomId | String | N/A | 房间id |
familyId | String | N/A | 家庭id |
::: tips 可以都不指定,则表示所有家庭的所有设备,如果指定,则必须指定家庭id :::
# 接口调用示例
const params = {
familyId: '2121', //家庭id,
roomId: '1111', //房间id
}
this.$bridge
.getDeviceList(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 0 |
list | Array | N/A | 设备列表 |
- items 对象属性
Prop | Type | Default | Description |
---|---|---|---|
roomId | String | N/A | 所属房间ID |
roomName | String | N/A | 所属房间名称 |
deviceBtToken | String | N/A | 蓝牙设备的校验Token |
deviceId | String | N/A | 设备ID |
ssid | String | N/A | 用于蓝牙名称 |
deviceSubType | String | N/A | 设备子类型 |
homeName | String | N/A | 家庭名 |
devicedSn8 | String | N/A | 设备SN8码 |
canBleTransport | String | N/A | 是否支持数传,"1"支持, "0"不支持,不传不做任何处理 |
deviceSn | String | N/A | 设备SN |
masterId | String | N/A | 设备所属网关ID |
productId | String | N/A | 产品型号 |
moduleType | String | N/A | "0", 代表单蓝牙模组,"1",ble+wireless双模组(蓝牙直连控制) |
deviceType | String | N/A | 设备类型 |
mac | String | N/A | 设备的mac地址,mesh ble 等设备 才会有该字段 |
isOnline | String | N/A | 设备是否在线,"1":在线,"0":离线 |
deviceName | String | N/A | 设备名 |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 错误码 |