Z-Wave connection graph

I’ve put all the relevant lines in https://hastebin.com/orumijajoc.css, and https://hastebin.com/rihifaviwu.ini for the list of names and IDs

Both the Utility and Nodon are remotes, but for some reason nothing displays the Nodon as a neighbour.

I’ll say it again, this is a fantastic tool :smiley:

I’ll try to take a look later, need to do some real work right now though. I should be able to reproduce it with your first link as input.

1 Like

Messy is the right word here :smile: 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. :slight_smile:

One solution could be to filter a bit on what’s drawn. For example don’t draw the dashed connections.

I have around 50+ yes, so it does make sense :slight_smile:

How can i remove the dashed connections?

Nvm, in the part where you set the dashed lines i just added “continue;” :slight_smile:

Less messy, but for some reason it wants to move more horizontal then vertical.

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.

True, got my rpi in the smack middle of the house. Only have some issues with devices near my electrical box/fuses. Pretty much a dead zone almost.

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.

Hi
my graph looks like this even though zwave is generally working. I would have expected a star structure around the controller…

Is something in the config not correct?

Jochen

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 <->.

Made a few commits to GitHub today.

  • Added node numbers to the nodes in the diagram.
  • A few bug fixes.
  • Added directional arrows to the diagram.

2 Likes

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?

Did you try running a heal network before copying the files?
Are there any neighbors listed in the OZW log file?

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.

Any chance of making this available to HassIO? or did I miss it?

Please make this available as plugin in HASS.IO,
Makes debugging a lot easier!

Do you have any idea how to make this work with HA running in Docker?

I am curious about this too!