Tuya Cloud
by @minshi-veyt
Read sensor data and control Tuya IoT devices via Tuya Cloud API or local LAN. Use when the user wants to list devices, read temperature, humidity, soil mois...
Add credentials to .env:
TUYA_ACCESS_ID=your_access_id
TUYA_ACCESS_SECRET=your_access_secret
TUYA_API_ENDPOINT=https://openapi.tuyaeu.com # default: tuyaus.com (US)
Regional endpoints: EU tuyaeu.com Β· US tuyaus.com Β· CN tuyacn.com Β· IN tuyain.com
Enable IoT Core service in your Tuya IoT Platform project, and grant devices controllable permission (read-only by default).
| Error | Fix |
|---|---|
| "Data center is not enabled" | Enable IoT Core in Tuya IoT Platform β Service API |
| "Permission denied" | Subscribe to IoT Core and enable Device Status Notification |
| Device offline | online: false; soil moisture returns null |
| Wrong endpoint | Match TUYA_API_ENDPOINT to your account region |
| Local scan finds nothing | Check firewall; UDP broadcast may be blocked on some networks |
| Local control fails for Zigbee devices | Zigbee sub-devices must be controlled via their gateway (use gateway ID + cid) |
clawhub install tuya-cloud