🏆 Join the TuyaOpen AI Hardware Contest! 100 days to build the future of AI devicesLearn More →
Skip to main content

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.

IoT Switch Project Screenshot

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​

  1. Clone the TuyaOpen repository or download the source code.
  2. Set up your development environment following the Quick Start Guide.
  3. Obtain your Device Auth Key from the Tuya Developer Platform.
  4. Update the credential information in the tuya_config.h header file.
  5. Compile and flash the firmware to your device.
  6. Run and debug your IoT Switch.

🚀 Go to Project Repository