A little help with mqtt project?

Dynam0

Just Hatched
Hi guys new here! I recently making my steps to IoT and figuring out using MQTT for a project i want to make. I will have 2 clients (esp8266), a mqtt broker (probably rasberry) and finally an other client subscribed to all fetching the data to a database.

I want to know if this whole project is possible without any port forwarding. I am thinking the client (the one that send data to db) to have a wifi internet connection ( like a pc) and send these data to a database.
 
Hi, welcome!

If your broker is in the cloud, you should not need to do anything other than having 443 open (for TLS authentication). If not, you may need to forward port 1883.
 
You basically have couple of options:

Use a broker in the cloud so client from home always connect out to it.
Use a cloud broker and set up a bridge between the internal broker and cloud broker. This has the advantage that internal things keep working if the internet connection goes down.


Typically forwarding a port to a properly configured cloud broker and firewall/router is not really a risk.
 
Hi thanks for the quick replys!! I want to have mine broker and not something cloud based mqtt broker. I like to build everything myself so the only possible service i will use may be firebase. So the only option to control (sending and recieving information from clients on a mqtt based system) is port forwarding?
 
Yes, it seems if the mqtt system is behind a firewall, the port would have to be opened to allow connection.
 

Log in

or Log in using
Back
Top