# 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

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

## Build

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

## Run

```shell
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.
