From 9f2cc28fef8a59b31425ba239848c9c2850b5d49 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Wed, 13 Mar 2024 21:15:00 -0700 Subject: [PATCH] Show unknown nodes in a fashion similar to the web UI. Fixes #504 --- meshtastic/mesh_interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshtastic/mesh_interface.py b/meshtastic/mesh_interface.py index 1090fc09..5f5b56db 100644 --- a/meshtastic/mesh_interface.py +++ b/meshtastic/mesh_interface.py @@ -152,13 +152,13 @@ def getTimeAgo(ts): ) rows = [] - if self.nodes: + if self.nodesByNum: logging.debug(f"self.nodes:{self.nodes}") - for node in self.nodes.values(): + for node in self.nodesByNum.values(): if not includeSelf and node["num"] == self.localNode.nodeNum: continue - row = {"N": 0} + row = {"N": 0, "User": f"UNK: {node['num']}", "ID": f"!{node['num']:x}"} user = node.get("user") if user: