Skip to content
/ tuyaha Public
forked from PaulAnnekov/tuyaha

Implements the special Tuya Home Assistant API.

License

Notifications You must be signed in to change notification settings

guino/tuyaha

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domoticz-TUYA-Plugin

TUYA Plugin for Domoticz home automation

Controls TUYA devices your network (mainly on/off switches and Lights). Tuya devices come in many brands and may come with different apps such as Smart Life or Jinvoo Smart, so select the matching App when configuring the plugin.

Key Features

  • Auto-detects devices on your account
  • Tested with lights and switches (but should control other devices on/off)
  • Cloud control only uses your user/password account with encrypted communications without requiring IP or device IDs or Keys to configure it
  • Allows controlling Dimmer/RGB Color for lights
  • Supports scene activation

Installation

Python version 3.4 or higher required & Domoticz version 3.9446 or greater.

To install:

  • Go in your Domoticz directory using a command line and open the plugins directory.
  • Run: git clone https://github.com/guino/tuyaha.git
  • Restart Domoticz.

Updating

To update:

  • Go in your Domoticz directory using a command line and open the plugins directory then the Domoticz-TUYA directory.
  • Run: git pull
  • Restart Domoticz.

Alternate Install/Update:

  • Simply create a directory under domoticz/plugins directory like 'TUYA' and download/copy the plugin.py file and tuyaha directory (with all its contents) into it.
  • Restart Domoticz.

Configuration

Enter your username and password for your app account along with your country code (1=US/Canada, 55=Brazil, etc). The initial setup of your devices should be done with the app and this plugin will detect/use the same settings and automatically find/add the devices into Domoticz.

Usage

In the web UI, navigate to the Hardware page. In the hardware dropdown there will be an entry called "TUYA" -- configure and add the hardware there. Devices detected are created in the 'Devices' tab, to use them you need to click the green arrow icon and 'Add' them to Domoticz.

Change log

Version Information
1.0.1 Support for SmartLife and Jinvoo Apps
1.0.0 Initial upload version

Includes 'tuyaha' project:

Cloned from the abandoned package tuyapy v0.1.3. This package implements a Tuya API endpoint that was specially designed for Home Assistant.

This clone contains several critical fixes. Check commits.

How to check whether the API this library using can control your device?

  • Copy this script to your PC with Python installed or to https://repl.it/
  • Set/update config inside and run it
  • Check if your devices are listed
    • If they are - open an issue and provide the output
    • If they are not - don't open an issue. Ask Tuya support to support your device in their /homeassistant API
  • Remove the updated script, so your credentials won't leak

Light temperature support by Xenomes

There's a fork of this plugin with support for light temperature control (for devices which support it), you can check it out at: https://github.com/Xenomes/Domoticz-TUYA-Plugin

About

Implements the special Tuya Home Assistant API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%