background image

Tuya mesh

Version: 20211129

Online Version

Summary of Contents for mesh

Page 1: ...Tuya mesh Version 20211129 Online Version...

Page 2: ...and disconnect from a mesh sub device 8 5 Pair devices 10 5 1 Reset devices 10 5 2 Scan for sub devices pending pairing 11 5 3 Pair mesh sub devices 11 5 4 Pair a mesh gateway 13 5 5 Pairing error co...

Page 3: ...Contents 7 5 Delete a group 25 7 6 Rename a group 25 8 Control devices and groups 27 8 1 Control devices 27 8 2 Control groups 28 8 3 Listen for mesh device status 29 9 Update firmware 31 II...

Page 4: ...Energy Bluetooth LE Tuya s proprietary Bluetooth mesh connections Tuya mesh and Bluetooth mesh networking Bluetooth mesh provided by Blue tooth Special Interest Group Bluetooth SIG This topic describ...

Page 5: ...tooth mesh but with Tuya mesh Combo devices Bluetooth mesh gateways IP cameras IPCs and new devices that support Bluetooth and Wi Fi combo The devices that support Bluetooth and Wi Fi combo can be pai...

Page 6: ...I 4 ON 5 uses permission android name android permission BLUETOOTH 6 uses permission android name android permission BLUETOOTH_ADMIN 7 Precheck of Bluetooth permissions Check whether the location perm...

Page 7: ...adapters with Bluetooth mesh and other communi cation nodes Product types of a category Smart lights ranging from cool white lights C to white and colored lights RG BCW 01 05 One to six outlet power...

Page 8: ...s are added deleted or managed in a group these operations are implemented with local Bluetooth commands and synchronously recorded in the cloud Therefore device information is synchronized to the loc...

Page 9: ...ription meshName String The name of a mesh network with up to 16 bytes callback ITuyaResultCallback The callback Example 1 TuyaHomeSdk newHomeInstance siteId createBlueMesh meshName new 2 ITuyaResultC...

Page 10: ...t 2 Callback 3 Override 4 public void onError String errorCode String errorMsg 5 6 Override 7 public void onSuccess 8 9 4 3 Query a list of mesh networks in a site API description 1 List BlueMeshBean...

Page 11: ...roy the current mesh instance and initialize the mesh instance for the target site when you switch between sites API method 1 Initializes the mesh network 2 TuyaHomeSdk getTuyaBlueMeshClient initMesh...

Page 12: ...tTuyaBlueMeshClient stopSearch important After a connection is started available devices are scanned for in the back ground until a device is connected The background scanning will consume resources Y...

Page 13: ...lists multiple common reset methods Product type Reset method State pending pairing Smart light Turns on and off the light consecutively three times in a row The indicator is flickering quickly Smart...

Page 14: ...verride 7 public void onSearchFinish 8 9 10 SearchBuilder searchBuilder new SearchBuilder 11 The name of the device to be scanned for Default value out_of_ 12 mesh to represent the name of the device...

Page 15: ...t value 100 Unit seconds ssid String The name of the home Wi Fi network to which a paired device is connected password String The password of the site Wi Fi network to which a paired device is connect...

Page 16: ...lic void onSuccess DeviceBean deviceBean 12 13 Override 14 public void onError String errorCode String errorMsg 15 16 Override 17 public void onFinish 18 19 ITuyaBlueMeshActivator iTuyaBlueMeshActivat...

Page 17: ...e of the site Wi Fi network to which a paired device is connected password String The password of the site Wi Fi network to which a paired device is connected mMeshBean MeshBean MeshBean homeId Long T...

Page 18: ...ing errorMsg 19 The callback that is used when a single device failed to be paire 20 d 21 The error code See the list of pairing error codes 22 L d TAG errorCode errorCode errorMsg errorMsg 23 24 Over...

Page 19: ...5 Pair devices Error code Description 13011 The pairing task timed out 16 31...

Page 20: ...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...

Page 21: ...n getParentId 5 The online status including the status of connections to the loc 6 al mesh network and gateway 7 boolean online deviceBean getIsOnline 8 The device online status of connections to the...

Page 22: ...6 Manage devices Parameters 19 31...

Page 23: ...sg 6 Toast LENGTH_LONG show 7 8 Override 9 public void onSuccess 10 Toast makeText mContext Sub device removed successfully Toast LE 11 NGTH_LONG show 12 13 6 5 Query sub device status The data point...

Page 24: ...ring The value of nodeId for the device callback IResultCallback The callback Example 1 mTuyaBlueMeshDevice querySubDevStatusByLocal devBean getCategory 2 devBean getNodeId new IResultCallback 3 Overr...

Page 25: ...MeshId 4 L d TAG This group is a Bluetooth mesh group 5 7 2 Create a group Each mesh network supports up to 28 672 groups In the response to group creation the group ID ranges from 8000 to EFFF in hex...

Page 26: ...Category and type 8001 ne 2 w IAddGroupCallback 3 Override 4 public void onError String errorCode String errorMsg 5 6 Override 7 public void onSuccess long groupId 8 9 7 3 Add sub devices to a group...

Page 27: ...ove sub devices from a group API description 1 void removeDevice String devId IResultCallback callback Parameters Parameter Type Description devId String The device ID callback IResultCallback The cal...

Page 28: ...allback The callback Example 1 ITuyaGroup mGroup TuyaHomeSdk newBlueMeshGroupInstance groupId 2 mGroup dismissGroup new IResultCallback 3 Override 4 public void onError String code String errorMsg 5 6...

Page 29: ...e group callback IResultCallback The callback Example 1 ITuyaGroup mGroup TuyaHomeSdk newBlueMeshGroupInstance groupId 2 mGroup renameGroup Group name new IResultCallback 3 Override 4 public void onEr...

Page 30: ...ices Send a control command in the following format 1 dpId dpValue API description 1 void publishDps String nodeId String pcc String dps IResultCallba 2 ck callback Parameters Parameter Description no...

Page 31: ...lic 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...

Page 32: ...tDps groupBean getLocalId devBean get 5 Category dps new IResultCallback 6 Override 7 public void onError String errorCode String errorMsg 8 9 Override 10 public void onSuccess 11 12 8 3 Listen for me...

Page 33: ...evices 21 param gwId The source of the status If gwId is not empty 22 the cloud returns the status gwId indicates the ID of the gatewa 23 y that reports the data If gwId is empty the local Bluetooth m...

Page 34: ...9 Update firmware 9 Update firmware Tuya mesh shares the same logic of device firmware updates as Bluetooth mesh For more information see Firmware updates 31 31...

Reviews: