Latch and IoT, a perfect symbiosis

Wednesday, April 19, 2017

The Internet of Things stopped being the future to become our present. It’s rare that on any given day we do not interact in one way or another with an IoT device: the radio we use in the mornings, the camera that “takes care” of our baby, the heart rate monitor/watch that we use when we go running or the car that takes us to work. IoT is almost everywhere.


Figure 1: Latch plugin video for Mosquitto


And Ms. Cat tried to show it to us with the Latch plugin for Mosquitto. Although what has really drawn our attention is its little container: different elements that we can find in hundreds of IoT devices interacting with each other. This is the scheme that was hidden in the container:

Figure 2: Latch plugin scheme for mosquitto. Alvaro Caso.

As you can see in the diagram, the idea was to use different components, as well as two different ways of connection: cable and Wi-Fi. We can see that there are several options available for communication in the IoT. All the components used can be found in hundreds of IoT devices: standard modules, affordable and can be easily integrated. Ms. Cat showed us a direct and simple application of the MQTT protocol, but the possibilities that we can find today are almost unlimited. The use of the IoT for remote medical assistance is the application of the protocol that’s drawing the most attention nowadays. This presents us with an ideal opportunity to use the Latch plugin. Just imagine a medical device, for example a sensor that measures our heart rate, and that sends data to a receiver through MQTT. This receiver will send the data to the hospital that is handling our treatment. In this solution, the Latch plugin for MQTT could be integrated from two different perspectives: the patient’s and the hospital’s,
  • From the perspective of the patient, we could control that data is only sent from the device when the patient decides so, and making sure that these data can only be accessed with their consent.

    Figure 3: Use hierarchy for remote assistance.

  • From the perspective of the hospital, we could control which devices are active and from which ones we want to receive data. That way, we could have the following hierarchy for a patient,and decide, thanks to Latch instances, which sensors are authorized to send information.
Another interesting situation in which we could use the Latch plugin for MQTT is in the “monitoring” of physical zones, for example, in a shared Data Center. The idea would be as follows:
  • When we register to enter a Data Center, we are given a smart card in which our identification is shown, as well as a small GPS module that tells us where we are.
  • This device permanently sends the location via MQTT messages.
  • Depending on the zones that we have activated in Latch, it will tell us if we are in a zone allowed in our profile or not.
Thus we could have the following MQTT hierarchy with an agent that is subscribed and authorized to publish to topics: JC4, DC2 y ÁREA2.
Figure 4: Use hierarchy for zone access.

This would allow us to control at all times that only authorized zones are accessed:


As you can see, options are almost unlimited in the integration of Latch in the IoT world. The possibilities offered by Latch through the use of the MQTT plugin go far beyond a second factor authentication, providing a total and flexible control over our IoT devices.

Article by Álvaro Caso
Winner of the 2016 Latch Plugin Contest




More information about the contest winner is available in our community.

More information:
Mosquito MQTT Github
Plugin Documentation

1 comment: