MQTT: How to I connect my hardware with other world

How to I connect my hardware with other world
This diagram created with, thank you.

Part 1: Why do we use MQTT?

1. Why to use MQTT

In the past when we need to connect one hardware and to manage it remotely, we were necessary to make our own protocols, the device must have its own IP address and etc. This were a big challenge and required knowledge of protocols, network architecture and generally it required a huge volume of work and as well as a lot of time for it realisation.
Through we use of MQTT server a most part of problems wrote above will be dropped and in generally we stay to do the device management logic.
With MQTT technology it is easy. We use the topics to communicate with the device. For example to do switch a relay on, the topic look like at this: device/relay/1/set [on]. It is easy, isn’t It?

Now in a little more details

To operate the device in this way it has to connected to MQTT server (MQTT servers are in Internet (Cloud based) or locals). When the device have already connected to server, we can receive data form it and we can send it commands which it will execute.

2. How can we connect with MQTT?

Here are some ways we can connect to a device connected to MQTT:

  • Mobile device (with installing an application to work with MQTT).
  • Computer we have possibility from many application: command prompt, application for Chrome browser and other.
  • From another device: a device send to another device.
Article MQTT 1 MQTT connection

Devices connected to MQTT server

3. Which devices can be connect to MQTT?
  • Ethernet device (the device <-> Router <-> Internet <-> MQTT)
  • GSM device (the device <-> GSM Operator Internet <-> MQTT)
  • WiFi device (the device <-> WiFi router <-> Internet <-> MQTT)
  • RS485 device (the device <-> a device with Ethernet <-> router <-> Internet <-> MQTT)
  • LoRa Wan (the device <-> LoRa point <-> Internet <-> MQTT)
  • Bluetooth (the device <-> ESP32 <-> WiFi router <-> Internet <-> MQTT)
More in this series of articles:
  • Why do we use MQTT?
  • How does MQTT work?
  • MQTT servers - in the cloud and local.
  • Topic’s structure convention
  • Our examples of work with MQTT
  • How do I open the front door? MQTT, of course.
  • Home automation? it is easy with MQTT.
See also:

Click Here to Leave a Comment Below 0 comments