tuya

n8n node for Tuya Smart Home API integration

Package Information

Downloads: 0 weekly / 0 monthly
Latest Version: 2.0.0
Author: Patrik Almasi

Documentation

n8n-nodes-tuya

An n8n community node for integrating with Tuya Smart Home API.

Features

  • Device Control: Turn devices on/off and send commands
  • Tuya Cloud API Integration: Full support for Tuya OpenAPI
  • Easy Authentication: Credential management with API Key and Secret

Installation

  1. Copy this folder into your n8n custom nodes directory:

    ~/.n8n/nodes/
    
  2. Install dependencies:

    npm install
    
  3. Build the package:

    npm run build
    
  4. Restart n8n

Setup

1. Get Tuya Credentials

  1. Go to Tuya IoT Platform
  2. Create a developer account and project
  3. Generate API keys (Client ID and Client Secret)
  4. Note your Region (e.g., "us", "eu", "cn")

2. Configure in n8n

  1. Create a new Tuya credential in n8n
  2. Enter your Client ID, Client Secret, Region, and Data Center
  3. Use the credential in your Tuya nodes

Usage Example

Control a Device

  1. Add a Tuya node
  2. Select "Control Device" operation
  3. Enter Device ID
  4. Select the command (On, Off, etc.)
  5. Execute

Send a Command

For more complex device commands:

  1. Add a Tuya node
  2. Select "Send Command" operation
  3. Provide Device ID and command details
  4. Execute

Available Operations

  • Control Device: Simple on/off control
  • Send Command: Send custom commands to devices
  • Get Device Status: Fetch current device state
  • List Devices: Get all devices in your Tuya account

API Reference

For more information about Tuya API, visit:

Support

For issues, questions, or contributions, please open an issue on GitHub.

License

Apache License 2.0

Discussion