Tuya / Smart Life
cloud-then-localby ALYT
What it adds to a house
Section titled “What it adds to a house”adds switches and lights.
How a person connects it
Section titled “How a person connects it”Method: form. From a free Tuya IoT Platform project (iot.tuya.com) that the Smart Life account is linked to: its data centre, Access ID and Access Secret. ALYT fetches each device’s local key once and keeps only those. No password is asked.
| Field | Kind | Required |
|---|---|---|
Data centre (region) | select | yes |
Access ID (accessId) | text | yes |
Access Secret (accessSecret) | password, secret | yes |
What it can look for
Section titled “What it can look for”Yes: “Look for Tuya devices”.
What stops working when it is disconnected
Section titled “What stops working when it is disconnected”The things it brought stop answering until it is connected again.
The descriptor
Section titled “The descriptor”Connection fields are served for a program at /connectors/tuya.json.
{ "source": "built-in", "visibility": "public", "listed": true, "version": "1.0.0", "docsUrl": "https://developers.alyt.com/connectors/tuya", "kind": "TUYA", "logo": { "url": "/integrations/logos/tuya.png", "color": "#FF4800", "ratio": 1, "background": "#1F7EFF", "inset": 0, "scale": 1 }, "name": "Tuya / Smart Life", "icon": "plug", "connectivity": "cloud-then-local", "brings": [ "switch", "light" ], "connect": { "method": "form", "help": "From a free Tuya IoT Platform project (iot.tuya.com) that the Smart Life account is linked to: its data centre, Access ID and Access Secret. ALYT fetches each device's local key once and keeps only those. No password is asked.", "fields": [ { "key": "region", "label": "Data centre", "kind": "select", "secret": false, "required": true, "options": [ { "value": "us", "label": "Western America" }, { "value": "us-e", "label": "Eastern America" }, { "value": "eu", "label": "Central Europe" }, { "value": "eu-w", "label": "Western Europe" }, { "value": "in", "label": "India" }, { "value": "cn", "label": "China" } ] }, { "key": "accessId", "label": "Access ID", "kind": "text", "secret": false, "required": true, "help": "On the project's Overview page." }, { "key": "accessSecret", "label": "Access Secret", "kind": "password", "secret": true, "required": true } ] }, "discovery": { "verb": "Look for Tuya devices" }, "disconnect": { "consequence": "{count} {things} stop answering until it is connected again." }, "author": { "kind": "alyt", "name": "ALYT", "url": "https://alyt.com" }}The guide
Section titled “The guide”Tuya / Smart Life connects a free Tuya IoT Platform project to ALYT without asking for a password. You provide the project’s data centre, Access ID, and Access Secret from the Smart Life account’s linked project, and ALYT fetches each device’s local key during discovery. Project credentials stay on the server; Discovery refreshes cloud metadata, so the stored device list and local keys update when Tuya is reachable, while normal state reads and writes use the devices’ local connections.
What it exposes
Section titled “What it exposes”This connector brings switch and light devices into ALYT. Switches expose power control. Lights expose power, brightness, and, when the bulb reports it, warmth and colour. Which bulb schema is used is learned from the device’s reported data points:
switch: power onlyv1: power, brightness, warmth, colourv1-white: power, brightness, warmth, no modev2: power, brightness, warmth, colour in the newer Tuya layout
A device that is not a light is treated as a switch from its category, without a LAN read for schema detection.
How connection works
Section titled “How connection works”To connect, enter:
- The Tuya data centre that matches the Smart Life account region.
- The project’s Access ID.
- The project’s Access Secret.
No password is asked. After the link is created, discovery refreshes the project’s device list from Tuya and updates the stored local keys. If a device is re-paired in Smart Life, its key can change; running discovery again picks up the new key.
The data centre must match the account region. Supported values are Western America, Eastern America, Central Europe, Western Europe, India, and China.
How discovery behaves
Section titled “How discovery behaves”Discovery looks for Tuya devices on the LAN and also refreshes cloud metadata for the linked project. If Tuya is unavailable, the stored device list remains usable. Normal reads and writes still use the local device connection when it is available.
A device must be on the same subnet as the connector’s sweep range to be found locally. If it has moved to another VLAN, discovery does not see it.
When discovery runs, it also refreshes product information and local keys from the project. That means rediscovery is the normal way to recover from a changed key, a device that was added later in Smart Life, or a bulb whose features were not fully identified on a previous run.
What cannot happen
Section titled “What cannot happen”- There is no password-based login.
- The connector does not support protocols outside the Tuya versions it speaks.
- A device that is not in the project’s linked list is rejected.
- A device with no cached LAN address cannot be controlled until discovery finds it again.
- A write is not a blind cloud write: the device must confirm it, or the connector reports the failure.
When it fails
Section titled “When it fails”If connect is refused, check the data centre, Access ID, and Access Secret, and confirm that the Smart Life account is linked to the Tuya project. If discovery finds no devices, confirm that the account is linked in the project and that the devices are present there.
If a device stops answering on the LAN, run discovery again. If the cloud path is down, ALYT keeps the stored list and uses the local device connections it already has. If a light reads as a plain switch, rediscover it so the connector can refresh its schema from the project and, when needed, the device’s own data points.
A device on a different VLAN will not be found by the subnet sweep. A device that moves address is found again on the next discovery, but until then a refresh reports it unreachable for that item.
Household access
Section titled “Household access”Household permissions are narrower than staff. The connector is read and controlled through the household’s installed integration, and LIVE credentials apply only to that installed connector. DEV credentials work only in the developer sandbox.