
8 Control devices and groups
1
String
dps
= {
"1"
:
false
};
2
ITuyaBlueMeshDevice mTuyaBlueMeshDevice
=
TuyaHomeSdk
.
newBlueMeshDevic
3
eInstance
(
" meshId "
);
4
mTuyaBlueMeshDevice
.
publishDps
(
devBean
.
getNodeId
(),
devBean
.
getCateg
5
ory
(),
dps
,
new
IResultCallback
() {
6
@Override
7
public
void
onError
(
String
s
,
String
s1
) {
8
}
9
@Override
10
public
void
onSuccess
() {
11
}
12
});
8.2 Control groups
To control a group, send a control command in the following format:
1
{
2
"(dpId)"
:
"( dpValue )"
3
}
API description
1
void
multicastDps
(
String
localId
,
String
pcc
,
String
dps
,
IResultCal
2
lback callback
)
Parameters
Parameter
Description
localId
The local ID of a group.
pcc
The product category and type of the
sub-device.
dps
The control command.
callback
The callback.
28 / 31