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}")