• Categories
  • Recent
  • Tags
  • Popular
  • Register
  • Login
  • Categories
  • Recent
  • Tags
  • Popular
  • Register
  • Login

Setting up MQTT

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 827 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    wint0178
    last edited by 26 Jul 2023, 17:01

    I have my MCv2 server running on a brand new RPi 4 (8GB with 32 GB microSD) it is running on the newest version of Raspberry Pi OS 64-bit with no problems. I am also using the free DDNS service provided from my internet router (Netgear) along with port forwarding of 8080 to the internal device IP address so that I can get access to the server from anywhere. I am wanting to get several MQTT gateways connected, but I'm not sure I understand how to get the MQTT broker linked with the gateways and MC Server. I am using MySensors and the example sketches they provide for NodeMCU 1.0 (ESP8266) in Arduino IDE. Do I need to setup another port to forward on my router? Any introductory information or advice that you can provide would be appreciated.

    As always, I'll keep digging and fiddling with this. I'll add any updates as I have them.

    1 Reply Last reply Reply Quote 0
    • W Offline
      wint0178
      last edited by 27 Jul 2023, 01:28

      I think I might have had a breakthrough. As I was working with the settings on the NodeMCU, MC Server web portal, and my internet router to setup the MQTT gateway, I turned on tcp port forwarding for 1883 to my RPi. As soon as I had done that, a node popped up under the Gateway and I was able to name the node "NodeMCU-1" it took a few minutes for the Gateway to show up too, but it did after a bit.

      I'm curious if I need to use the added numbers and slashes for the topics to send and subscribe to. I notice that the serial output of my Arduino IDE while the board is still hooked up added some slashes and digits. Are those like an address for the specific data coming from that Gateway?

      J 1 Reply Last reply 27 Jul 2023, 08:30 Reply Quote 0
      • J Offline
        jkandasa @wint0178
        last edited by 27 Jul 2023, 08:30

        @wint0178 Are you using MySensors library?
        Your MQTT broker should be accessible to all of your hardware gateway nodes and MyController server. MyController server is acting as MQTT client, just like another MQTT device in your network.

        W 1 Reply Last reply 29 Jul 2023, 01:16 Reply Quote 0
        • W Offline
          wint0178 @jkandasa
          last edited by 29 Jul 2023, 01:16

          @jkandasa Yes, I am using MySensor V2.3.2 (I belive it is the lates reliece) and I have been able to get the MQTT gateways up and running. On the first one, it also automatically added it as a node, which seemed to be pretty great, but then the node would not mount again after I restarted the Gateway and once the GW was mounted into the dashboard. I'm not sure what was going on with that, but I have since connected the MQTT gateways through my DDNS and believe this will allow them to live anywhere they have internet. I'm not sure exactly what to do about the nodes since I have not been able to successfully add a node from either of my gateways.

          J 1 Reply Last reply 30 Jul 2023, 16:23 Reply Quote 0
          • J Offline
            jkandasa @wint0178
            last edited by 30 Jul 2023, 16:23

            @wint0178 on the other post, I see you were able to see the nodes. Still do you see this issue?

            1 Reply Last reply Reply Quote 0
            4 out of 5
            • First post
              4/5
              Last post

            0

            Online

            628

            Users

            532

            Topics

            3.4k

            Posts
            Copyright © 2015-2025 MyController.org | Contributors | Localization