Node-red-contrib-tuya-smart-device across VLANs

Hi All

I have put all of my tuya devices on a separate VLAN. I can ping the devices from the nodered VLAN, but I get an error connecting to the devices on the other VLAN using Node-red-contrib-tuya-smart-device.

Keep getting a findDevice(): Cannot find the deivce error in the console.

Is there a trick with this? I am using an OMADA setup.

Hi @Sirhc

Can you connect to a device, if it's on the same vLAN?
I don't use tuya, but have an IoT vLAN setup (I dont allow my IoT devices to phone home), and have no issue.

Are you blocking internet access on the tuya vLAN?

Yes on the same VLAN I can, yes they can connect to the internet.

I think it has something to do with Tuya find() and not being able to allow the broadcast across VLANs, but I’m struggling to find out how to allow it!

OK, that helps.

I dont use OMADA, but Unifi.
In OMADA - can you allow MDNS broadcasts between the 2 subnets?

I didn’t think Tuya uses mDNS? I can, but not sure how to allocate/setup the “Bonjour Service”

In Unifi, you select which networks, can see each others broadcasts.

Without knowing OMADA - maybe try and find an area that manages this?
also not using Tuya, but they may send out beacons, which is used to exchange metadata, and achieves the communication - this is all just guess work.

Tuya devices themself may be stopping traffic from subnets its not apart of - for security reasons?

Yeah I have done that a hundred times, tried gateway and AP type, selected all under bonjour service. No luck :frowning:

Try allowing UDP traffic on 6666 & 6667 between the 2 subnets?
This seems to be the ports used for broadcast

OMADA, may allow forwarding to different vLANs on these ports

Its all I have I am afraid :man_shrugging:

This really isn't a node-red question but rather a networking question.

For 2 vlan's to talk, you need a ROUTE between them. But if you route between vlan's there is a decent chance you are breaking the reason for having vlan's in the first place - isolating network traffic.

So it would often be poor practice to do this.

If you really do need to, you should have a firewall set up between the 2 so that you can limit traffic as indicated by Marcus. A lot of routers that support VLAN configurations will let you - or even make you - have firewall configurations between them. As on my Ubiquiti EdgeRouter Lite.

VLAN's are separate networks by design and should be treated as such with appropriate security between them.

2 Likes