{"id":25570013,"url":"https://github.com/gambitcomminc/sparkplug-demo","last_synced_at":"2025-10-16T23:01:52.678Z","repository":{"id":179494807,"uuid":"151613882","full_name":"gambitcomminc/sparkplug-demo","owner":"gambitcomminc","description":"Demo of MQTT Sparkplug client to monitor sensors exceeding a threshold ","archived":false,"fork":false,"pushed_at":"2023-09-26T19:41:15.000Z","size":191,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-09-27T06:28:04.035Z","etag":null,"topics":["iot","mqtt","python","sparkplug","sparkplug-b","sparkplugb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gambitcomminc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-04T17:57:24.000Z","updated_at":"2023-01-03T02:45:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f6b8626-73f1-42b3-8032-a4247fa4b2a3","html_url":"https://github.com/gambitcomminc/sparkplug-demo","commit_stats":null,"previous_names":["gambitcomminc/sparkplug-demo"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gambitcomminc%2Fsparkplug-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gambitcomminc%2Fsparkplug-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gambitcomminc%2Fsparkplug-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gambitcomminc%2Fsparkplug-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gambitcomminc","download_url":"https://codeload.github.com/gambitcomminc/sparkplug-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239937694,"owners_count":19721483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","mqtt","python","sparkplug","sparkplug-b","sparkplugb"],"created_at":"2025-02-21T00:53:22.080Z","updated_at":"2025-10-16T23:01:47.652Z","avatar_url":"https://github.com/gambitcomminc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sparkplug-demo / sparkplug-thresh\n\n## Overview\n\nDemo of MQTT Sparkplug client to monitor sensors exceeding a threshold \n\nThis pair of MQTT subscriber clients is specifically designed to monitor the topic\nnamespace of the Sparkplug protocol on top of MQTT detailed at\n\nhttps://www.cirrus-link.com/mqtt-sparkplug-tahu/\n\nThe sparkplug-thresh client is stdout based, whereas sparkplug-demo requires\nthe graphics package GTK.\n\nsparkplug-thresh with -v option (debug mode) displays the received Sparkplug messages.\n\nsparkplug-demo also counts Topics, EON nodes, devices and tags as defined in the Sparkplug\nspec.\n\nIt also maintains statistics for the last second on Active Topics, messages / sec,\netc.\n\nWhen the \"XDK/temp\" metric exported by any device exceeds the threshold (default\nof 70000), then it displays triggered devices and tags in red, and lists the value\nin the list.\n\n## Installation / Requirements\n\nRequires:\n\n- Python 2.7, Python 3\n- Eclipse Paho Python https://www.eclipse.org/paho/clients/python/docs/\n- Sparkplug Python https://github.com/Cirrus-Link/Sparkplug\n\nsparkplug-demo also requires:\n\n- GTK https://python-gtk-3-tutorial.readthedocs.io/en/latest/\n\nTested on both Linux and Windows.\n\n## Usage\n\nFor sparkplug-thresh:\n```\n% python3 sparkplug-thresh.py -h broker.gambitcom.com -v\nDEBUG 2023-08-31 10:03:56,466 (sparkplug-thresh) - connecting to broker.gambitcom.com:1883\nDEBUG 2023-08-31 10:03:56,489 (sparkplug-thresh) - MQTT client connected with result code 0\nDEBUG 2023-08-31 10:03:56,930 (sparkplug-thresh) - DDATA --\u003e Group MIMIC EON 20:19:AB:F4:0E:20 needs rebirth\nDEBUG 2023-08-31 10:03:56,930 (sparkplug-thresh) - DDATA --\u003e Group MIMIC EON 20:19:AB:F4:0E:20 Device 20:19:AB:F4:0E:20/sensor111 needs rebirth\nINFO 2023-08-31 10:03:56,930 (sparkplug-thresh) - received 1 messages\nINFO 2023-08-31 10:03:56,930 (sparkplug-thresh) - ignored 0 messages\nINFO 2023-08-31 10:03:56,930 (sparkplug-thresh) - error 0 messages\nDEBUG 2023-08-31 10:03:56,930 (sparkplug-thresh) - metricname: \"XDK/temp\"\ndatatype: 3\nint_value: 10008\n```\n\nand on Windows:\n\n![screenshot](https://github.com/gambitcomminc/sparkplug-demo/blob/master/mqtt_sparkplug_thresh.png)\n\nSee also this Youtube video https://www.youtube.com/watch?v=8bnMOPzntAM with 50k tags\nor this one https://www.youtube.com/watch?v=5299EYSbW8M with 200k.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgambitcomminc%2Fsparkplug-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgambitcomminc%2Fsparkplug-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgambitcomminc%2Fsparkplug-demo/lists"}