Get Started
Terms and definitions
Before starting with TuyaOpen, please familiarize yourself with the following key terms:
TuyaOpen dedicated license
The license is an encryption certificate issued by Tuya to allow a device to connect to the Tuya IoT operating system. Each device must be assigned a unique license for authentication. A license grants permission for a single device to connect to and access the cloud.
The license consists of a UUID
and an AuthKey
.
The TuyaOpen dedicated license applies to all TuyaOpen Framework components, including:
TuyaOpen Framework requires the use of a TuyaOpen dedicated license. Licenses from other sources (including TuyaOS licenses) cannot be used within the TuyaOpen Framework to connect to the Tuya IoT Cloud.
UUID
A universally unique identifier (UUID) is a unique number generated by various algorithms to identify each device. A UUID is a 20-character string and does not change with operations such as repeated activations and pairing.
AuthKey
AuthKey is the device authentication key issued by the platform. As a 32-character string, the AuthKey has a one-to-one mapping to the UUID, and it is strongly bound with the PID and UUID. Note: This parameter is very important and will be used during device authentication. Keep the value safe.
PID
PID stands for the product ID. Each product created on the platform is assigned a unique PID. Each PID is associated with the details of a specific product, including the data points (DPs), app control panel, and purchase information. A PID can be regarded as the identity card of the associated product.
Typically, the PID, UUID, and AuthKey are referred to as the device triplet.
Device ID
A device ID is assigned by the cloud each time the device is activated and paired. It is associated with the actual user device data linked to the account and app after successful pairing. The device ID can change in certain specific scenarios, and will be reassigned after re-pairing and reactivation. For example, on the app, go to the device panel and tap the top right corner to access the device properties page, then tap Unbind and Clear Data.
Get TuyaOpen license
-
Method 1: Go to the Production page and purchase a module that is flashed with a TuyaOpen license. This license is permanently written into the module during manufacturing and cannot be lost. TuyaOpen automatically reads the license via the
tuya_iot_license_read()
interface during startup. Verify whether your purchased modules already contain TuyaOpen licenses. -
Method 2: If your module does not have a pre-flashed license:
- You can purchase TuyaOpen licenses on the Production page.
- Alternatively, you can purchase TuyaOpen licenses on the Purchase page.
Preparations
Before getting started, make the following preparations:
- Get TuyaOpen licenses.
- Get Tuya's universal serial tool for firmware flashing, TuyaOpen license writing, serial debugging, and subsequent operations.
Video guidance
- Linux/Mac —— Install a Linux virtual machine, Configure SSH, Develop Demo
- Windows —— Set up environment, Develop Demo, Burning Log
- Device Networking —— Finished Effect