Integration with Tuya#
GbbOptimizer can control Tuya devices (e.g. smart sockets) via the Tuya Cloud API. This requires creating a developer project on the Tuya platform and obtaining API keys.
Obtaining Access ID and Access Secret#
1. Create a developer account#
Register at platform.tuya.com.
2. Create a Cloud Project#
- Go to Cloud -> Development
- Click Create Cloud Project (top right corner)
- Fill in the form:
- Project name — any name
- Industry — select the appropriate industry
- Development Method — Smart Home
- Data Center — select the one closest to your location
- On the next screen click Authorize
3. Connect the mobile app#
- Go to Devices -> Link App Account
- Click Add App Account
- A QR code will appear
- In the Tuya/Smart Life mobile app: Me (bottom menu) -> scan icon (top right corner)
- Scan the QR code
After connecting, a list of your devices will appear in the All Devices tab.
4. Copy API keys#
In the Overview tab you will find:
- Access ID / Client ID
- Access Secret / Client Secret
Enter these in the GbbOptimizer configuration under IoT -> Tuya.
Extending the Trial Period#
Tuya API keys have a limited trial period. To extend it:
- Log in to platform.tuya.com
- Go to Cloud -> Cloud Services
- Select IoT Core and click View Details
- Click Extend Trial Period and follow the instructions
If the trial period expires, GbbOptimizer will lose the ability to control Tuya devices. Remember to extend it regularly.