getDeviceInfo ^6.8
获取设备信息,如果设备id没指定则是获取当前设备的信息
#请求参数
| Prop |
Type |
Default |
Comment |
applianceCode |
String |
N/A |
家电id |
#接口调用示例
const params = {
applianceCode: '', //家电id
}
this.$bridge
.getDeviceInfo(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
| Prop |
Type |
Default |
Description |
canBleTransport |
String |
N/A |
是否支持数传,"1"支持, "0"不支持,不传不做任何处理 |
deviceName |
String |
N/A |
设备名 |
homeName |
String |
N/A |
家庭名 |
roomName |
String |
N/A |
所属房间名称 |
masterId |
String |
N/A |
设备所属网关ID |
deviceSn |
String |
N/A |
设备SN |
devicedSn8 |
String |
N/A |
设备SN8码,蓝牙设备的mac |
productId |
String |
N/A |
产品型号 |
deviceId |
String |
N/A |
设备ID |
ssid |
String |
N/A |
用于蓝牙名称 |
deviceType |
String |
N/A |
设备类型 |
roomId |
String |
N/A |
所属房间ID |
deviceBtToken |
String |
N/A |
蓝牙设备的校验Token |
deviceSubType |
String |
N/A |
设备子类型 |
isOnline |
String |
N/A |
设备是否在线,"1":在线,"0":离线 |
moduleType |
String |
N/A |
"0", 代表单蓝牙模组,"1",ble+wifi双模组(蓝牙直连控制) |
mac |
String |
N/A |
设备的mac地址,mesh ble 等设备 才会有该字段 |
deviceIcon |
String |
N/A |
设备icon |
subDeviceIcon ^8.1 |
String |
N/A |
子设备icon 原生8.1版本新增 |
supportNetworkBridge |
number |
N/A |
0 不支持网桥功能,1支持网桥功能 |
singleBleDevice |
number |
N/A |
0 普通设备 1单蓝牙子设备(已挂靠到网桥)7.10新增 |
| Prop |
Type |
Default |
Description |
errorMessage |
String |
N/A |
错误消息 |
errorCode |
Number |
N/A |
错误码 -1 查找不到设备 |