Last Updated on : 2024-06-17 10:54:52download
To develop a product on the Tuya Developer Platform, you need to define product functions, select and customize device panels, develop embedded firmware, and perform a production test.
The product function is broken down into three types, standard functions, custom functions, and advanced functions.
A product function is the abstraction of a feature that is provided by a smart device. You can use product functions to describe the features and parameters of smart devices. After the product function is defined, the platform will generate a cloud-based device model that serves as a virtual representation of your physical device.
The platform allows you to define functions with six data types, including Boolean, value, enum, fault, string, and raw. For more information, see Sample DPs.
Data type | Value range |
---|---|
Boolean |
|
Users specify a time delay. After the timer is done, the device automatically turns on or off based on its current on/off state. If the switch is on, it can be set to automatically turn off. If the switch is off, it can be set to automatically turn on. If the switch is interrupted by manual on/off control when the timer is running, the countdown timer will be canceled.
Data type | Value range |
---|---|
Value | 0 to 86400, in seconds. |
The valid values range from 0 to 43200 for the Zigbee protocol.
Set the switch status after power failure. If a device has multiple switch channels, this DP status applies to all channels.
Data type | Value range |
---|---|
Enumeration |
|
A cyclic timer allows users to cycle a device between on and off during a set time period and specify the recurring day(s) of a week. By default, the device is turned on when the task starts and is turned off when the task ends.
This provides a convenient way to automate routines such as for cyclic irrigation, pet feeding, and control of lighting scenarios.
No. | Field | Length (byte) | Property |
---|---|---|---|
1 | Switch + channel ID | 1 |
0x03 is 0000 0011 in binary. 1 represents the ON state. |
2 | Day of week | 1 | Specifies the recurring day(s). If a bit is set to 1 , it means that the task will recur weekly on this specified day. The following table details each field. |
3 | Start time | 2 | Valid values: 0 to 1439 , in minutes. |
4 | End time | 2 | Valid values: 0 to 1439 , in minutes. |
5 | ON state duration | 2 | Valid values: 1 to 1440 , in minutes. |
6 | OFF state duration | 2 | Valid values: 1 to 1440 , in minutes. |
Description of recurring day(s)
If all the bits are set to 0
, it indicates a one-time task. If a bit is set to 1
, it indicates the task recurs on that day every week. For example, 0x42
means that the task takes effect on Saturday and Monday. Note that the task switch must be turned on.
Reserved | Saturday | Friday | Thursday | Wednesday | Tuesday | Monday | Sunday |
---|---|---|---|---|---|---|---|
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
Users can schedule a task to turn on and off their devices randomly during the set time period. By default, the device is on when the task starts and is off when the task ends.
When users go out for a long time, random timing can be used to turn the lights on or off just as if someone was at home, in order to deter burglars.
No. | Field | Length (byte) | Property |
---|---|---|---|
1 | Switch + channel ID | 1 |
0x03 is 0000 0011 in binary. 1 represents the ON state. |
2 | Day of week | 1 | Specifies the recurring day(s). If a bit is set to 1 , it means that the task will recur weekly on this specified day. The following table details each field. |
3 | Start time | 2 | Valid values: 0 to 1439 , in minutes. |
4 | End time | 2 | Valid values: 0 to 1439 , in minutes. |
Description of recurring day(s)
If all the bits are set to 0
, it indicates a one-time task. If a bit is set to 1
, it indicates the task recurs on that day every week. For example, 0x42
means that the task takes effect on Saturday and Monday. Note that the task switch must be turned on.
Reserved | Saturday | Friday | Thursday | Wednesday | Tuesday | Monday | Sunday |
---|---|---|---|---|---|---|---|
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
The inching switch can enable a device to be turned off automatically after it is on for a specified period, regardless of how it is activated.
Inching switches are widely used in public places such as corridors and stairways. For example, if an inching in-wall switch is delayed for one minute to turn off and it is connected to a corridor light, users only need to turn on the light whenever they pass through the corridor. The switch automatically turns the light off one minute later, relieving users from setting a countdown timer or manually turning the light off.
No. | Field | Length (byte) | Property |
---|---|---|---|
1 | Switch + channel ID | 1 |
|
2 | Inching duration | 2 | Valid values: 1 to 65535 , in seconds. |
DP | Data type | Value range |
---|---|---|
Add electricity | Value | 0 to 50000 , in kWh. |
Current | Value | 0 to 30000 , in mA. |
Voltage | Value | 0 to 5000 , in V. |
Power | Value | 0 to 50000 , in W. |
Test bit | Value | 0 to 5 . |
Voltage calibration factor | Value | 0 to 1000000 |
Current calibration factor | Value | 0 to 1000000 |
Power calibration factor | Value | 0 to 1000000 |
Electricity calibration factor | Value | 0 to 1000000 |
Energy metering is available only after you subscribe to the metering feature.
Set the type of external switch connected to the device. If a device has multiple switch channels, this DP status applies to all channels.
Data type | Value range |
---|---|
Enumeration |
|
Users can set 2-gang or multi-gang switches to be interlocked. Only one of the channels can be enabled, while the other channels are automatically disabled. The switch can work properly to change the rotation direction of a motor. Channels cannot be enabled simultaneously, but can be disabled simultaneously.
No. | Field | Length (byte) | Property |
---|---|---|---|
1 | Interlocking group 1 | 2 |
|
2 | Interlocking group 2 | 2 | Same as above. |
3 | Interlocking group 3 | 2 | Same as above. |
4 | Interlocking group 4 | 2 | Same as above. |
One switch can be added to only one interlocking group. Settings are overwritten by the last operation.
Users can add an external decoding circuit and use the module for decoding, helping implement local remote control pairing and app pairing. In addition, users can set up the functions of the remote control buttons and manage them on the app.
Users can perform four types of actions on remote control buttons, including no action, disable, enable, and flip. After pairing, the flip mode is used by default, which can be modified on the app.
No. | Field | Length (byte) | Property |
---|---|---|---|
Add a remote control | 2 to 4 |
|
|
List of remote controls | N |
|
The list of remote controls is delivered in one packet.
A cyclic timer allows users to cycle a device between on and off during a set time period and specify the recurring day(s) of a week. By default, the device is turned on when the task starts and is turned off when the task ends.
This provides a convenient way to automate routines such as for cyclic irrigation, pet feeding, and control of lighting scenarios.
No. | Field | Length (byte) | Property |
---|---|---|---|
1 | Version number | 1 | / |
2 | Byte length | 1 | / |
3 | Switch + channel ID | 1 |
0x03 is 0000 0011 in binary. 1 represents the ON state. |
4 | Day of week | 1 | Specifies the recurring day(s). If a bit is set to 1 , it means that the task will recur weekly on this specified day. The following table details each field. |
5 | Start time | 2 | Valid values: 0 to 1439 , in minutes. |
6 | End time | 2 | Valid values: 0 to 1439 , in minutes. |
7 | ON state duration | 2 | Valid values: 1 to 1440 , in minutes. |
8 | OFF state duration | 2 | Valid values: 1 to 1440 , in minutes. |
Description of recurring day(s)
If all the bits are set to 0
, it indicates a one-time task. If a bit is set to 1
, it indicates the task recurs on that day every week. For example, 0x42
means that the task takes effect on Saturday and Monday. Note that the task switch must be turned on.
Reserved | Saturday | Friday | Thursday | Wednesday | Tuesday | Monday | Sunday |
---|---|---|---|---|---|---|---|
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
Users can schedule a task to turn on and off their devices randomly during the set time period. By default, the device is on when the task starts and is off when the task ends.
When users go out for a long time, random timing can be used to turn the lights on or off just as if someone was at home, in order to deter burglars.
No. | Field | Length (byte) | Property |
---|---|---|---|
1 | Version number | 1 | / |
2 | Byte length | 1 | / |
3 | Switch + channel ID | 1 |
0x03 is 0000 0011 in binary. 1 represents the ON state. |
4 | Day of week | 1 | Specifies the recurring day(s). If a bit is set to 1 , it means that the task will recur weekly on this specified day. The following table details each field. |
5 | Start time | 2 | Valid values: 0 to 1439 , in minutes. |
6 | End time | 2 | Valid values: 0 to 1439 , in minutes. |
Description of recurring day(s)
If all the bits are set to 0
, it indicates a one-time task. If a bit is set to 1
, it indicates the task recurs on that day every week. For example, 0x42
means that the task takes effect on Saturday and Monday. Note that the task switch must be turned on.
Reserved | Saturday | Friday | Thursday | Wednesday | Tuesday | Monday | Sunday |
---|---|---|---|---|---|---|---|
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
You can customize functions beyond the standard functions. For more information, see Custom Function.
Advanced functions include cloud timing and jumping page. For more information, see Advanced Function.
After the function definition step, you can configure a favorite app control panel for the product. A panel is a GUI-based program that runs on top of a mobile app to control smart products. For more information about panel configurations and development tutorials, see Design App UI and Panel Development.
Hardware development consists of hardware design and embedded development. Tuya provides a no-code development method for some electrical products. You can develop firmware simply by editing the parameters without coding. Moreover, you can implement custom development based on the MCU SDK or TuyaOS as needed.
No. | Design type |
---|---|
1 | Power Design |
2 | Compliance Design for Electrical Product |
No. | Wireless protocol | Number of switch channels | Power supply type | Recommended module |
---|---|---|---|---|
1 | Wi-Fi and Bluetooth Low Energy (LE) combo | 1- to 4-gang smart switch module | With neutral | CB2S, CBU, and CBU-IPEX |
2 | Zigbee | 1- to 4-gang smart switch module | With neutral | ZT2S, ZTU, and ZTU-IPEX |
3 | Zigbee | 1- to 3-gang smart switch module | Without neutral | ZT2S, ZTU, and ZTU-IPEX |
4 | Bluetooth mesh | 1- to 4-gang smart switch module | With neutral | BT2S, BTU, and BTU-IPEX |
Contact Tuya’s account manager to request the open source hardware materials.
Embedded development is broken down into SoC-based no-code development, MCU SDK development, and TuyaOS-based SDK development.
With no-code development, you can edit the configuration parameters to generate the firmware. For more information, see the prompts on the platform.
As one of the most popular methods, the MCU integration solution enables products with built-in microcontrollers to connect to the cloud and become connected. Tuya provides one-stop services including network modules, mobile apps, and cloud services, to help you easily build an IoT-enabled product. With Tuya’s MCU SDK, all-in-one mobile apps, and control panels, you can focus on application development simply, connect your product to the Tuya Developer Platform easily, and benefit from the cloud services quickly.
For more information, see MCU SDK Development.
Smart switches can be developed based on multiple protocols, including Zigbee, Wi-Fi and Bluetooth combo, and Bluetooth mesh. For more information, see the following documentation.
Built on top of RTOS, Linux, and Non-OS, TuyaOS is a distributed and platform-agnostic IoT operating system.
With a standard kernel at the core, TuyaOS is designed to tackle the heterogeneity of platforms, systems, and protocols in order to enable quick and reliable integration, interconnection, and interoperability.
The tiered and plug-and-play architecture design allows you to quickly tailor a solution based on your hardware resources, hence reducing the cost of development with high cost performance. The efficient remote procedure call (RPC) mechanism and proprietary data point (DP) protocols make communication across protocols possible and easy.
Specifically, the following types of devices can be connected based on this solution:
Product configuration helps you set and manage different features in one place, including firmware updates, multilingual support, device notification, device pairing, scene linkage, quick toggle, knowledge base, and product manual. These features can help you distribute products worldwide and improve user experiences with continuous iteration. The feature can take effect immediately after you finish the configuration without hardware replacement.
Take care of the multilingual support, device pairing, and scene linkage, which require product- and market-specific configuration and management.
For more information, see the following documentation.
Flash the device with the firmware and Tuya’s license to connect the device to the cloud. Tuya provides a variety of flashing and authorization methods for you to choose from according to different development stages.
Before your product can be released on the Tuya Developer Platform, you must submit a product test report. To test the product, you can use Tuya’s Cloud Test app or perform the test by yourself.
To help you quickly identify issues for troubleshooting, the Cloud Test app enables integrated testing on hardware functionalities and data interaction in terms of various test modes. For more information, see Cloud Test App.
Use your own test plan to complete product functionality testing. Make sure that all product functionalities are available, including but not limited to device pairing, device control, and firmware OTA update.
After you submit the test report, you can release your product on the Tuya Developer Platform.
To roll out your product in target markets, you need to get your product certified for each market’s regulations. By virtue of rich experience in smart product development, Tuya provides a set of product certification solutions. You can choose among these solutions to meet your product category and certification requirements. For more information, see Product Certificate.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback