Beginners Guide to Data and Character Encoding

When I first starting working with computers everything was in ASCII ( American Standard Code for Information Interchange ) However today working with networking protocols and network programming you will come across a variety of data and character encoding schemes. In this tutorial we will look at basic encoding schemes used on computers and in the second part of the tutorial we look at how data is sent over a network.

Continue reading

How MQTT Works -Beginners Guide

How Does MQTT Work ?-MQTT is a messaging protocol i.e it was designed for transferring messages, and uses a publish and subscribe model. This model makes it possible to send messages to 0,1 or multiple clients.

Continue reading

Public MQTT Brokers and Reserved Topics – Discussion Post

Preface This is a discussion post and these are currently my thoughts on this topic. I would be grateful for comments and feedback. Introduction MQTT is still in the early stages of deployment and currently is used only on private networks. However with the growth in the adoption of the MQTT protocol for information distribution the number of public brokers and topics will probably increase substantially just as happened with websites in the early days of the internet.

Continue reading

Republish HTML Data Over MQTT

HTTP is the protocol that powers the Web,and is the most common protocol on the Internet. Because http is a request/response protocol a visitor viewing a web page must issue a new request in order to refresh the data.

Continue reading

Using the Node.js MQTT Client-Starting Guide

The node.js MQTT client is an open source client that can be used for publishing messages and subscribing to topics on an MQTT broker. It  can be installed using: npm install mqtt –save and npm install mqtt -g To install the command line tools Documentation for the client is available here

Continue reading

Logging MQTT Sensor Data

Most MQTT brokers don’t provide any mechanism for logging historical data for later analysis. However due to the publish/subscribe nature of MQTT is is easy to monitor, and log a data stream or streams using an MQTT client.

Continue reading

Logging MQTT Sensor Data to SQLite DataBase With Python

In this project we will create a simple data logger that logs text data to a sqlite database. Data can be JSON or simple text and is stored as is.   The project Consists of two modules. A sql logger class module sql_logger.py The logging script. The script uses a main thread to get the data (on_message callback) and a worker thread to log the data. A queue is used to move the messages between threads.

Continue reading

Using The Python MQTT-SN Client

The MQTT-SN client used here is the client from the RSMB source files but upgraded to python 3, and modified to work in a similar fashion to the Paho MQTT client. I created it so that I could learn more about MQTT-SN and you should note it is still a work in progress. I would not recommend it in a production environment and would be grateful if you would let me know of any problems with it. Downloads are at the end. The client consists of 4 files. You can copy these source files into the site packages folder under

Continue reading