Announcement

Collapse
No announcement yet.

mcsMQTT, Owntracks and Zerotier

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

    mcsMQTT, Owntracks and Zerotier

    Hi, I've had Owntracks working well with mcsMQTT for a couple of months with two mobile phones. However I don't like open ports and no security on my router. Yesterday I installed Zerotier and added it to the phones and the mcsMQTT pc. I hoped it would be as simple as changing the DDNS address in the mobile phone to the new Zerotier IP address for mcsMQTT, but it doesn't work. Any ideas ?
    I have high hopes for Zerotier simplifying my online remote use of various programs, and the Blue Iris android app really was as simple as changing the WAN address to the new Zerotier address for that pc. Much easier than manually starting OpenVPN !
    Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

    #2
    I have not done anything in the VLAN/VPN world so really cannot be much help with the routing mechanics. My simple visualization is that a TCP route needs to exist that allows traffic to appear at the MQTT Broker to which mcsMQTT has connected. If no MQTT Broker is setup on mcsMQTT then mcsMQTT will use 127.0.0.1 for this purpose. I do not know if this virtual network works in the same manner as the physical IP when it comes to bridging to the WAN.

    Comment


      #3
      As I understand it, Zerotier basically adds a virtual LAN connecting all of the devices you have added to ZT - it doesn't matter if they are on your home LAN or elsewhere in the world. It should mean that my mobile phone - even when away from home - appears to be on my home LAN. It sounds so easy !

      I do have 127.0.0.1 in mcsMQTT so I am using your built in MQTT broker.

      Has anybody used MQTT over Zerotier and got it working with mcsMQTT ? If so can you explain what I need to do ?​
      Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

      Comment


        #4
        OK, how about this, if you had two normal ethernet network adapters on your HS4 pc, could mcsMQTT listen to them both or only one of them ? Which one would it listen to ?

        The only IP address setting I've found in mcsMQTT is the 127.0.0.1 to force the internal MQTT broker to work. I tried adding other IP addresses there after the loopback address with semi-colons separating them, but mcsMQTT just showed me that they had been online for zero time - which makes sense as they were not additional MQTT brokers.

        I really feel this should be simple, and that I've set something wrong.
        Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

        Comment


          #5
          Again, I am not a networking guy, but here is what I know. The first Googled the question about binding for localhost 127.0.0.1 and got the StackOverflow response of:


          If you are binding to localhost (i.e. 127.0.0.1), you can only accept connections from the localhost, not over the network.

          If you need to accept remote connections over the network, you should either bind to one of the local IP addresses (e.g. 192.168.0.10) or all interfaces (i.e. 0.0.0.0).

          This is due to the fact that 127.0.0.1 is always local loopback address, and as such never routed over the network.
          I single-stepped through the MQTTNet library and determined that the Internal Server is binding to 0.0.0.0. I interpret this to mean that localhost sees traffic from all NIC that are routing port 1883.

          Comment


            #6
            Thank you for checking. This is giving me a headache !
            Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

            Comment


              #7
              I just tried using Mosquitto as the MQTT broker, and Owntracks is now working via Zerotier

              No open ports. Happy Engineer !

              Michael: Thank you for everything.
              Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

              Comment


                #8
                Glad a solution is available to you. I run Mosquitto on my production environment.

                Comment

                Working...
                X