(snippet) Adding Firewall Rules for Tuya Local Control
Local IP Address
- Requires version 4.0.29 or later of the Tuya plugin
The local IP Address of compatible devices will show up in the respective column. If a checkmark is present, the device is locally connected. This means that the device is communicating directly to HomeSeer and not going through the Tuya cloud. Local Control allows for a more secure connection and reduces dependency on the Tuya cloud. If no IP address is showing, you may need to adjust your Windows firewall settings; skip to the section below.
Windows Firewall Settings
On Windows systems, you may need to modify your firewall settings to enable local control to work properly. On Linux systems such as the HomeTroller PI you do not need to modify the firewall.
If your Windows Defender Firewall is enabled (or any third party firewall) you will need to open some ports for local control to work properly.
- Open the Windows Defender Firewall control panel
- Click Advanced settings
- Select Inbound Rules in the left pane and then click New Rule... in the right pane. The New Inbound Rule Wizard will pop up.
- Click the Port radio button, then click Next
- Click UDP, then type 6666, 66677 into the Specific local ports: field, then click Next
- Click Allow the connection, then click Next
- Leave the the Domain, Private and Public rule options checked
- Name the rule Tuya Inbound Ports and click Finish
- Now, repeat the process but create an Outbound Rule instead for TCP port 6668
- Name this one Tuya Outbound Port and click Finish
When viewing your Tuya devices from the "Manage Devices" menu in the Tuya plugin you should see the IP address of your device. If the IP address is not displaying, try the following:
- Power cycle the Tuya device
- Select "Manage Devices" from the Tuya plugin menu then click the "Reload Devices" button. This will start the discovery process so the plugin can find the devices IP address.