MQTT and Raspberry Pi GPIO

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 reading

Simple Python MQTT Topic Logger

The MQTT data logger logs data to 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 reading

Checking Active MQTT Client Connections

This tutorial is in response to a question I received on the client connections tutorial page: I’ve been struggling to find a real client connection status tool, dashboard or anything which will show a list of my clients and their connection status. Clearly the broker via the low-level protocol mechanics maintain an MQTT keepalive table for each client — that’s how Last Will and Testament (LWT) is triggered internally by the broker. However how does one display such table? The problem is that you have no way of accessing the connections table on the broker so the only way is to

Continue reading

Simple Python MQTT Data Logger

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