Tuya and Smart Life devices are everywhere — lights, switches, plugs, sensors, thermostats, energy monitors. But most users don't know that these devices can be controlled locally, without cloud APIs, without latency, and without internet dependency.
Nodlyn includes a powerful Tuya Local Connector that talks directly to your devices over the LAN using the Tuya v3.3 protocol. This means faster automation, offline resilience, and full control over your smart environment.
Step 1: Discover Your Tuya Devices
Nodlyn automatically detects Tuya devices on your network using the built-in UDP discovery probe. You'll see each device's IP address, device ID (gwId), and model information — no cloud login required.
Step 2: Obtain the Local Key
To control a Tuya device locally, you need its localKey — a 16-character AES key. You can retrieve it from the Tuya IoT Platform or your Smart Life account. Nodlyn stores this key securely using encrypted workflow secrets.
Step 3: Read Device Status
Drag the Tuya Get Status node onto the canvas. Configure the device IP, device ID, and local key. When you run the workflow, Nodlyn opens a secure TCP session and retrieves all DP (data point) values:
- DP 20 — switch on/off
- DP 22 — brightness
- DP 23 — color temperature
- DP 24 — HSV color
- Energy metrics, sensor readings, and more
The node outputs structured JSON you can use in downstream actions.
Step 4: Control the Device
To change the device state, use the Tuya Send Command node. Set the DP index (e.g., 20 for switch, 22 for brightness) and the value you want to send.
Examples:
true
500
{"h":120,"s":100,"v":100}
Nodlyn sends the command through a persistent TCP connection with heartbeat monitoring, automatic reconnection, and serialized command execution for maximum reliability.
Step 5: Build Smart Automations
Now that you can read and control Tuya devices locally, you can build powerful workflows:
- Turn lights on when a sensor triggers
- Dim brightness at sunset
- Monitor energy usage and send alerts
- Trigger lighting scenes from webhooks or schedules
All of this runs offline — even if the internet goes down, your automations continue to work.
What's Next?
Explore more device capabilities, combine Tuya nodes with HTTP, MQTT, Telegram, Slack, or other connectors, and build complete smart-home or smart-office workflows.
Nodlyn gives you full control over your environment — locally, securely, and reliably.