
6 Manage devices
6 Manage devices
6.1 Check a mesh device type
API method
1
DeviceBean deviceBean
=
TuyaHomeSdk
.
getDataInstance
().
getDeviceBean
(
mD
2
evId
);
3
// Checks whether a Bluetooth mesh device is a gateway or a sub -devi
4
ce
.
5
if
(
deviceBean
.
isBlueMesh
()){
6
L
.
d
(
TAG
,
"This device is blue mesh device "
);
7
}
8
// Checks whether a Bluetooth mesh gateway is used.
9
if
(
deviceBean
.
isBlueMeshWifi
()){
10
L
.
d
(
TAG
,
"This device is blue mesh wifi device "
);
11
}
6.2 Rename a sub-device
API description
1
void
renameMeshSubDev
(
String
devId
,
String
name
,
IResultCallback cal
2
lback
);
Parameters
Parameter
Type
Description
devId
String
The device ID.
name
String
The new name of the
device.
callback
IResultCallback
The callback.
Example
17 / 31