3

I'm new to MQTT so I'll try to explain my situation first and then ask some questions about MQTT.

Basically what I'm trying to do is set up some sensors in two houses, A and B, and be able to manage those sensors from my home, C, people from both A and B won't care if the sensors are working or not, they won't be doing any managing or checking so basically I need to be able to control and see the sensors' statuses from home. All the sensors have MQTT support and can send data using MQTT.

Alright so that's what I'm trying to do, I've been reading a bit about MQTT and watching some videos but I've noticed that in most examples everything is connected to the same router so I was wondering that maybe I can't do this with MQTT.
So my questions are:

  • Is it possible to use MQTT over the internet?
  • If so, how would you do it?
  • Will each house need an individual broker?
  • Could I have this work with only one broker home and have the sensors connect over the internet to the broker?

Also I'd appreciate if you could share some links on literature about learning how to use MQTT (preferably using a Raspberry Pi since that's what I wish to use) and do home automation since this is a topic I'm really interested in.

Thanks to everyone who responds!

4
  1. MQTT over the internet is perfectly possible (It's how AWS IoT, IBM IoT, Microsoft IoT offerings all work). You should probably use MQTT with TLS to ensure it's secure.
  2. You run a broker in the cloud and have devices (or other brokers bridge to it). Because a MQTT client connects out to a broker this works really well for devices that are behind routers using NAT.
  3. You don't need a broker at each house/location but it is a valid way to deploy things and use broker bridging to connect each broker to a broker in the cloud. This arrangement can allow things to continue to work when the connection to the outside world fails.
  4. Yes a single (load balanced cluster of) brokers in the cloud is a perfectly reasonable solution (see answer 1)

Sharing a collection of links is probably off topic, but http://mqtt.org is a good starting point.

  • To add to this answer: if you are looking for simplicity, google "public MQTT broker" and use one of those. – Gambit Support Feb 12 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.