Tuya Smart for Openclaw

A comprehensive integration for controlling and automating Tuya Smart IoT devices through official cloud APIs with built-in safety protocols.

ivangdavila
v1.0.0
Mar 5, 2026
0
898
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tuya

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tuya using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Tuya Smart?

The Tuya Smart skill provides a robust interface for AI agents to interact with the Tuya IoT Platform. It streamlines complex operations such as HMAC-SHA256 request signing, regional endpoint mapping, and device capability discovery. By leveraging Openclaw Skills like this, developers can implement secure, region-aware workflows that manage everything from individual device states to large-scale automation orchestration within the Tuya ecosystem.

Tuya Smart Use Cases

  • Automating device state changes for lights, switches, and climate control systems.
  • Discovering device function schemas to ensure valid command execution.
  • Managing cloud project authentication and regional endpoint resolution.
  • Linking app accounts and managing user-device bindings through official APIs.
  • Orchestrating multi-device rollout patterns with staged verification and safety gates.

How Tuya Smart Works

  1. Identifies the correct regional OpenAPI endpoint based on the project data center configuration.
  2. Generates secure API signatures using HMAC-SHA256 for authenticated cloud communication.
  3. Discovers device capabilities and schemas to prevent sending invalid command codes.
  4. Implements a read-before-write control loop to capture baseline device status.
  5. Executes commands following strict safety gates and dry-run verification steps.
  6. Records operational metadata and incident logs in a local directory for full observability.

Tuya Smart Setup

First, ensure you have your Tuya IoT Platform credentials (Access ID and Access Secret). Set up your environment variables as follows:

export TUYA_ACCESS_ID='your_access_id'
export TUYA_ACCESS_SECRET='your_access_secret'

This skill requires curl, jq, and openssl to be installed on your system. Once configured, Openclaw Skills will manage the directory structure in ~/tuya/ to maintain operational memory.

Tuya Smart Data Schema & Taxonomy

The skill organizes its operational data within the ~/tuya/ directory using the following structure:

File Purpose
memory.md Core context, activation boundaries, and session status
environments.md Region, project, and endpoint mapping definitions
devices.md Device inventory, capability schemas, and command dictionaries
automations.md Cross-device orchestration plans and safety policies
incidents.md Error signatures, fix histories, and verification evidence

Tuya Smart Advanced Features

  • Region-aware routing for US, Europe, China, and India data centers.
  • Secure HMAC-SHA256 request signing for all cloud communications.
  • DPS-based granular command control for specific device functions.
  • Automated incident tracking and remediation logging for IoT troubleshooting.
  • Safety-first execution with explicit gates for high-impact actions like power or locks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*