From a5322867e326ecde43d53df039bd0c47d147c57e Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 11 Nov 2025 16:58:19 -0800 Subject: [PATCH] Update pong_bot.py --- pong_bot.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pong_bot.py b/pong_bot.py index efbe942..18fcde0 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -287,6 +287,22 @@ def onReceive(packet, interface): channel_name, _ = res except Exception: channel_name = "unknown" + else: + # Search all interfaces for this channel + cache = build_channel_cache() + found_on_other = None + for device in cache: + for chan_name, info in device.get("channels", {}).items(): + if str(info.get('number')) == str(channel_number) or str(info.get('hash')) == str(channel_number): + found_on_other = device.get("interface_id") + found_chan_name = chan_name + break + if found_on_other: + break + if found_on_other and found_on_other != rxNode: + logger.debug( + f"System: Received Packet on Channel:{channel_number} ({found_chan_name}) on Interface:{rxNode}, but this channel is configured on Interface:{found_on_other}" + ) except Exception as e: logger.debug(f"System: channel resolution error: {e}")