Tuya (Smart Life)
Read Tuya and Smart Life devices directly on your local network.
MQTT
Subscribe to MQTT topics and turn them into metrics.
REST API
Read values from any web API that returns JSON.
The Tuya source reads Tuya and Smart Life plugs, meters and switches directly over your own network (encrypted, on port 6668). The Tuya cloud is only needed once, to fetch each device's local key; after that, everything stays local.
Set it up with your Smart Life account
Find your Smart Life UID: in the Smart Life app, go to Me → ⚙ → Account → User ID.
In Settings → Sources → Tuya, enter the UID under Smart Life login and press Generate QR code. Scan the code with the Smart Life app (Me → + → Scan QR Code).
Your devices appear with everything filled in: their local keys, the names of their data points (DPs) and their addresses on your network.
Use the dropdowns to give the data points you care about a metric name.
Press Verify all devices to test them all at once, then Save changes.
Add a device by hand
If the cloud login didn't find a device, press + Add device manually and enter its Device ID, Local Key and IP Address, then add data points with + Add DP Mapping.
Discovery on Docker
The cloud login fills in the keys and data points, but each device's address on your network comes
from discovery: Tuya devices announce themselves with broadcasts on your local network. Those
broadcasts only reach a Docker container that uses host networking on a Linux host, so switch on
network_mode: "host" in the compose file if you want them (see
Install with Docker). Otherwise, including on Docker
Desktop for Windows and macOS, enter each device's IP address yourself. EpilykosOS needs nothing
extra.
Controlling Tuya devices
Switch and selector cards, and the slider and knob, can change Tuya values from the Controls page.
Last updated on