Coder Social home page Coder Social logo

hxdaze / mqtt-observer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fauresystems/mqtt-observer

0.0 1.0 0.0 17.33 MB

MQTT client GUI to observe messages exchanged on MQTT server.

License: MIT License

Batchfile 1.44% Python 98.28% Prolog 0.28%

mqtt-observer's Introduction

MQTT Observer

Observer app to watch messages exchanged on MQTT server.

Features

  • To start, run python3 ./src/main.py
  • Set MQTT server host, port and root topic to subscribe.
  • Create new observations:
    • to filter out some topics
    • to filter out some messages starting with specific strings
    • to display fool topic or extracted correspondent
  • Modify topic syntax regex to extract which correspondent send or receive messages.
  • Clean wills: identify forgotten topics with remaining wills, and select wills to reset.
  • Save server and observation settings as sessions, to retrieve further.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Development is done on Windows 10 x64 computer under Visual Studio Community with Python 3.6.1 (32-bit) and PyQt5. It should run on Linux and Mac as well.

Installing

Python 3, SIP, PyQt5 and paho-mqtt packages are required:

PyQt5 and paho-mqtt installation on Windows
===========================================

$ pip3 install SIP
$ pip3 install PyQt5
$ pip3 install paho-mqtt

May upgrade if already installed:

$ pip3 install SIP --upgrade
$ pip3 install PyQt5 --upgrade 
$ pip3 install paho-mqtt --upgrade
PyQt5 and paho-mqtt installation on Linux (Raspberry Pi)
========================================================

$ sudo apt-get update
$ sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools

$ pip3 install paho-mqtt

May install Eric IDE:

$ sudo apt-get install eric

Deployment

Building

You can use lupdate.bat to update Observer.fr_FR.ts french localization file, you may create other localization files (please share them around here).

Edit and publish Observer.fr_FR.qm from QtLinguist.

We choose pyinstaller as an easy and working deployment solution:

Install pyinstaller and build
=============================

$ pip3 install pyinstaller

$ pyrcc5 src/observer.qrc -o src/observer_rc.py
$ pyinstaller -F -n mqtt-observer -i src/observer.ico -w src/main.py

You can run build.bat to automatize creation of mqtt-observer.exe file.

Known issue:

mqtt-observer.exe sometimes hangs at start, kill it and restart (running python3 ./src/main.py always work).

Running

Run python main.py or mqtt-observer.exe (see usage below for command line options).

Usage

Command line options are possible for main.py and mqtt-observer.exe

usage: mqtt-observer.exe [-h] [-f] [-d] [-l LOGGER]
       python3 ./src/main.py [-h] [-f] [-d] [-l LOGGER]

optional arguments:
  -h, --help            show this help message and exit
  -f, --french          run in French
  -d, --debug           set DEBUG log level
  -l LOGGER, --logger LOGGER
                        use logging config file

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

This software was created for Escape Room 2.0 project at Live Escape Grenoble, France.

Screenshots on Windows and on Raspberry Pi

Running on Windows

Running on Raspberry

mqtt-observer's People

Contributors

fauresystems avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.