Skip to Content

Collaborating IoT Endpoints with MQTT Broker

Sogeti Labs
November 16, 2017

Optimizing Resource Utilization like energy, cost, labor, etc is one of the prime focus of Organizations. Some use cases on optimizing resources are like controlling room temperature; turn off lights in room when no one is present, etc. The article is about quick, simple  & low cost IoT solution of having IoT endpoint devices collaborate using open source MQTT Broker.

Details:

Typically, IoT solution comprises of Sensors, Connectivity, Aggregation, Analytics, Action & Visualization /Presentation of the Data. Many IoT platforms are present for building connected solutions. Devices have IoT Platform agent/SDK on the Gateway or Endpoints, that aggregates or pushes the data to the Central Server or the Cloud. REST or MQTT or CoAP protocol is also an option to connect to IoT Platform. But, Commercial IoT Platform is at times costly to implement some of these simple use cases. Also, the Device Management requirement is bare minimal for these use cases so as to consider commercial IoT Platforms.

There is an option for IoT Endpoints/Devices to collaborate in a local network using MQTT Broker like Open Source mosquitto. And popular hardware board firmware has MQTT client library supported, like Arduino IDE/SDK has a PubSubClient library to subscribe or publish to a topic.

MQTT Broker:

Mosquitto is a open source MQTT Broker, easy to install in any in-house or cloud server. Mosquitto is simple to use, secured and is configurable as open and user authenticated.

Multiple Endpoints and computers can be connected to the same broker. Devices subscribes or publishes to the common topics of interest and collaborate.

Many MQTT apps are available on Android /IOS mobile platform. It is easy to quickly build custom application on the mobile devices using MQTT libraries for monitoring and controlling connected Devices.

MQTT Broker is light & easy to deploy on Mobile devices making it is easy to install anywhere in premises.

Wireless Sensor Network:

Sensors boards or IoT Endpoints is built using Microcontroller board from TI, Nordic, Intel or Open Source boards like Arduino, ESP8266, raspberry Pi, etc. Multiple sensors are attached to these boards for different use case. Sensor boards in the corporate network can be powered easily by mains and can leverage existing Wi-Fi network to transmit data. The Overhead of building a autonomous Sensor Network is not necessary. Wi-Fi takes higher power compared to BLE/ZigBee, etc, but creating a separate Autonomous Sensor Network is a costly option.

Scale & Big Data:

To scale it further for large volume of Data, use a Kafka source connector which streams data or reads log data  from MQTT broker into a Kafka cluster.

For Big Data , a High Availability MQTT Broker can be setup using Dockerization, HAProxy, etc.

Cloudera platform is a popular Bigdata Open source Apache Hadoop distribution platform that targets enterprise-class deployments.

Conclusion:

MQTT Broker like Mosquitto over Wi-Fi network is one of the quick and cost-effective option to setup a collaborative IoT Endpoints/Device networks . It can be scaled & can connect to Bigdata platform for Data Analytics & Visualization.

About the author

SogetiLabs gathers distinguished technology leaders from around the Sogeti world. It is an initiative explaining not how IT works, but what IT means for business.

    Comments

    One thought on “Collaborating IoT Endpoints with MQTT Broker

    1. Hello Sir,
      I am trying MQTT protocol for my IOT project but I have an issue for Mqtt topics.Need help for resolving the below question.
      How can the sensor device know the topics for which it has to pub/sub , if user includes a topic in Andriod application how come the same topic can be pub/sub by the sensor device.
      I dont want to hardcode topics on senosor side , eg if 2 rooms having same sensor device having same topics if this is situtaion how come application address the specific topic?
      please help asap.

    Leave a Reply

    Your email address will not be published. Required fields are marked *