Announcement

Collapse
No announcement yet.

Is it possible to move Tuya local control devices to a separate VLAN?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    spud Am using 4.0.34 and wondering if I should be able to see the "Local Connection" feature as, being a new user, I am struggling to understand if I have "Local Control" of the TUYA devices?

    Comment


      #17
      I have read this very interesting thread on the TuYa devices being in a separate VLAN. Thanks a lot for all these explications.

      In fact I have a number of TuYa and ESP8266 devices in a separae IoT-VLAN. This all works fine. Except I did no tweaking of my firewall (USG and all other Unifi stuff).

      My HS4 Pi4 is running in the main LAN. There are only holes in the firewall from main LAN to IoT-VLAN for MQTT and PiHole.

      I can control the TuYa devices from the TuYa app on my smartphone. The status in the HS4 website is reported accordingly within the polling time as given in the settings page of the TuYa PI.
      On the other side if I control the devices locally with the HS4 devices then the status is reported promtly on my phone app.

      All TuYa devices are included in the cloud as described in post #10.

      So I wonder where all the this is about? What am I overlooking?

      -- Cor --

      What I want to add is that I do not see any IP addresses in the device management page of the TuYUa devices,
      The devices I use are from Tecklin Model SP-22 and from ZooZee Model SE131.
      They probably do not support local control.

      Comment


        #18
        Cor is your IoT-VLAN allowed Internet access? I don't want my IoT devices leaking information back to some cloud portal I have no control over. My IoT-VLAN is blocked from communicating with the Internet but I'm still able to control those devices by HS4 local control and the Tuya plugin.

        Comment


          #19
          No, my IoT-VLAN has no access to the internet.

          But I am experiencing now some problems with a new socket device that I want to add. I cannot get it connected in the TuYa app on my phone and yes this is connected to the IoT-VLAN via WiFi.

          Would that be possible with no extra holes in the firewal for ports 8886 and 8887 ? (oh no, this is nonsense of course)

          Comment


            #20
            I have to recall what I said yesterday about the functioning of the TuYa devices. Possible through the update to the latest version of the PI?

            At this moment I can connect all my Teckin devices to the cloud from the IOT-VNET. And as a consequence I can find them in HS4.

            But the ZooZee devices do only connect to the cloud from the main LAN. Even with the IoT-VLAN open to and from the internet.

            Is it possible that ZooZee devices are not comparable to Teckin?
            Where can I find a list with devices that are compatible with the new PI version? It is not in the release notes of the PI.

            Comment


              #21
              The plugin is compatible with most Tuya devices. If you can add your devices using the Tuya app and control them from there, and if they are relatively standard devices like plugs, switches, bulbs, etc... they should work fine with the plugin. By default the plugin always use the cloud API to control the devices, so they should have access to internet for the plugin to work with them.

              The plugin also supports local control using an unofficial local API for a few specific devices. The list of supported devices for this local API is in your HomeSeer folder Data/Tuya/LocalApiProducts.json

              Comment


                #22
                Thanks for the hint where to find the Products, I can see that my devices are not (yet?) in here.

                All switches work fine now but it is stange that the ZooZee devices only can be connected to the cloud from the main LAN, not form the IoT-VLAN.

                Now the IoT-VLAN is closed for traffic to the main LAN but open to the internet. The only hole in the firewall is for MQTT messages going to the MQTT Broker that is in the main LAN.

                Comment


                  #23
                  spud Would in be wise to put another hole in de firewall for port 6668 from the IoT-LAN to the HS4 server on the main LAN fot established states?
                  I am running now without and have no problems with the status messages.

                  Comment


                    #24
                    My HS4 RasPi is multi-homed so I have it wired onto the private LAN and wireless on the IoT LAN. Shouldn't that allow it to see the UDP broadcasts and detect the IP address of the Tuya device for local control? I can ping it from the RasPi.

                    Just trying to figure out if this is related to my issues trying to get local control working. In the Tuya JSON (on the Tuya tab for the device) it's showing my WAN IP instead of the local IP (same thing in the Tuya app on my iPhone) which seems odd. I tried removing it and re-adding it, same thing. I guess I could try adding it to the private LAN and see if that changes anything.

                    Comment


                      #25
                      I "suspect" (don't know, since I can't see the plugin code) that the plugin is using the same subnet as HS4, instead of your 2nd interface. In other words, it's not looking on the IoT LAN.
                      "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                      Comment


                        #26
                        I tried switching from using the WiFi adapter in the Hometroller to a virtual NIC on the IoT VLAN to see if that would help, but it didn't. I can ping the device, but no IP address shows up under local control.

                        I'm not convinced it's my VLAN setup though. Starting to think it's the controller/device itself. Even when I connected it to the primary LAN wireless, the IP address in the Tuya app (and in the plug-in debug log in HS4) is still showing as my WAN IP and not the local IP. Very odd.

                        Comment


                          #27
                          Originally posted by windracer View Post
                          I tried switching from using the WiFi adapter in the Hometroller to a virtual NIC on the IoT VLAN to see if that would help, but it didn't. I can ping the device, but no IP address shows up under local control.

                          I'm not convinced it's my VLAN setup though. Starting to think it's the controller/device itself. Even when I connected it to the primary LAN wireless, the IP address in the Tuya app (and in the plug-in debug log in HS4) is still showing as my WAN IP and not the local IP. Very odd.
                          Not all Tuya devices are compatible with local control, if there is no local control then you'll never see the local IP in any of the apps or plugin. Have you followed the HS docs on enabling local control for a device that's not natively supported by the plugin? If there is no device definition in the LocalApiProducts.json file then you won't have local control.

                          What is the Tuya device you are trying to get local control over?

                          Comment


                            #28
                            Originally posted by TC1 View Post
                            Have you followed the HS docs on enabling local control for a device that's not natively supported by the plugin? If there is no device definition in the LocalApiProducts.json file then you won't have local control.

                            What is the Tuya device you are trying to get local control over?
                            It's a WiFi ceiling fan controller and that's what I'm trying to do ... follow the instructions to manually add local control. I'm building the block to add to LocalApiProducts.json but since I'm not getting any DP query info in the debug log with the local IP and dps info, I can't create the function mapping required.

                            Comment


                              #29
                              Can you ping the fan controller from your HS instance?
                              Are you sure there's no IPTables/firewall settings that might block a response from the fan controller to the HS instance?

                              Comment


                                #30
                                Yeah, I can ping it from the RasPi running HS4 both when I had it on the primary LAN and the IoT VLAN. Is there a way for me to manually edit what shows up on the Tuya tab of the device so I can change that IP from my WAN IP to the actual local IP of the device?

                                Click image for larger version  Name:	image.png Views:	0 Size:	24.3 KB ID:	1591087

                                Or would that keep being overwritten by the plug-in since that seems to be what the device is reporting to Tuya as its IP?‚Äč

                                Comment

                                Working...
                                X