Skip to main content

Tuya Product Development

Every device that connects to the Tuya Cloud must have a PID (Product ID) โ€” a globally unique identifier assigned by the Tuya IoT Platform. The PID binds your device to a specific set of capabilities: data point (DP) definitions, App control panels, OTA channels, and more.

Why Create Your Own Productโ€‹

TuyaOpen ships with a default PID in its demo configuration so you can get your hardware online quickly. However, this PID belongs to Tuya's official account โ€” it is not under your control, which means:

FeatureDefault PIDYour Own PID
Device connects to cloudโœ…โœ…
Add / modify DP functionsโŒโœ…
Customize App control panelโŒโœ…
Configure firmware OTAโŒโœ…
Manage device credentialsโŒโœ…
Mass production & certificationโŒโœ…

Recommendation: Once you have verified basic hardware connectivity, create your own product on the Tuya IoT Platform and write the PID into your firmware. All subsequent development and testing should use your own product.

Create a Productโ€‹

Prerequisitesโ€‹

Stepsโ€‹

Step 1 โ€” Open the Create Product page

After logging in, click Create Product on the console home page.

Click Create Product
Click Create Product

Step 2 โ€” Select a product category

Browse the standard category tree or use the search box to find the category that matches your product.

Browse category tree
Browse category tree

Search for a category
Search for a category

Step 3 โ€” Select the smart solution type

Choose Product Development.

Select smart mode
Select smart mode

Step 4 โ€” Select the product solution

Choose Custom Solution. This is the appropriate choice for TuyaOpen, where you write your own application logic and need maximum flexibility.

Select product solution
Select product solution

Step 5 โ€” Fill in product information

FieldNotes
Product NameSuggested format: Brand + Product + Module, e.g. MyBrand Smart Plug T5AI
Communication ProtocolMatch your hardware โ€” Wi-Fi, Ethernet, etc.
Power TypeSelect Powered for mains-powered devices
Other fieldsOptional; can be filled in later

Click Create Product. The platform generates a unique PID for your product.

Step 6 โ€” Copy your PID

Open the product detail page. The Product ID (PID) is shown in the Hardware Development or Basic Information section.

tip

A PID is an alphanumeric string, for example kh0hig0fdtlzndvg.

Write the PID into Firmwareโ€‹

Option 1 โ€” Via menuconfig (recommended)

Run the following command in your application project root directory:

tos.py config menu

Find the TUYA_PRODUCT_ID option, enter your PID, and save.

Option 2 โ€” Edit the config file directly

Edit your_chat_bot/app_default.config (or the config file for your app):

CONFIG_TUYA_PRODUCT_ID="your_pid_here"

Rebuild and re-flash after saving.

note

Any change to a .config file requires a clean build before it takes effect on the device: run tos.py clean -f first, then rebuild.

Next Stepsโ€‹

After creating your product, the full development workflow is:

  • Function Definition โ€” Define the product's data points (DPs) on the Tuya IoT Platform to describe device capabilities (Function Definition)
  • Device Panel โ€” Configure or customize the App control panel (Device Panel)
  • Hardware & Embedded Development โ€” Design the hardware circuit and develop firmware with TuyaOpen
  • Verify Firmware Upgrade โ€” Verify the device OTA upgrade functionality (Verify Firmware Upgrade)
  • Product Configuration โ€” Set up cloud parameters, schedules, automations, and other product features (Product Configuration)
  • Product Testing โ€” Use Tuya platform tools to verify device connectivity, functionality, and stability (Product Testing)

Referencesโ€‹