In this tutorial will will look at how we can send a file or picture using MQTT. The script is written in Python and the approach I used was to send the file as bytes.
Continue readingCategory: Python MQTT-Projects
How to Encrypt MQTT Payloads with Python – Example Code
Encrypting the MQTT payload rather than the link has the advantage that the data is encrypted end to end and not just between the broker and the client.
Continue readingLogging MQTT Sensor Data Using Python
In this project we will create a simple data logger that logs IOT sensor/device data in JSON format to a text log file. The project Consists of two main modules. A logger class module mlogger.py The logging script mqtt-data-logger.py It also has helper module commands.py which gets and parses command line arguments. Note: There is also the Simple Python MQTT Topic Logger which logs data based on topic that may be more suitable for your project. Logger Class The class is implemented in a module called m_logger.py (message logger). It can be used for logging data from any source not
Continue readingSimple Python MQTT Sensor Simulator
If you are trying to learn MQTT or are working on a MQTT prject then having access to real time data is very important. The aim of this project is to create a very simple two state binary sensor, that can be controlled externally using MQTT. The sensor could be used to simulate real world objects like lights, doors etc that have two states on or off, open or closed etc in IOT projects.
Continue reading