Z-Wave graph (without the python)

Thanks for letting me know @firstof9

I havenā€™t started with zwave yet but this look great. Any thought of making it a Hassio add-on?

Hi @tom_l I donā€™t use hassio myself so would have to set it up. I donā€™t think this would need to be packaged as an add-on though. I will try to take a look at next weekend see what I can do.

Works just fine in Hass.io for me. You can access the \config directory in Hass.io, then create the \panels directory and store the zwavegraph2.html file there.

2 Likes

Nice, this is working perfectly.

Just a small network now, as the main z-wave network I manage (at my parents house) now goes via a Vera (so that it stays online when rebooting/updating HA, also so I can put the controller in a central location in the house).

Screenshot from current z-wave testing network:

Okay, I see I need to make a minimum width :slight_smile:

This is cool, thanks! Two suggestions: maybe revisit the green square/round legend icons. To me it looked like additional nodes or something, it took a few minutes before I realized it was a figure legend. And maybe also highlight the connecting nodes themselves, additional to the already highlighted arcs?

This is really cool. About half way through the 2nd rewrite I started thinking I should have written it this way, but Iā€™m waaay better at Python than I am at JavaScript, so I kept on.

If you end up putting this in a GitHub repository (or the like) Iā€™ll link to it from my GitHub page with a recommendation as itā€™s easier to configure, and the display layout is just a matter of tweaking until you get it the way you like.

My network is below, a couple comments.

  • You might try putting the battery powered devices on the right as it unclutters the layout a little.
  • The failed node (Sideyard Sensor) isnā€™t showing failed per your legend.
  • The black on green of the second layer is hard to read on my screen.
  • I find the straight connection lines easier to follow and really like the mouseover highlighting they do, not sure if the library you are using supports anything like that.

Mine (old school):

The new hotness:


Nice job!

Thanks very much for the feedback @omenwild I was really hoping you wouldnā€™t mind me taking your code and running a different way with it :slight_smile:

Thanks for the suggestions, I will look at them this weekend. I really do need to setup a github repo at some point

So far I only have a few devices to determine the sort of range I can expect in my house. This has been an invaluable tool. Thank you.

One question, I have renamed my nodes in the front end and restarted but I am still getting the default names showing up in the graph and the device card. Am I doing something incorrectly?

Thatā€™s how it works, itā€™s using the ā€œmanufacturer nameā€ + ā€œproduct nameā€ to populate the graph not the ā€œnode nameā€.

Likely an easy tweak to the code to use the node name instead. @NigelL would be the best to chime in on that tho.

Right-o, thatā€™s why I asked. It looks like @OmenWild has done that in his example of ā€œthe new hotnessā€.

For the public record: I made no edits at all, just dropped it in place and loaded it. Iā€™m on an older install still (0.75.1) if that makes a difference. Upgrading is on my short list, but my free time has been eaten by a new 3D printer lately. So much fun stuff to do, so little free time.

Did you perhaps also edit your zwave node names in the entity_registry.yaml file (that is no longer used for zwave devices in later versions)?

That would explain why your node names look like friendly names.

I had a go at replacing node_name with friendly_name at a couple of places in the zwavegraph2.html file and restarted but it made no difference. I still see the (rather unhelpful) node names in the graph.

Hi Guys, I think Iā€™ve figured out whatā€™s going on, but donā€™t know how to fix it.

It looks as if my code ends up reading the node_name (or the friendly_name) from the zwcfg_.xml instead of using what gets displayed in the dev_state tab.

As a workaround, if you shutdown HA, and edit that file (carefully) you can change the Name attribute to have the value you want.

I have tried removing the file so that it would be recreated, and I do not advise this solution. It recreated the nodes slowly, but didnā€™t get the names right.

I will see if I can figure out how to raise this as a bug (because I think it is) but if one of you knows how, that would be great.

NigelL

Editing to add this link to the issue I reported on github. https://github.com/home-assistant/home-assistant/issues/16704

1 Like

There are a couple of ways to change that. As you mentioned you could carefully modify the zwcfg_.xml file which I have done in the past.


Note the name="" sections.
An this is how my config looks:

Notice the 2 named ones Linear and Zooz. I am going to change Zooz within HA Configuration > Cusomtization section:

Node 31 is the Zooz switch. Notice the name is Laundry Room but the node_name is the default. I then changed it to Laundry Room:

Restarted HA and it modified the customize.yaml file like so:
yaml
I already had the friendly name done so it added the node_name and now my graph looks like this:

And the device state is below:

So you can either do the zwcfg file or modify your customize.yaml file then restart HS or modify it in HA through configuration customization and restart HA. I hope this helps and I didnā€™t get to far of track.

Forgot to add I am on 77.2

1 Like

I am getting this same error and the same 'label' of undefined error in the browser console. Did you find resolution for this?

No, I gave up and havenā€™t gotten a chance to get back to this.

Iā€™ve identified the issue which is causing the easily renamed nodes not to have their new name show up properly.

When you add a zwave element to the HA system, it actually adds two (or more) nodes. One for the zwave physical device, and one (again or more) for the logical device (for instance, a light switch).

My code currently is looking at the zwave item, not at the logical device. I will try to figure out how to get the correct devices, and post an update (probably this weekend).

When you use the cog icon to rename the node, you are renaming the logical node, when you use the zwcfg file you are renaming the physical device (the zwave.xxx object)

1 Like

I hope you donā€™t change the way it works.

To me, looking at the zwave entity makes the most logical sense since that is the base device that all of the statusā€™s are based on. If the only issue is the friendly name then the base zwave device can also be named to a friendly name too in the same way as the others.