From 7e15f2adbb23eec1dbbd2c0d049a33e9b809105b Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Mon, 17 Aug 2026 18:06:16 +0200 Subject: [PATCH] Add links for QRZ.com and RadioID.net --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ef78978..fe24394 100644 --- a/main.py +++ b/main.py @@ -120,7 +120,15 @@ def on_mqtt(data): max_old_time = epoch_time - 20 # Build the message that will be sent to Telegram - telegram_message = "Callsign: " + jsondata["SourceCall"] + " ID: " + str(jsondata["SourceID"]) + " \nName: " +jsondata["SourceName"] + " \nTalkeralias: " + jsondata["TalkerAlias"] + " \n-----------------------------------\nAccess via: " + jsondata["LinkName"] + " \nVia repeater: " + jsondata["LinkCall"] + "\nSlot: " + str(jsondata["Slot"]) + " TG: " + str(jsondata["DestinationID"]) + "\nMaster: " + str(jsondata["Master"]) + "\nRSSI: " + str(jsondata["RSSI"]) + " dBm BER: " + str(round(jsondata["BER"],2)) + "%" + source_call = jsondata["SourceCall"].strip() + # Without a callsign there is nothing to look up, so skip the links. + links_line = ( + "\nLinks: QRZ.com" + + " RadioID.net " + if source_call + else "" + ) + telegram_message = "Callsign: " + jsondata["SourceCall"] + " ID: " + str(jsondata["SourceID"]) + " \nName: " +jsondata["SourceName"] + " \nTalkeralias: " + jsondata["TalkerAlias"] + " " + links_line + "\n-----------------------------------\nAccess via: " + jsondata["LinkName"] + " \nVia repeater: " + jsondata["LinkCall"] + "\nSlot: " + str(jsondata["Slot"]) + " TG: " + str(jsondata["DestinationID"]) + "\nMaster: " + str(jsondata["Master"]) + "\nRSSI: " + str(jsondata["RSSI"]) + " dBm BER: " + str(round(jsondata["BER"],2)) + "%" context_id = _as_int(jsondata["ContextID"]) event_slot = _as_int(jsondata["Slot"])