Tuya · Schema
Tuya Device Command
Represents a control command sent to a Tuya IoT device. Commands target specific data points using code/value pairs defined by the product schema.
IoTSmart HomeDevicesCloud PlatformAutomationIndustrial IoTDevice Management
Properties
| Name | Type | Description |
|---|---|---|
| commands | array | Array of data point commands to send to the device |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://developer.tuya.com/schemas/tuya/command.json",
"title": "Tuya Device Command",
"description": "Represents a control command sent to a Tuya IoT device. Commands target specific data points using code/value pairs defined by the product schema.",
"type": "object",
"properties": {
"commands": {
"type": "array",
"description": "Array of data point commands to send to the device",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Data point code identifier (e.g., switch_led, work_mode, bright_value_v2, colour_data_v2)"
},
"value": {
"description": "Command value. Type depends on the data point: boolean for switches, integer for numeric values, string for enums, object for complex types like colour_data"
}
},
"required": ["code", "value"]
}
}
},
"required": ["commands"],
"examples": [
{
"commands": [
{"code": "switch_led", "value": true}
]
},
{
"commands": [
{"code": "work_mode", "value": "colour"},
{"code": "colour_data_v2", "value": {"h": 120, "s": 1000, "v": 800}}
]
},
{
"commands": [
{"code": "switch_1", "value": true},
{"code": "switch_2", "value": false}
]
}
]
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/tuya-command"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.