Sub-Device Pairing

Last Updated on : 2023-04-17 09:04:20download

Sub-device pairing can be initiated only when a gateway is online in the cloud, and the sub-device stays in the pairing state. This topic describes the process to pair a sub-device that is connected through a Zigbee gateway.

Pairing process

Sub-Device Pairing

Initialize pairing parameters

API description

ThingGwSubDevActivatorBuilder builder = new ThingGwSubDevActivatorBuilder()
		.setListener(new IThingSmartActivatorListener() {

				public void onError(String errorCode, String errorMsg) {


				public void onActiveSuccess(DeviceBean devResp) {


				public void onStep(String step, Object data) {



Parameter Description
mDevId The gateway ID.
timeout The timeout value of a pairing task. Default value: 100. Unit: seconds.

Call the pairing method

IThingActivator mThingGWSubActivator = ThingHomeSdk.getActivatorInstance().newGwSubDevActivator(builder);
// Starts pairing.
// Stops pairing.
// Destroys the pairing task.