Skip to content

filipsPL/mqtt-monitor

Repository files navigation

console mqtt_monitor

About

This is a simple console mqtt topic monitor written in python 3. It allows you to subscribe and listen to a number of mqtt topics and display it in a form of table. Optionally it adds some eye-candies and colors to the presented data.

It was tested (with GitHub Actions CI/CD) and works under:

  • OS: Ubuntu, MacOS, and Windows
  • Python versions: 3.5, 3.8, and 3.9

CI Status: Python application

Features

  • runs in console
  • 100% python
  • multiple topic subscription
  • custom colors and unicode icons for a given keywords:

  • sort by the topic
  • window/tab title in gnome/KDE:

Installation

git clone git@github.com:filipsPL/mqtt-monitor.git

Conda python environment

conda env create -f conda.yml
conda activate mqttmonitor

Set up with pip

pip install -r requirements.txt

Usage

Test server

Connect to the test server and wait for messages:

./mqtt_monitor.py --conf mqtt_monitor.conf.sample

Set up your own config

  • create a conf file from template cp mqtt_monitor.conf.sample mqtt_monitor.conf
  • edit mqtt_monitor.conf
  • run ./mqtt_monitor.py --conf mqtt_monitor.conf
  • enjoy

Screencast

See the monitor in action:

asciicast