Z-Wave connection graph

Tags: #<Tag:0x00007fd07305fde8>


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.


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?



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.


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!


I was curios as to this could be done in Polymer - with data coming from Home Assistant. Came up with a quick CodePen as a sample of a Polymer component to display a ZWave network.

Sample Codepen

Just input the address to your home assistant instance - ‘wss’ is for HA running on HTTPS, ‘ws’ if running on HTTP - and the password, click ‘Connect’ and see the magic happen.

This is all client side - I want to work on a better graphing of the network. My small network looks like this:

You can select the nodes and it will highlight the connections – I think I can come up with a better algorithm for the showing of the network, but this is a good start.

Used Polymer because this should be easily ported to the actual HA dashboard.


Looks nice. Love to have that in my dashboard.


Yes, that would be a great feature to have in the front-end of HASS. Good work.


when i try to install via your github instructions it fails with “unable to locate package php7-cli”. I’m on Stretch.


Try to set it up, but only got the loading screen.


Nice project, just been toying around with it, turns out my z-wave network is rather complex :rofl:


Now that’s a mesh network!


seems to be hanging when it runs dot to convert the array to a svg file. Or does that just normally take a long time… Approximately 60 node network.