From a80426850b6397a162558cfe33866a82379d083c Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Wed, 14 Jan 2026 14:03:30 +1000 Subject: [PATCH] tools: localhost: display network ID Display the network ID used by a device in the localhost table. Signed-off-by: Jordan Yates --- src/infuse_iot/tools/localhost.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/infuse_iot/tools/localhost.py b/src/infuse_iot/tools/localhost.py index 53b4533..7a7bb74 100644 --- a/src/infuse_iot/tools/localhost.py +++ b/src/infuse_iot/tools/localhost.py @@ -16,6 +16,7 @@ from aiohttp.web_runner import GracefulExit import infuse_iot.epacket.interface as interface +import infuse_iot.epacket.packet as packet from infuse_iot.commands import InfuseCommand from infuse_iot.common import InfuseType from infuse_iot.definitions.tdf import structs @@ -81,6 +82,11 @@ async def websocket_handler(self, request: BaseRequest): "field": "application", "headerHozAlign": "center", }, + { + "title": "Network", + "field": "network_id", + "headerHozAlign": "center", + }, { "title": "Last Heard", "field": "time", @@ -203,6 +209,9 @@ def recv_thread(self) -> None: self._data[source.infuse_id]["bt_addr"] = addr_str self._data[source.infuse_id]["bt_rssi"] = source.rssi + if source.auth == packet.Auth.NETWORK: + self._data[source.infuse_id]["network_id"] = f"0x{source.key_identifier:06x}" + for tdf in self._decoder.decode(msg.epacket.payload): t = tdf.data[-1] if t.NAME not in self._columns: