tuya Wind IDE User Guide

tuya-logo

tuya Wind IDE

tuya-Wind-IDE-product

Product Information

Tuya Wind IDE (integrated development environment) is an extension of Visual Studio Code (VS Code) available in English and Chinese. It provides comprehensive facilities to TuyaOS EasyGo developers, managing, distributing, and updating the TuyaOS EasyGo development kits for a consistent development experience across hosts and programming tools.

Product Instructions

Installation Instructions

Installation Environment:

  • Install VM software (VirtualBox or VMware) and create a VM.
  • Install Ubuntu 18.04 or 20.04 on the VM with recommended RAM set to 8GB.

Prerequisites:

Step 1: Install Linux VM Environment:

  1. Install VM software and create a VM with Ubuntu 18.04 or 20.04.
  2. Set VM RAM to 8GB.

Step 2: Enable SSH Login Without Password:

  1. For Windows 10 or 11, configure SSH login without password by running commands in PowerShell.

Install IDE:

  1. Log in to Tuya Wind IDE using your Tuya Developer Platform account.
  2. Download the development framework.
  3. Create an application, build it, clean the build, flash firmware, and debug as needed.

FAQ

  • Q: What does Tuya Wind IDE provide to developers?
    • A: Tuya Wind IDE offers comprehensive facilities for TuyaOS EasyGo developers, managing, distributing, and updating development kits for a consistent experience.
  • Q: How can I enable SSH login without a password for Windows hosts?
    • A: You can configure SSH login without a password on Windows hosts by running specific commands in PowerShell.

Tuya Wind IDE (integrated development environment) provides comprehensive facilities to TuyaOS EasyGo developers.

Background

Tuya Wind IDE is provided as an extension of Visual Studio Code (VS Code) and is available in both English and Chinese. You log in to this IDE with the account of the Tuya Developer Platform. Tuya Wind IDE manages, distributes, and updates the TuyaOS EasyGo development kits, enabling a consistent development experience across hosts and programming tools.

Installation environment

Tuya Wind IDE supports the following environments:

  • Linux virtual machine (VM) on Windows host, or Linux VM: used for developing most networked products, cellular products, gateways, control panels, IP cameras (IPCs), and network video recorders (NVRs).
  • Windows: used for developing most sub-devices.
  • macOS: only supports browsing and permission request for TuyaOS development frameworks, not for downloading.

Prerequisites

info

  • If you use a Linux virtual machine (VM) on a Windows host throughout the development, see Step 1: Install Linux VM environment and then see the section Install IDE for the following operations.
  • If you use a Linux host (or VM) or a Windows system throughout the development, skip Step 1: Install Linux VM environment.

Step 1: Install Linux VM environment

Install VM software, VirtualBox or VMware, and create a VM. Install Ubuntu 18.04 or 20.04 on the VM. It is recommended to set the RAM of the VM to 8G.

  • VirtualBox:
    1. If you use VirtualBox, set the Adapter 2 to Host-only Adapter to ensure VS Code on Windows can connect to the VM via SSH.tuya-Wind-IDE-fig-1
    2. If you cannot create Host-only Adapter, on the main VirtualBox window, choose File > Host Network Manager and configure as shown below. Or visit this website for troubleshooting.tuya-Wind-IDE-fig-2tuya-Wind-IDE-fig-3
    3. Power on your VM and get the IP address of your VM.tuya-Wind-IDE-fig-4
    4. Install the necessary software on the virtual machine.tuya-Wind-IDE-fig-5

If you only use a Linux VM throughout the development, see the section Install IDE for the following operations.

Step 2: Enable SSH login without password

  • Windows 10 or 11 has a built-in SSH client.
  • On the Windows host, run the following commands in PowerShell to configure an SSH login without password.
  • Assume the username of the VM is vscode.
  • The IP address of the VM is 192.168.56.105.
  1. Generate an SSH key.tuya-Wind-IDE-fig-6
  2. Specify the username and IP address of your VM.tuya-Wind-IDE-fig-7
  3. Specify the location where the public key to upload resides.tuya-Wind-IDE-fig-8
  4. Register the public key. You are required to enter the username and password of the server.tuya-Wind-IDE-fig-9

