rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.71k stars 530 forks source link

Device needs to see localTuya instance? #319

Open molnarti opened 3 years ago

molnarti commented 3 years ago

I have a Tuya power monitor plug (unfortunately not ESP based, so cannot reflash). I use it to monitor my server consumption, which is located in my basement. I don't have or otherwise need wifi connection there, so I use the wifi from my ISP router to connect the device, as it's already there and has wifi. I have my own router (running in VM, so no wifi) behind the ISP device, double NAT-ing all traffic. So the plug is on a different network than the rest of my house network, however is still pingable from my network, so localTuya should be able to connect to is, but the device (probably) cannot see the localTuya server as it is blocked by the firewall. The ISP router does not have configurable routing capabilities.

I cannot add this device to Home Assistant, but other power plugs on my internal network are working. Is there a possibility to add this plug to HA somehow, or do I need to setup a wifi access point connected to the main network in my basement for this purpose?

ultratoto14 commented 3 years ago

As the goal of this component is to use a local connection to the device, they need to see each over. Also, the device is sending UDP messages to advertise itself, and this component is using it to discover it and even connect to it after. So yes, they need to see each over.

shtrom commented 2 years ago

You should be able to manually enter the IP address of the plug in by selecting ... in Config Flow. If you can ping it from the localtuya server, you should be ok (assuming this means UDP can also go through).