To start generic pairing, users can reset a device (for N times), or perform a specified action that makes the device ready for pairing.
Local reset
Restore a device to the status prior to pairing. Users can also choose whether to clear data, for example, respecting groups, scenes, and device status.
Network leave requested by the gateway
Restore a device to the status prior to pairing after the gateway sends a leave command to remove the device from the network.
Auto recovery
This capability can prevent a device from leaving a network by unintended operations. When a device gets ready for the pairing mode after local reset, if pairing timeout or device restart occurs, the device can automatically restore to the previous networking status. All data such as groups and scenes will be retained after restoration.
Support and help
If you have any problems with TuyaOS development, you can post your questions in the Tuya Developer Forum.