localtuya icon indicating copy to clipboard operation
localtuya copied to clipboard

Autodiscovery of devices not working

Open noob4722019 opened this issue 2 years ago • 10 comments

Hi all,

I believe I've configured the cloud credentials correct, however no devices appear when attempting to use the auto discovery feature. The devices work fine if I manually add them in.

Could it because my Tuya devices are on a different subnet to Home Assistant? And if so, is it possible to have home assistant scan other networks? Thanks.

image

noob4722019 avatar Sep 11 '22 11:09 noob4722019

Unfortunatly I also have the same issue... :(

SpudGB avatar Sep 14 '22 09:09 SpudGB

Same issue, tuya devices are also on a different subnet, which has internet access.

HA traffic is forwarded to that subnet, with masquerading enabled. (which fixes a similar issue for xiaomi integrations)

L4rryFisherman avatar Sep 14 '22 10:09 L4rryFisherman

Also having this issue, also on a different subnet

nfacha avatar Sep 17 '22 12:09 nfacha

Same issue, no subnet. Which data centers do you use? I am wondering if the datacenter mit be wrong - local tuya only knows one data center as EU. In Tuya IoT i chose central europe, while there is western europe as second option... Need to try if my local tuya app account needs a change too.

trauf0 avatar Sep 19 '22 11:09 trauf0

I'm using the Western Europe DC.

noob4722019 avatar Sep 23 '22 02:09 noob4722019

same as above... i'm sure its mdns, because when they are on same vlan it works. I did a whole network upgrade, and auto-discovery and vlans don't play nice. going to play around with igmp snooping and will report back

chrisvball avatar Sep 27 '22 05:09 chrisvball

Same problem was reported in case #936

trauf0 avatar Oct 01 '22 14:10 trauf0

I hope there will be a solution soon for this issue. Or at least a better description of how to use the manual configuration.

sarahmva avatar Oct 14 '22 02:10 sarahmva

no devices detected. My devices are also on a separate vlan

warren-axiell avatar Oct 15 '22 00:10 warren-axiell

Same issue. IoT devices are in a separate subnet and vlan. With firewall disabled still does not work.

Is there any fix whatsoever?

leonardochaia avatar Oct 19 '22 11:10 leonardochaia

Same issue, any news?

raimangsxr avatar Nov 14 '22 20:11 raimangsxr

I figured it out. I had the same issue and opened 6666 and 6667 on my firewall and all devices now show up. see comment here https://community.home-assistant.io/t/no-devices-found-in-ha-by-localtuya/392656/2

hazelement avatar Jan 20 '23 03:01 hazelement

I figured it out. I had the same issue and opened 6666 and 6667 on my firewall and all devices now show up. see comment here https://community.home-assistant.io/t/no-devices-found-in-ha-by-localtuya/392656/2

Do you mean to say that those ports were closed or did you somehow link them between VLAN and LAN subnets? I'm trying to figure out what to do here to make this work with an OPNsense firewall. I already have an mDNS repeater, but perhaps I have these ports blocked on either subnet.

Update: I ended up using UDP Broadcast Relay and broadcasting ports 6666 and 6667 between my LAN and VLANs with simple UDPBR rules that only added the ports (one rule that simply has port 6666 filled out and one port that simply has port 6667 filled out). Seemed to work! More info on OPN Sense UDPBR here: https://forum.opnsense.org/index.php?topic=15721.0.

drew-hill avatar Mar 29 '23 01:03 drew-hill

I managed to solve it.

I was running HA dockerized in bridge mode. I changed it to host and it worked.

This guy explains how the discovery works.

https://www.youtube.com/watch?v=t933eJ8Iezc

On my host machine I could see the broadcasts using sudo tcpdump -i eth0 -n udp port 6667 but because docker was on a different subnet it wouldn't receive them.

Hope it helps!

AngelouDi avatar Aug 01 '23 21:08 AngelouDi