HTTP vs MQTT for IOT Devices

Most IOT devices can use both the  HTTP and MQTT protocols to communicate with IOT  control systems. The HTTP protocol is generally used for initial  device set up. However when it comes to sending device data and for subsequent device control HTTP is not usually the best protocol.

Continue reading

Design A Network of 100s of MQTT Parking lot Sensors

Task -Design an MQTT topic and security structure with Mosquitto as the MQTT broker for a network of 100s of Parking lot sensors. Overview In this design example we take the case of a network of parking sensors. Sensors will be sending an occupied/unoccupied state message as well as supplementary information like battery level,signal level IP address etc.

Continue reading

Receiving Messages with The Paho node.js MQTT client

Messages are received by processing the message event.The format is: function (topic, message, packet) {} Example code is shown below: //handle incoming messages client.on(‘message’,function(topic, message, packet){ console.log(“message is “+ message); console.log(“topic is “+ topic); console.log(“packet =” +JSON.stringify(packet)); console.log(“packet retain =” +packet.retain); });

Continue reading

Tips for Testing The Mosquitto Broker on Linux

I get to setup mosquitto in lots of different configurations for my tutorials and for helping people with their setup problems as well as clients. As I get lots of questions regarding setup problems I thought it would be useful to take you through my setup configuration and procedures.

Continue reading

Guide to Reliable MQTT Message Delivery

MQTT was originally designed to work with telemetry data over unreliable connections. Generally with telemetry data some data loss is acceptable although undesirable. In this article I want to discuss message delivery in detail and look at various configurations to improve message reliability.

Continue reading