tuya Standard Instruction Set Instructions

August 3, 2024
Tuya

tuya Standard Instruction Set Instructions

tuya Standard Instruction Set Instructions

Contents

A standard instruction set is a set of control function instructions that can be sent by devices. The standard instruction set varies depending on the product category.
The control instructions supported by a specified product form a subset of the standard instruction set of the product category. This series of documents provides the instruction set for certain product categories on the Tuya Developer Platform.
The instruction sets for more products are being developed. If you have any requirements, you can submit a ticket to contact Tuya.

Terms and definitions

tuya Standard Instruction Set - Terms and definitions

Things to note

  • The instruction set provided in this section is not completely consistent with the definition of product functions on the Tuya Developer Platform. The Tuya
    Developer Platform is integrated with the instructions of different products in the same category.

  • You only need to integrate with Tuya’s instruction set of the same category,
    before you can control different products of the same category.

  • If the returned standard product is an early product with a category code of qt, it might no longer be supported. If you need to integrate with it, please submit a ticket for confirmation.

Procedure

This section takes the electric pressure cooker in the Function Definition as an example to describe how to query the cloud function properties and status properties of smart devices.

3.1 Step 1: Query device function properties

You can refer to the sample request in this step to query the standard functional properties (or the instruction set) supported by your device and the status properties (or the status set) that can be reported. For more information about APIs, see Get the specifications and properties of the device.

  • The instruction set will be used as the code in the instruction to be sent.
  • The status set will be used to query the device status interface.
    ::: info
    If the returned result is empty, submit a ticket for confirmation.
    :::

Sample request

tuya Standard Instruction Set - Sample request

Sample response

tuya Standard Instruction Set - Sample response

tuya Standard Instruction Set - Sample response 2

3.2 Step 2: Send instructions to the device
You can debug the device functions by sending instructions in the instruction set to the device. For more information about APIs, see Send commands.
The following sample request is based on the device function properties that are obtained in the previous step, using switch as an example to send instructions.

Sample request

tuya Standard Instruction Set - Sample request 2

Sample response

tuya Standard Instruction Set - Sample response 3

3.3 Step 3: Query the latest status of the device
You can query the current status of the device with the following instructions. For more information about APIs, see Get the status of a single device.
After sending the switch instruction in Step 2, you can query the latest status of the device.

Sample request

tuya Standard Instruction Set - Sample request 3

Sample response

tuya Standard Instruction Set - Sample response 4

List of category code

The category code field indicates the abbreviation of a specified product. The following table lists the products that match most instruction codes.

tuya Standard Instruction Set - List of category code

tuya Standard Instruction Set - List of category code
2

tuya Standard Instruction Set - List of category code
3

tuya Standard Instruction Set - List of category code
4

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals