From b663e37fd95d97620764c818c17656b4fc87f6bd Mon Sep 17 00:00:00 2001 From: clockbrain <40568549+clockbrain@users.noreply.github.com> Date: Sun, 9 Jun 2019 16:16:38 +1000 Subject: [PATCH] Also match network map link by short address (#1611) --- lib/extension/networkMap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/extension/networkMap.js b/lib/extension/networkMap.js index af9b7ee0..aa167e54 100644 --- a/lib/extension/networkMap.js +++ b/lib/extension/networkMap.js @@ -51,7 +51,7 @@ class NetworkMap { const friendlyName = friendlyDevice ? friendlyDevice.friendly_name : device.ieeeAddr; // Add friendly name - labels.push(friendlyName); + labels.push(friendlyName+":"+device.nwkAddr); // Add the device type const deviceType = utils.correctDeviceType(device); @@ -87,7 +87,7 @@ class NetworkMap { * NOTE: There are situations where a device is NOT in the topology, this can be e.g. * due to not responded to the lqi scan. In that case we do not add an edge for this device. */ - topology.filter((e) => e.ieeeAddr === device.ieeeAddr).forEach((e) => { + topology.filter((e) => (e.ieeeAddr === device.ieeeAddr) || (e.nwkAddr === device.nwkAddr)).forEach((e) => { const lineStyle = (e.lqi==0) ? `style="dashed", ` : ``; text += ` "${device.ieeeAddr}" -> "${e.parent}" [`+lineStyle+`label="${e.lqi}"]\n`; });