Tuya Smart Home
v1.0.0Control Tuya/Smart Life smart home devices including pet feeders, lights, plugs, curtains via cloud API or local network. Use when: (1) controlling smart hom...
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description, SKILL.md, reference doc, and the two Python scripts are all consistent: they implement cloud API access (tuya-connector) and local control/scan (tinytuya). Nothing requested or installed is unrelated to controlling Tuya/Smart Life devices.
Instruction Scope
Runtime instructions and scripts only perform expected actions: scan local network (tinytuya.deviceScan), query cloud API endpoints, retrieve device info (including local_key) and send device commands. The instructions do not reference unrelated files, credentials, or external endpoints beyond Tuya API domains and local device IPs.
Install Mechanism
This is an instruction-only skill with bundled scripts; dependencies are standard public Python packages (tinytuya, tuya-connector-python) installed via pip. No arbitrary downloads or extract/install steps are present.
Credentials
The registry metadata declares no required env vars, and the scripts accept credentials via CLI flags rather than environment variables. This is reasonable, but be aware you will need to supply ACCESS_ID/ACCESS_SECRET (cloud) or DEVICE_ID/LOCAL_KEY/IP (local). The skill does not request unrelated credentials.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modify other skills or system-wide settings. The default ability for the agent to invoke the skill autonomously is not combined with other red flags here.
Assessment
This skill appears to do what it says: control Tuya devices via cloud or local network. Before installing: (1) inspect or run the included scripts in a safe environment if you have doubts (the source is bundled and readable); (2) only provide your Tuya ACCESS_ID/ACCESS_SECRET or LOCAL_KEY/IP when needed and to a trusted runtime — these are real credentials that grant device control; (3) be aware the scan will probe your local network to find Tuya devices; and (4) the scripts use public pip packages (tinytuya, tuya-connector-python) — consider auditing those packages or installing in an isolated virtualenv. If you want tighter control, prefer local mode and avoid giving cloud credentials to untrusted hosts or agents.Like a lobster shell, security has layers — review code before you run it.
latest
Tuya Smart Home
Control any Tuya/Smart Life device via cloud API or local network.
Dependencies
pip3 install tinytuya tuya-connector-python
Configuration
Two control modes available:
Cloud Mode
Requires Tuya IoT Platform credentials from https://iot.tuya.com:
ACCESS_ID— from Cloud ProjectACCESS_SECRET— from Cloud ProjectREGION— cn (China), us (Americas/SEA), eu (Europe), in (India)
Local Mode (Recommended)
Requires device info (obtain via cloud API first):
DEVICE_ID— device identifierLOCAL_KEY— device encryption keyIP— device local IP addressVERSION— protocol version (usually 3.4)
Quick Start
Scan for devices on local network
python3 scripts/tuya_scan.py
Get device info (cloud)
python3 scripts/tuya_control.py --mode cloud --action info \
--device-id DEVICE_ID \
--access-id ACCESS_ID --access-secret ACCESS_SECRET --region cn
Query device status
# Cloud
python3 scripts/tuya_control.py --mode cloud --action status \
--device-id DEVICE_ID \
--access-id ACCESS_ID --access-secret ACCESS_SECRET --region cn
# Local
python3 scripts/tuya_control.py --mode local --action status \
--device-id DEVICE_ID --ip IP --local-key KEY
Send command
# Cloud — feed pet 1 portion
python3 scripts/tuya_control.py --mode cloud --action send \
--device-id DEVICE_ID --code manual_feed --value 1 \
--access-id ACCESS_ID --access-secret ACCESS_SECRET --region cn
# Local — feed pet 1 portion
python3 scripts/tuya_control.py --mode local --action send \
--device-id DEVICE_ID --ip IP --local-key KEY \
--dp-id 3 --value 1
# Turn on light
python3 scripts/tuya_control.py --mode cloud --action send \
--device-id DEVICE_ID --code switch_led --value true \
--access-id ACCESS_ID --access-secret ACCESS_SECRET --region cn
# Open curtain
python3 scripts/tuya_control.py --mode cloud --action send \
--device-id DEVICE_ID --code control --value open \
--access-id ACCESS_ID --access-secret ACCESS_SECRET --region cn
Common Device Commands
| Device | Code | Values | Description |
|---|---|---|---|
| Pet Feeder | manual_feed | 1-12 | Feed N portions |
| Pet Feeder | quick_feed | true | Quick feed |
| Pet Feeder | light | true/false | Night light |
| Light | switch_led | true/false | On/off |
| Light | bright_value | 10-1000 | Brightness |
| Light | temp_value | 0-1000 | Color temperature |
| Plug | switch_1 | true/false | On/off |
| Curtain | control | open/stop/close | Movement |
| Curtain | percent_control | 0-100 | Position % |
China Region Note
China data center (openapi.tuyacn.com) blocks non-China IPs by default.
Solutions:
- Add your IP to whitelist in Tuya IoT Platform → Project → IP Whitelist
- Use local mode (bypasses cloud entirely, recommended)
API Reference
For detailed API documentation, DP code tables, and setup guide, see references/tuya_api.md.
Comments
Loading comments...
