Setting up MQTT
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.
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?
@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.
@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.
@wint0178 on the other post, I see you were able to see the nodes. Still do you see this issue?