MQTT Projects

I am continually creating scripts for testing and demo purposes,and doing small projects to gain a better understanding of MQTT and associated technologies.

In this section I will take you though some example projects and scripts that I have created.

We will look at how they work and you will be able to download them, use and modify them to help with your own projects.

You should note that the Scripts are for educational purposes,but you are free to use them in your own projects without restriction.

Grateful any comments/problems or requests.

Python MQTT Bridge

Many networks will have a local MQTT broker (edge broker) which also connects to a cloud broker.

The broker could be configured as an MQTT bridge and relay messages to the cloud broker.

This is an ongoing project with a simple bridge and an aggregating bridge available.


Simple Controllable MQTT Sensor Simulator in Python -A very simple two state sensor using python , that can be controlled externally using MQTT.


Simple MQTT Sensor Data Logger using SQL – This script Logs sensor data to a a sqllite database .


Simple MQTT Data Logger – This script Logs data to a files as simple text or JSON encoded data .


How to Send a File Using MQTT– Reads a file from disk and sends it using MQTT. It uses a file hash to check that the file is received ok.

 


Encrypting MQTT Payloads with Python – Example Code. -Payload encryption is easier to implement than SSL link encryption. This is an example Python script that implements MQTT payload encryption.

 

3 comments

  1. Hi steve,
    I had a doubt on mqtt qos1 and 2. If we are implementing mqtt client in hardware(esp), are we able to see the acknowlegements in device console ?. It is ppossible to view the ack on client side.
    If posible mention the method to implemen the client.

    1. The python client will show the PUback message the qos 2 exchange is not shown just the end result. I did modify the client to show these messages for demo purposes so you can do it but not with the standard client.

      Does that help?
      Rgds
      Steve

    2. Hi Steve,

      Is it possible to communicate via mqtt which is having different networks, other than local Networks??

Leave a Reply

Your email address will not be published.