How to: connect Tuya / Smart Life devices (Tuya Automation)
The separate Vachr Tuya Automation plugin controls Tuya / Smart Life devices (heating, lights, sockets, thermometers, smart lock PINs) according to your reservations. Each site owner connects their own Tuya Cloud project, so nothing runs through a third-party server. This guide covers the one-time connection.
1 |
Download the plugin ZIP from https://vachr.cz/plugins-for-wordpress/ and install it in WordPress via Plugins -> Add New -> Upload Plugin. Activate Vachr Tuya Automation next to Vachr Short-Term Rental Reservations; the new page Bookings -> Tuya Automation appears. |
|---|---|
2 |
Add your devices to the Smart Life or Tuya Smart mobile app and check that they work there. |
3 |
Go to iot.tuya.com, register or log in and open Cloud -> Development -> Create Cloud Project. Choose Smart Home as the development method and select the data center that matches the region of your Smart Life account (for Europe usually Central Europe). The data center cannot be changed later. |
4 |
In the project open Service API and make sure IoT Core is subscribed (and Smart Lock Open Service if you want to generate smart lock PINs). The free trial may need to be renewed on the Tuya site from time to time. |
5 |
In the project open Devices -> Link App Account -> Add App Account and scan the QR code with the Smart Life / Tuya Smart app (Me -> scan icon in the top right corner). Your devices now appear under Devices -> All Devices. |
6 |
Copy Access ID and Access Secret from the Overview tab of the project. |
7 |
In WordPress open Bookings -> Tuya Automation, enter Access ID, Access Secret and the same “Data center”, and click “Save settings”. |
8 |
Click “Test connection”. The message “Connection to Tuya works.” confirms that the keys and the data center are correct. |
9 |
Click “Load devices from Tuya” to list all your devices with name, Device ID, category and online status, and copy the Device IDs you want to automate. |
Costs and privacy: you use your own Tuya Cloud account. The plugin talks only to the official Tuya API, and the Access Secret is stored encrypted in your WordPress database. Any trial renewals or API limits of Tuya apply to your own Tuya account.
No devices in the Tuya console or in “Load devices from Tuya”: the data center of the project must match the region of your Smart Life account. The data center cannot be changed on an existing project, so delete it and create a new project with the correct data center (new Access ID and Secret), then link the app again. If the list is still empty, uninstall and reinstall the Smart Life app, log in with the correct region and scan the QR code again.
Another way to find a Device ID: in the Smart Life app open the device, tap the pencil icon and then Device Information. The Virtual ID shown there is the Device ID.
“Test connection” fails: error 1004 (sign invalid) means a wrong Access ID / Secret or a wrong clock on the server; error 1106 (permission deny) means the device is not linked to the project or IoT Core is not subscribed; error 2406 or a message about the data center means a wrong “Data center”.
“Load devices from Tuya” returns an error although “Test connection” works: the project may not have permission for the device list. Copy the Device IDs from the Tuya console (Devices -> All Devices) or from the Smart Life app instead.