mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-06 19:00:13 +00:00
Support mesh networks in grapvhiz networkmap. https://github.com/Koenkk/zigbee2mqtt/issues/652
This commit is contained in:
@@ -42,7 +42,6 @@ class NetworkMap {
|
||||
|
||||
graphviz(zigbee, topology) {
|
||||
let text = 'digraph G {\nnode[shape=record];\n';
|
||||
const lqiDevices = new Map(topology.map((d) => [d.ieeeAddr, d]));
|
||||
|
||||
zigbee.getDevices().forEach((device) => {
|
||||
const labels = [];
|
||||
@@ -76,10 +75,9 @@ 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.
|
||||
*/
|
||||
const lqiDevice = lqiDevices.get(device.ieeeAddr);
|
||||
if (lqiDevice != undefined) {
|
||||
text += ` "${device.ieeeAddr}" -> "${lqiDevice.parent}" [label="${lqiDevice.lqi}"]\n`;
|
||||
}
|
||||
topology.filter((e) => e.ieeeAddr === device.ieeeAddr).forEach((e) => {
|
||||
text += ` "${device.ieeeAddr}" -> "${e.parent}" [label="${e.lqi}"]\n`;
|
||||
});
|
||||
});
|
||||
|
||||
text += '}';
|
||||
|
||||
Generated
+2
-2
@@ -4803,8 +4803,8 @@
|
||||
}
|
||||
},
|
||||
"zigbee-shepherd": {
|
||||
"version": "git+https://github.com/Koenkk/zigbee-shepherd.git#43278a2219d1733180ed353deb4b724b2b9437fa",
|
||||
"from": "git+https://github.com/Koenkk/zigbee-shepherd.git#43278a2219d1733180ed353deb4b724b2b9437fa",
|
||||
"version": "git+https://github.com/Koenkk/zigbee-shepherd.git#ab40740ed8b41636cb3de7aecb160eb34b14917a",
|
||||
"from": "git+https://github.com/Koenkk/zigbee-shepherd.git#ab40740ed8b41636cb3de7aecb160eb34b14917a",
|
||||
"requires": {
|
||||
"areq": "^0.2.0",
|
||||
"busyman": "^0.3.0",
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
"semver": "*",
|
||||
"winston": "2.4.2",
|
||||
"ziee": "*",
|
||||
"zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#43278a2219d1733180ed353deb4b724b2b9437fa",
|
||||
"zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#ab40740ed8b41636cb3de7aecb160eb34b14917a",
|
||||
"zigbee-shepherd-converters": "7.0.22",
|
||||
"zive": "*"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user