Note

This is the documentation for the latest development branch and may refer to features that are not available in released versions. If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

Tuya Basic Example

Tuya Basic Example#

Overview#

This example shows the basic workflow of the Tuya IoT Core SDK on K230, including MQTT initialization, connection setup, online callbacks, property reporting, event reporting, and message callbacks.

Source Location#

src/rtsmart/examples/3rd-party/tuya/tuya_basic

Build#

Enable the related 3rd-party examples in make menuconfig, then build the firmware.

Run#

cd /sdcard/app/examples/3rd-party/tuya
./tuya_basic.elf

Before Running#

Configure valid device credentials in:

  • productId

  • deviceId

  • deviceSecret

The relevant source file is:

  • src/rtsmart/examples/3rd-party/tuya/tuya_basic/data_model_basic_demo.c

Notes#

After a successful connection, the sample demonstrates property readback, desired-state readback, property reporting, and event reporting inside the registered callbacks.

Comments list
Comments
Log in