Step 3: Install Remote SSH extension

  1. Install and open VS Code.
  2. Click Extensions in the left navigation pane. Search for and install Remote – SSH.tuya-Wind-IDE-fig-10 tuya-Wind-IDE-fig-11
  3. Set up and connect to SSH. This example uses the IP address 192.168.56.105.tuya-Wind-IDE-fig-12

Install IDE

  • Install VS Code on your Windows computer.
  • Open VS Code. Search for and install Tuya Wind IDE as shown in the following figures.

tuya-Wind-IDE-fig-13

Log in

  • Open the login page as shown in the following figure. Log in to the IDE with the account of the Tuya Developer Platform.tuya-Wind-IDE-fig-14

Log out

  • Click the account icon in the top right corner and click Log Out.tuya-Wind-IDE-fig-15

Download development framework

  • Choose Home > Create Framework.tuya-Wind-IDE-fig-16

Complete the required fields on the TuyaOS Framework Wizard. The following table lists the parameters and their description.

tuya-Wind-IDE-fig-43 tuya-Wind-IDE-fig-44

You can click the link in the pop-up window to learn more about the development mode and type development kit you choose.

  • Development framework:tuya-Wind-IDE-fig-17
  • Type development kit:tuya-Wind-IDE-fig-18
  • Be sure to download the TuyaOS development framework in the correct development environment and use that framework accordingly. Click Finish to download the development kit.tuya-Wind-IDE-fig-19

Context menu

tuya-Wind-IDE-fig-20

In the following table:

  • {project} represents the path of the current TuyaOS development framework.
  • {project}/software/apps/{application} represents the path of the application of the current TuyaOS development framework.

tuya-Wind-IDE-fig-45

Actions on development frameworks

  • You have a product development kit opened in the workspace.

tuya-Wind-IDE-fig-21

Expand the software directory in Explorer. Right-click on software or any subdirectory and choose Show Project Information. Click Development Framework in the left navigation pane of Tuya Home. The information about the development framework is displayed on the right side of the screen.

Switch between development frameworks (Linux environment only)

  • If the development framework has multiple versions, you will see a drop-down menu next to TuyaOS Version.tuya-Wind-IDE-fig-22
  • Select the desired TuyaOS version from the drop-down menu.tuya-Wind-IDE-fig-23
  • Click Switch to change to that version.tuya-Wind-IDE-fig-24

Download product development kit

  • If a TuyaOS development framework provides a product development kit to download, the Product Dev Kit tab will appear on the page of Dev Framework information.tuya-Wind-IDE-fig-25
  • Click Request Permission and complete the required information accurately to get access to the product development kit.
    • Request Permission is only available to enterprise developers, so be sure to enter the correct email address of the account manager that you are in touch with. If you have questions about the required information, contact your account manager.tuya-Wind-IDE-fig-26
  • After you submit the request, you will get a message saying Your request for permission is being reviewed. Please wait. You can Cancel the Request for Permission during the review process.tuya-Wind-IDE-fig-27
  • After approval, you can download the requested product development kit.tuya-Wind-IDE-fig-28
  • The downloaded product development kit will be found in the directory software /TuyaOS/apps in the workspace.tuya-Wind-IDE-fig-29

View resource center

tuya-Wind-IDE-fig-30

  • Click Search in the top left corner of the Resource Center screen to show or hide the search box. You can narrow down your search by using multiple search fields including Development Mode (multi-select), Type Development Kit (multi-select), Dev. Platform (multi-select), TuyaOS Version (multi-select), and Permission Status (single-select). If you leave a field blank, no criteria are considered for that field in the search.
    The search results are displayed as a list below the search box. You can sort results by Development Mode, Type Dev Kit, Development Platform, or TuyaOS Version separately, or using weighted sorting.
    • Separate sorting: Click a table header to sort by that field.
    • Weighted sorting: The priority from high to low is Development Mode > Type Dev Kit > Development Platform > TuyaOS Version. Suppose that you have sorted the results by Development Mode. After you click Type Dev Kit, the results will be sorted by that field without changing the order of the Development Mode column. If you then click Development Platform, the results will be sorted by that field, with the order of Development Mode and Type Dev Kit columns unchanged.
  • You can request permission to download a development kit of TuyaOS EasyGo and cancel a request that is in the review state. After your request is approved, the target development kit will be available to download.tuya-Wind-IDE-fig-31

Create an application

  • Expand the software/TuyaOS/apps directory in Explorer. Right-click on the apps folder and choose Create Project.

Build an application

  1. Expand the software/TuyaOS/apps/xxx directory in Explorer. Right-click on the xxx folder and choose Build Project. If the path is incorrect, you will get an error message in the lower right corner.tuya-Wind-IDE-fig-32
    • info: If there is only one demo in the apps directory, the demo folder is shown behind the apps directory in Explorer due to the design of VS Code. You need to choose and right-click on the subdirectory of apps. Otherwise, you will get an error message in the lower right corner.
  2. Choose Build Project, enter the version number of the build in the format x.x.x, and hit the Enter key to confirm. The version number of the application for Bluetooth mesh and Beacon takes the format x.x and for other protocols, x.x.x is used.tuya-Wind-IDE-fig-33
  3. Wait for the IDE terminal to download the toolchain and build the project. The directory where the built firmware resides is shown in the terminal window.tuya-Wind-IDE-fig-34

Clean a build

  1. Expand the software/TuyaOS/apps/xxx directory in Explorer. Right-click on the xxx folder and choose Clean Project.tuya-Wind-IDE-fig-35
    • info: If there is only one demo in the apps directory, the demo folder is shown behind the apps directory in Explorer due to the design of VS Code. You need to choose and right-click on the subdirectory of apps. Otherwise, you will get an error message in the lower right corner.
  2. Choose Clean Project, enter the version number of the build in the format x.x.x, and hit the Enter key to confirm. The version number of the application for Bluetooth mesh and Beacon takes the format x.x and for other protocols, x.x.x is used.tuya-Wind-IDE-fig-36

Flash firmware

  • If your environment is a Linux virtual machine on Windows, find the flashing tool in the pc/tools directory. You can use the provided tools for firmware flashing and verification on Windows.
  • You can use the Flash App and Flash Prod features on the context menu to flash the firmware.
  • Expand the software/TuyaOS/apps/xxx directory in Explorer. Right-click on the xxx folder and choose Flash App.
    • Flash App erases data on the user area.
  • Expand the software/TuyaOS/apps/xxx directory in Explorer. Right-click on the xxx folder and choose Flash Prod.
    • Flash Prod erases all the data.

View TuyaOS documentation

  1. Right-click on software or other subdirectories and choose Quick Start.tuya-Wind-IDE-fig-37
  2. TuyaOS documentation navigation appears.tuya-Wind-IDE-fig-38

TuyaOS development documentation includes:

  • hardware directory: documentation for embedded software development.
  • pc/tools directory: documentation for programs running on the host, such as the flashing tool.
  • software directory: documentation for demos and APIs.

What you can do:

  • You can always go back to the documentation hub page by clicking TuyaOS Documentation Navigation in the top left corner.
  • Check TuyaOS API documentation.tuya-Wind-IDE-fig-39
  • Check TuyaOS demo documentation.tuya-Wind-IDE-fig-40

Directory structure of API reference

  • Homepage: describes the current development kit.
  • Related webpages/developer guide: describes the development process, process diagram, and things to note.
  • Struct: provides information about the structs for use.
  • Files: describes functions, definitions, enumeration, macros, and more.
  • Search box: searches for any information about development with global search (default) and filters (such as structs and files).tuya-Wind-IDE-fig-41
  • Fuzzy search is supported. For example, if you enter the character a, all relevant information will be returned.tuya-Wind-IDE-fig-42

Debug

Install a preferred debugging extension on VS Code.

Documents / Resources

PDF thumbnailWind IDE
User Guide · Wind IDE, Wind, IDE

Ask a Question

Use this section to ask about setup, compatibility, troubleshooting, or anything missing from this manual.

Ask a Question

Ask about setup, compatibility, troubleshooting, or anything missing from this manual. Name and email are optional.