LOCAL control of Tuya devices

Anyone doing LOCAL control of Tuya devices in a recent home assistant build, say 0.84 or later? I got the cloud based version working fine, but would prefer not to rely on Tuya servers or allow these devices to have wan access.

I see a number of posts from before the official Tuya component came out, and tried unsuccessfully to use some of those configs. I do have my device IDs and local keys already. Just need (working) hass config info. I also have a copy of tuya.py but no idea if the one I have is the right version if it is still needed at all.

2 Likes

Yes works well here, however, there’s some development in the works to be able to flash tuya stuff to tasmota OTA, if that interests you. A rough version is released but wait a week or so if you can for it to get polished. Somewhere along the way someone had some modifications to their tuya.py that picked up the device without specific IP address.

I’ll be ditching this as fast as possible once I get ESPhome on them without haveing to crack them open.

I did my tuya local like this in config.yaml

switch:
  - platform: tuya
    host: 0.0.0.0
    local_key: ...
    device_id: ....
    switches:
      switch1:
        friendly_name:  Christmas Tree
        id: 1
1 Like

Yeah if you can hold out I would. It’s not that it’s hard to setup the local control, it’ll just be so much better if we can flash them to tasmota.
If you still want to get it setup this will get you there.

This does work just fine with the Linux subsystem in Windows 10 if you don’t have a Linux box.

Cheers

3 Likes

Ok, being able to flash to tasmota sounds like a winner to me - I will wait and keep an eye out for developments on that. Thanks.

Could you share a copy of the tuya.py custom component file please. Can’t find it anywhere

Cheers

hey, i know this post is old, can you help me get my tuya plugs working with the cloud. mine dont sync to ha, any solutions?

Thanks
Saran

how do I put this in a.yaml
to make a switch in Home Assistant.
it works for me in node-red

PLEASE HELP