Last Updated on : 2026-01-30 02:29:58download
This topic describes the mode of pairing a sub-device. This type of device is connected to the Tuya IoT Cloud through a gateway such as a Zigbee gateway or Bluetooth gateway. Therefore, the pairing mode depends on a specific gateway that processes device activation and notifications.
For more information, see Device Pairing.
activatorListener: ITSmartActivatorListener = {
onActiveSetpAndError: (step: TSmartActivatorStep, error?: Error, device?: TSmartDeviceModel) => {
// Implement the relevant logic.
},
onActiveSuccess: (deviceModel: TSmartDeviceModel) => {
// Handle the logic for successful pairing, such as updating the UI and navigating to the next page.
},
};
const activatorBuilder = TSmartActivator.buildSubDeviceActivatorBuilder('Gateway Device ID', 120000, this.activatorListener);
this.activator = TSmartActivator.createActivator(activatorBuilder);
this.activator.startActive()
this.activator.stopActive()
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback