The Raspberry Pi has 40 General purpose Input/output Pins (GPIO) that can be used for controlling external hardware. There are a number of add-on boards called hats which plug into these pins and provide various sensors. The most common one being the sense hat.
Continue readingMQTT Data Logger -Node-Red
This is a IOT data and topic logger similar to the python data and topic loggers that can be used for logging MQTT sensor and device data to log files either as a single file containing multiple topics or multiple files based on topic. It is controlled using a node-red dashboard making it much easier to use than the python loggers.
Continue readingHow to Log MQTT Sensor Data by Topic Using Python
The MQTT sensor data logger logs data on all monitored topics to the same log files. If the data need to be split into topics then it will need to be done by the log analyser software.
Continue readingBeginners 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 readingHow 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 readingMQTT Publish and Subscribe Beginners Guide
In MQTT the process of sending messages is called publishing, and to receive messages an MQTT client must subscribe to an MQTT topic.
Continue readingPublic 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 readingRepublish 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 readingLogging MQTT Sensor Data
Most MQTT brokers don’t provide any built in 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 readingStoring MQTT Messages (Sensor Data) in a SQLite DataBase With Python
In this project we will create a simple data logger to store MQTT messages in a sqlite database. MQTT message 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 messages(on_message callback) and a worker thread to store the data. A queue is used to move the messages between threads.
Continue reading