Messy is the right word here it is hard to see now the nodes and such, because it is also too big… This is only a portion of the image because i could not zoom out more in chrome …
How many nodes do you have? It’s hard to tell if it’s just buggy or that you have “too many” nodes. I can imagine it looks like that if one has 50 nodes.
One solution could be to filter a bit on what’s drawn. For example don’t draw the dashed connections.
It looks more horizontal because you have a lot of nodes connecting directly to the controller (this is functionally awesome, btw). Seems as though graphviz is starting with a hierarchical tree so direction connections end up in a line closer to the controller. The only way to fix this would be to add another metric of data to move how close/far the nodes are from the controller or some type of wrapping and a fixed width to the image.
Thank you for making this little tool, I’ve got a pretty populated Z-wave network, and I’m about to add another building worth of nodes, I’m very thankful for any tool to help analyze the network, as z-wave seems to be pretty finicky.
Here’s my map, I’ve got an unnamed node that seems to be connected to many other nodes at the bottom, also the Garbage node which is a switch I temporarily uninstalled, is shown in red at the bottom.
Sorry for the late response, I have had plenty to do. I did have a look a month ago, but didn’t get anywhere.
Today I have made some minor fixes that I have pushed to Github. Feel free to test it if it works better. I notice that Node 018 isn’t listed in your OZW log file, which seems weird to me. Other nodes do know about it though, therefore it gets a few connections towards it. One idea would be to run a heal before running the CLI program, I would imagine that could fill up the log with data. This is just a guess though, I am no expert with Z-wave.
For debugging purposes it would probably be clearer if all connections shown had directions, since 17 can have 18 as neighbor while 18 doesn’t have 17 as a neighbor. I will consider to add that, depending on the amount of time it takes. Shouldn’t increase the number of connections with a lot if I can use both <-, → and <->.
Strange. I still do not get any connections between the nodes…
I copied the OZW_log and the zwcfg* file to the folder where your php script resides.
The output is:
Reading XML
1 => Aeotec Z-Stick
2 =>
3 => FIBARO Wall Plug
4 => FIBARO Motion Sensor
5 => Flood Sensor Heizung
7 => Flood Sensor Waschmaschine
8 => NeoPlug1
9 => NeoPlug2
Reading OZW log
Calculating hops
WARNING: Node 2 has no neighbors
WARNING: Node 3 has no neighbors
WARNING: Node 4 has no neighbors
WARNING: Node 5 has no neighbors
WARNING: Node 7 has no neighbors
WARNING: Node 8 has no neighbors
WARNING: Node 9 has no neighbors
Rendering graph
WARNING: Node 1 still doesn't have any neighbors (on battery?)
WARNING: Node 2 still doesn't have any neighbors (on battery?)
WARNING: Node 3 still doesn't have any neighbors (on battery?)
WARNING: Node 4 still doesn't have any neighbors (on battery?)
WARNING: Node 5 still doesn't have any neighbors (on battery?)
WARNING: Node 7 still doesn't have any neighbors (on battery?)
WARNING: Node 8 still doesn't have any neighbors (on battery?)
WARNING: Node 9 still doesn't have any neighbors (on battery?)
Image saved as /data/output/image.svg#
Do you rely on updates to the log file while your script is running?
The graph visualization is tempting, but I think a connectivity matrix, where the connections are shown by colored squares or non-zero entries, will be a more practical and readable layout for this data, especially when the node count grows.
I’m pretty useless with PHP but maybe I’ll take a look at how this might be done starting from your parser.
The picture sure shows the complexity and pathways but like you, I think for practicality, a sorted matrix would be more understandable. I was most impressed with the sum-up before the graphics creation. I have often gone through the neighbor list just to see which devices talked to which. This is almost instant and summed up beautifully. Knowing that I have several devices with three hops will help to decide where to place additional devices to provide redundant pathways.
Anyway @magma1447 great work and thanks.