Git Product home page Git Product logo

sparkplug-demo's Introduction

sparkplug-demo / sparkplug-thresh

Overview

Demo of MQTT Sparkplug client to monitor sensors exceeding a threshold

This pair of MQTT subscriber clients is specifically designed to monitor the topic namespace of the Sparkplug protocol on top of MQTT detailed at

https://www.cirrus-link.com/mqtt-sparkplug-tahu/

The sparkplug-thresh client is stdout based, whereas sparkplug-demo requires the graphics package GTK.

sparkplug-thresh with -v option (debug mode) displays the received Sparkplug messages.

sparkplug-demo also counts Topics, EON nodes, devices and tags as defined in the Sparkplug spec.

It also maintains statistics for the last second on Active Topics, messages / sec, etc.

When the "XDK/temp" metric exported by any device exceeds the threshold (default of 70000), then it displays triggered devices and tags in red, and lists the value in the list.

Installation / Requirements

Requires:

sparkplug-demo also requires:

Tested on both Linux and Windows.

Usage

For sparkplug-thresh:

% python3 sparkplug-thresh.py -h broker.gambitcom.com -v
DEBUG 2023-08-31 10:03:56,466 (sparkplug-thresh) - connecting to broker.gambitcom.com:1883
DEBUG 2023-08-31 10:03:56,489 (sparkplug-thresh) - MQTT client connected with result code 0
DEBUG 2023-08-31 10:03:56,930 (sparkplug-thresh) - DDATA --> Group MIMIC EON 20:19:AB:F4:0E:20 needs rebirth
DEBUG 2023-08-31 10:03:56,930 (sparkplug-thresh) - DDATA --> Group MIMIC EON 20:19:AB:F4:0E:20 Device 20:19:AB:F4:0E:20/sensor111 needs rebirth
INFO 2023-08-31 10:03:56,930 (sparkplug-thresh) - received 1 messages
INFO 2023-08-31 10:03:56,930 (sparkplug-thresh) - ignored 0 messages
INFO 2023-08-31 10:03:56,930 (sparkplug-thresh) - error 0 messages
DEBUG 2023-08-31 10:03:56,930 (sparkplug-thresh) - metricname: "XDK/temp"
datatype: 3
int_value: 10008

and on Windows:

screenshot

See also this Youtube video https://www.youtube.com/watch?v=8bnMOPzntAM with 50k tags or this one https://www.youtube.com/watch?v=5299EYSbW8M with 200k.

sparkplug-demo's People

Contributors

gambitcomminc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

b-sam

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.