Skip to content

zachcheatham/ha-tuya-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Tuya Local Integration

Control your TuyaCloud devices via Local Push in Home Assistant. This integration was thrown together fairly quickly in response to receiving some cheap Wi-Fi bulbs with the latest version of Tuya's firmware that cannot yet be flashed with Tasmota OTA.

Notice: This component currently only supports lights as I only have Tuya lights available to test with. I will be writing the integrations for these soon, but will be unable to test.

Notice: This component has only been tested with Tuya devices running firmware version 3.3. If you have devices you can test with, I encourage you to open an issue containing error logs or contribute directly with code 😁!

This integration makes use of my AIO Tuya library for communicating with these devices. I want to thank the following projects for their existing work at reverse engineering Tuya's protocols to make that library possible:

I also realize now there are some other custom components floating around that serve a similar purpose and have more devices tested and supported.

Installation

Requirements

This integration requires your devices' device id and local key. You can read about retrieving that information here. I personally was able to retrieve this information by connecting the bulbs with an older version of the Smart Life app and pulling its preferences.xml using a rooted android phone.

HACS

  1. Add https://github.com/zachcheatham/ha-tuya-local as a custom integration repository to HACS.
  2. Click install under "Tuya Local Component."
  3. Configure your devices and restart.

Manual

  1. Download the latest release as a ZIP
  2. Copy /custom_components/tuya_local to your Home Assistant <config_dir>/custom_components/ directory.
  3. Configure your devices and restart.

Configuration

Example

light:
  - platform: tuya_local
    host: 192.168.1.43
    device_id: 4324357afb43243
    local_key: 587902facde43
    version: 3.3
    name: Front Porch Light
  - platform: tuya_local
    host: 192.168.1.44
    device_id: 2311bdf24ac43e
    local_key: 432901939458544ac
    version: 3.3
    name: Bath Light

TO-DO

  • Support additional device types.
  • Support light effect patterns.
  • Test support of older firmware versions (I currently don't own any devices running < 3.3.)
  • Support Home Assistant's config UI.

Reporting Issues

  1. Setup the logger component of Home Assistant to log debug messages from this component and related libraries:
logger:
  default: info
  logs:
    custom_components.tuya_local: debug
    aiotuyalan: debug
  1. Restart HA
  2. Retrieve your logs containing the related errors and open a issue in this repository.
  • You can include logs using pastebin and include the link in your issue.
  • Please include details of your Home Assistant enviornment.

About

Home Assistant Integration for Tuya Devices via LAN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages