Smart Control,
Endless Possibilities
Connect to the Tuya smart home ecosystem via REST API, AI Agent Skill, or CLI A single API Key unlocks 3,000+ smart hardware categories.
npm install -g tuya-smart-control-cliFlexible Integration, Minimal Setup
Whether you're building AI apps, scripting automations, or managing devices from the terminal — there's a perfect fit for you.
Open REST API
Standard HTTP interface callable from any language. Bearer Token auth, auto region detection, full support for home management, device control, weather, and notifications.
- Bearer Token Auth
- Auto Region Detection
- Unified Response Format
- Python SDK Included
AI Agent Skill
A skill plugin designed for AI agents — install directly into Claude, GPT, and others to control smart home devices via natural language.
- OpenClaw / ClawHub Support
- 11 Built-in Workflows
- Natural Language Control
- MIT-0 License
Command Line Tool
Official Node.js CLI — install via npm and manage smart home devices from your terminal. Supports --json output for scripting and CI/CD pipelines.
- tuya init Quick Setup
- Device Query & Control
- Real-time Event Subscribe
- --json Pipe Output
A Few Lines, Full Control
Choose between Python SDK or CLI — both get you there
from tuya_api import TuyaAPI
api = TuyaAPI() # auto-reads TUYA_API_KEY
# List all devices
devices = api.get_all_devices()
# Query device Thing Model
model = api.get_device_model("device_id")
# Turn on light, set brightness 500
api.issue_properties("device_id", {
"switch_led": True,
"bright_value": 500,
"work_mode": "white"
})
# Get weather (Beijing)
weather = api.get_weather(
lat="39.9042", lon="116.4074"
)Full Scenario Coverage, Ready to Use
From device queries to real-time subscriptions, from notifications to IPC capture — full smart home control coverage.
Home & Space Management
Query all homes, rooms, and geo-location for weather. Supports multi-home, multi-room hierarchical structure.
Device Query & Control
Get device lists and live status, query Thing Models (with property types and value ranges), issue control commands for bool/value/enum/string properties.
Weather Service
Get real-time and up to 7-hour hourly forecasts by lat/lon. Supports temperature, humidity, pressure, wind speed, UV index, and more.
Message Notifications
Send SMS, voice calls, emails, and App push notifications to the current user. Designed for device alerts and anomaly warnings.
Data Statistics
Query device energy usage and other metrics. Supports hourly SUM/MAX/MIN aggregation with a maximum 24-hour window per request.
IPC Cloud Capture
Trigger cloud snapshots and short video recordings from cameras. Combine with AI vision for security and monitoring use cases.
Real-time Device Events (WebSocket)
Receive device property changes and online/offline events in real time via WebSocket. Event-driven automation, live dashboards, anomaly alerts. 7 data center endpoints, auto-detected from API key prefix, with auto-reconnect.
One API Key,
Connect Everything
Get your API Key now and start building smart home applications via REST API, AI Agent Skill, or CLI.
Resources
Docs, open-source repositories and the developer platform
