Support mesh networks in grapvhiz networkmap. https://github.com/Koenkk/zigbee2mqtt/issues/652

This commit is contained in:
Koen Kanters
2019-01-18 22:11:01 +01:00
parent 653dfc7b6f
commit 5f6b37bf83
3 changed files with 6 additions and 8 deletions
+3 -5
View File
@@ -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 += '}';
+2 -2
View File
@@ -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
View File
@@ -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": "*"
},