Last Updated on : 2024-06-25 03:45:28download
Automatic activation allows a device to be activated after being connected to the internet, without depending on a third-party device such as a mobile phone. Automatic activation eliminates the need for users to download an app and scan a QR code to pair a device. Some products come with complete features but also need a cloud connection to achieve more features (such as OTA updates, weather services, and cloud recipes) with a plug-and-play user experience. Automatic activation can meet this need.
The process of automatic activation:
Open tuya_iot_config.h
and check if the following macro is defined.
#define ENABLE_QRCODE_ACTIVE 1
Create a product on the Tuya Developer Platform and then enter the product development process. Click on the Function Definition tab, scroll down to Advanced Functions, and enable LinkSDK and Device Automatic Activation. Purchase licenses for device authorization using the PID of this product.
You might not find LinkSDK and Device Automatic Activation in Advanced Functions. This is because the product solution does not have these two functions bound. To request binding them with your product, contact your account manager or submit a service ticket.
You can use the purchased license to implement the automatic activation function only after enabling LinkSDK and Device Automatic Activation.
After the call of device initialization, set the network information (for Wi-Fi devices, set the Wi-Fi’s SSID and password with an API request). After the device is connected to the internet, it will initiate an MQTT connection and proceed with activation.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback