Simple Tuya IoT Switch
Project Overviewâ
The IoT Switch project is a simple yet powerful demonstration of how to build a cloud-connected device using Tuya's platform. This example showcases a basic switch that can be controlled via a mobile app, highlighting essential concepts such as DP (Data Point) control and minimal code implementation for a connected device. The project includes secure device authentication using PID, UUID, and Auth Key, and is compatible with a wide range of hardware platforms, including Tuya T series MCUs, ESP32, and Linux-based MCUs.
Featuresâ
- Simple Tuya cloud-connected switch device
- App-based remote control
- Minimal and easy-to-understand codebase
- Secure device authentication (PID, UUID, Auth Key)
- Supports multiple hardware platforms
Supported Hardwareâ
- Hardware platforms/chip models: Tuya T5, Tuya T2, Tuya T1, ESP32, Linux SoCs, and more
Quick Startâ
- Clone the TuyaOpen repository or download the source code.
- Set up your development environment following the Quick Start Guide.
- Obtain your Device Auth Key from the Tuya Developer Platform.
- Update the credential information in the
tuya_config.h
header file. - Compile and flash the firmware to your device.
- Run and debug your IoT Switch.