Leave adverts with no receiving radio out of the node tables
CI / test-and-build (3.10) (push) Canceled after 0s
CI / test-and-build (3.11) (push) Canceled after 0s
CI / test-and-build (3.12) (push) Canceled after 0s
CI / test-and-build (3.13) (push) Canceled after 0s

ADVERT points without an rx_radio_id tag formed an extra matrix column
with an empty name, which Grafana labelled "adverts", and they added a
phantom radio to the node's radios count. Both node tables now require
a non-empty rx_radio_id.

Bump to 0.1.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
richandClaude Opus 5.5 committed 2026-10-07 08:04:59 -04:00
1 parent 6bb8f72a19
commit 3e3ce1e8e0
5 files changed
+10 -8

No files matched your search

+4 -4
View File
@@ -1193,7 +1193,7 @@
"type": "influxdb",
"uid": "${datasource}"
},
"query": "SELECT count(\"rssi\") AS \"adverts\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter AND \"rx_radio_id\" =~ /^$radio$/ GROUP BY \"rx_radio_id\", \"src_pubkey\"",
"query": "SELECT count(\"rssi\") AS \"adverts\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"rx_radio_id\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter AND \"rx_radio_id\" =~ /^$radio$/ GROUP BY \"rx_radio_id\", \"src_pubkey\"",
"rawQuery": true,
"refId": "A",
"resultFormat": "table"
@@ -1203,7 +1203,7 @@
"type": "influxdb",
"uid": "${datasource}"
},
"query": "SELECT last(\"rssi\") AS \"last RSSI (dBm)\", \"snr\" AS \"last SNR (dB)\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter AND \"rx_radio_id\" =~ /^$radio$/ GROUP BY \"rx_radio_id\", \"src_pubkey\"",
"query": "SELECT last(\"rssi\") AS \"last RSSI (dBm)\", \"snr\" AS \"last SNR (dB)\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"rx_radio_id\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter AND \"rx_radio_id\" =~ /^$radio$/ GROUP BY \"rx_radio_id\", \"src_pubkey\"",
"rawQuery": true,
"refId": "B",
"resultFormat": "table"
@@ -1362,7 +1362,7 @@
"type": "influxdb",
"uid": "${datasource}"
},
"query": "SELECT count(\"rssi\") AS \"adverts\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter GROUP BY \"rx_radio_id\", \"src_pubkey\"",
"query": "SELECT count(\"rssi\") AS \"adverts\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"rx_radio_id\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter GROUP BY \"rx_radio_id\", \"src_pubkey\"",
"rawQuery": true,
"refId": "A",
"resultFormat": "table"
@@ -1372,7 +1372,7 @@
"type": "influxdb",
"uid": "${datasource}"
},
"query": "SELECT count(\"adverts\") AS \"radios\" FROM (SELECT count(\"rssi\") AS \"adverts\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter GROUP BY \"rx_radio_id\", \"src_pubkey\") GROUP BY \"src_pubkey\"",
"query": "SELECT count(\"adverts\") AS \"radios\" FROM (SELECT count(\"rssi\") AS \"adverts\" FROM \"openhop_packet\" WHERE \"repeater\" =~ /^$repeater$/ AND \"type_name\" = 'ADVERT' AND \"src_pubkey\" != '' AND \"rx_radio_id\" != '' AND \"is_duplicate\" = 'false' AND \"hop_count\" <= $max_hops AND $timeFilter GROUP BY \"rx_radio_id\", \"src_pubkey\") GROUP BY \"src_pubkey\"",
"rawQuery": true,
"refId": "B",
"resultFormat": "table"
+1 -1
View File
@@ -2,7 +2,7 @@
"schema": 1,
"id": "community.influxdb",
"name": "InfluxDB Exporter",
"version": "0.1.4",
"version": "0.1.5",
"description": "Pushes Repeater metrics, per-packet events, logs and node/GPS snapshots to a remote InfluxDB (v1, v2 or v3) for Grafana dashboards.",
"runtime": {
"type": "python",
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "openhop-influxdb-plugin"
version = "0.1.4"
version = "0.1.5"
description = "openHop Repeater plugin that pushes metrics, packets, logs and snapshots to InfluxDB"
readme = "README.md"
requires-python = ">=3.10"
+3 -1
View File
@@ -234,8 +234,10 @@ panel("timeseries", "Drops by radio", [target(
# echo of our own transmission) are is_duplicate and say nothing about which
# radio first heard the node. Adverts are flooded, so $max_hops can also narrow
# them to ones heard straight from the node (0 hops) rather than through a relay.
# Adverts without an rx_radio_id would form an unnamed radio column, so drop them.
ADV_ALL = (f'{R} AND "type_name" = \'ADVERT\' AND "src_pubkey" != \'\' '
'AND "is_duplicate" = \'false\' AND "hop_count" <= $max_hops AND $timeFilter')
'AND "rx_radio_id" != \'\' AND "is_duplicate" = \'false\' '
'AND "hop_count" <= $max_hops AND $timeFilter')
ADV = f'{ADV_ALL} AND "rx_radio_id" =~ /^$radio$/'
NAMES = target(f'SELECT last("node_name") AS "name" FROM "openhop_advert" WHERE {R} '
'GROUP BY "pubkey", "contact_type"', "C", fmt="table")
+1 -1
View File
@@ -1 +1 @@
__version__ = "0.1.4"
__version__ = "0.1.5"