From d5d163aab9b07e03ab3aaa34f48a6612d4b3676a Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 12 Nov 2025 19:48:12 -0800 Subject: [PATCH 1/4] logs on --- mesh_bot.py | 8 ++++---- pong_bot.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index 7af81d4..29a2739 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -1939,10 +1939,10 @@ def onReceive(packet, interface): logger.debug(f"System: channel resolution error: {e}") #debug channel info - # if "unknown" in str(channel_name): - # logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") - # else: - # logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") + if "unknown" in str(channel_name): + logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") + else: + logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") # check if the packet has a simulator flag simulator_flag = packet.get('decoded', {}).get('simulator', False) diff --git a/pong_bot.py b/pong_bot.py index 99f6518..e6775a5 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -309,10 +309,10 @@ def onReceive(packet, interface): logger.debug(f"System: channel resolution error: {e}") #debug channel info - # if "unknown" in str(channel_name): - # logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") - # else: - # logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") + if "unknown" in str(channel_name): + logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") + else: + logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") # check if the packet has a simulator flag simulator_flag = packet.get('decoded', {}).get('simulator', False) From 397c39b13d5100da3cb8850f29814f3cbe970098 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 12 Nov 2025 21:33:36 -0800 Subject: [PATCH 2/4] relay node --- mesh_bot.py | 8 +++++++- pong_bot.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index 29a2739..af7c661 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -2050,7 +2050,13 @@ def onReceive(packet, interface): # Add relay node info if present if packet.get('relayNode') is not None: - hop += f" (Relay:{packet['relayNode']})" + relay_val = packet['relayNode'] + last_byte = relay_val & 0xFF + if last_byte == 0x00: + hex_val = 'OldFW' + else: + hex_val = f"{last_byte:02X}" + hop += f" Relay:{hex_val}" if enableHopLogs: logger.debug(f"System: Packet HopDebugger: hop_away:{hop_away} hop_limit:{hop_limit} hop_start:{hop_start} calculated_hop_count:{hop_count} final_hop_value:{hop} via_mqtt:{via_mqtt} transport_mechanism:{transport_mechanism} Hostname:{rxNodeHostName}") diff --git a/pong_bot.py b/pong_bot.py index e6775a5..c6ac78a 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -405,7 +405,13 @@ def onReceive(packet, interface): # Add relay node info if present if packet.get('relayNode') is not None: - hop += f" (Relay:{packet['relayNode']})" + relay_val = packet['relayNode'] + last_byte = relay_val & 0xFF + if last_byte == 0x00: + hex_val = 'FF' + else: + hex_val = f"{last_byte:02X}" + hop += f" (Relay:{hex_val})" if my_settings.enableHopLogs: logger.debug(f"System: Packet HopDebugger: hop_away:{hop_away} hop_limit:{hop_limit} hop_start:{hop_start} calculated_hop_count:{hop_count} final_hop_value:{hop} via_mqtt:{via_mqtt} transport_mechanism:{transport_mechanism} Hostname:{rxNodeHostName}") From 38131b41800146d4130fa544d82401fb1a04bc83 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 12 Nov 2025 21:53:27 -0800 Subject: [PATCH 3/4] cleanup --- mesh_bot.py | 2 +- pong_bot.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index af7c661..f8fbce3 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -292,7 +292,7 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann elif "Hops" in hop: # janky, remove the words Gateway or MQTT if present hop = hop.replace("Gateway", "").replace("Direct", "").replace("MQTT", "").strip() - msg += f"\n{hop}🐇 " + msg += f"\n{hop} " if "@" in message: msg = msg + " @" + message.split("@")[1] diff --git a/pong_bot.py b/pong_bot.py index c6ac78a..45a30ce 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -109,7 +109,7 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann elif "Hops" in hop: # janky, remove the words Gateway or MQTT if present hop = hop.replace("Gateway", "").replace("Direct", "").replace("MQTT", "").strip() - msg += f"\n{hop}🐇 " + msg += f"\n{hop} " else: msg += "\nflood route" From 05df1e1a3c69de63d76d5a6321580b1e1779bf1d Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 12 Nov 2025 21:58:00 -0800 Subject: [PATCH 4/4] logsoff --- mesh_bot.py | 8 ++++---- pong_bot.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index f8fbce3..a012fd6 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -1939,10 +1939,10 @@ def onReceive(packet, interface): logger.debug(f"System: channel resolution error: {e}") #debug channel info - if "unknown" in str(channel_name): - logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") - else: - logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") + # if "unknown" in str(channel_name): + # logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") + # else: + # logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") # check if the packet has a simulator flag simulator_flag = packet.get('decoded', {}).get('simulator', False) diff --git a/pong_bot.py b/pong_bot.py index 45a30ce..55b3c16 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -309,10 +309,10 @@ def onReceive(packet, interface): logger.debug(f"System: channel resolution error: {e}") #debug channel info - if "unknown" in str(channel_name): - logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") - else: - logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") + # if "unknown" in str(channel_name): + # logger.debug(f"System: Received Packet on Channel:{channel_number} on Interface:{rxNode}") + # else: + # logger.debug(f"System: Received Packet on Channel:{channel_number} Name:{channel_name} on Interface:{rxNode}") # check if the packet has a simulator flag simulator_flag = packet.get('decoded', {}).get('simulator', False)