Z-Wave Node Matrix

Posted on
Fri May 13, 2016 1:42 pm
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Z-Wave Node Matrix

If you changed the code to make the background transparent, you could script it so you're overlaying the older graph with the new, and it would at least blink if there was any sort of change.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri May 13, 2016 1:55 pm
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Z-Wave Node Matrix

You could trigger it every (say weekly) to create a new image and scroll through them using a variable and heuristic images

Late 2018 mini 10.14

Posted on
Fri May 13, 2016 2:56 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Z-Wave Node Matrix

mat wrote:
Another wow .... really useful!

Love the matrix green! Can we use letters instead of coloured dots? Will it scroll for a few seconds while refreshing?

:shock: :mrgreen:

Thanks Mat! We have some options, but that would be quite a feat (and very cool!)

Neo could probably do it.
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 13, 2016 4:34 pm
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Z-Wave Node Matrix

Wow again. Mine looks SO DIFFERENT from what's posted already.

Still digesting what that means. But off the bat, everything shows as battery powered, and that's not right.

7, doesn't report at all, but it's up and working. Odd. 8 & 9 are devices that are part of the same motion detector.

12 is my energy meter & we're in the midst of re-siding the house, so external electrical isn't online, so no surprise I'm not getting data there.
13 is my smoke detector, which likely is asleep.

Dave, did you go around waking all your devices before you ran your matrix?
Attachments
neighbors.png
neighbors.png (15.66 KiB) Viewed 7034 times

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri May 13, 2016 7:03 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Z-Wave Node Matrix

Different Computers wrote:
Wow again. Mine looks SO DIFFERENT from what's posted already.

Still digesting what that means. But off the bat, everything shows as battery powered, and that's not right.

7, doesn't report at all, but it's up and working. Odd. 8 & 9 are devices that are part of the same motion detector.

12 is my energy meter & we're in the midst of re-siding the house, so external electrical isn't online, so no surprise I'm not getting data there.
13 is my smoke detector, which likely is asleep.

Dave, did you go around waking all your devices before you ran your matrix?

None of the devices need to be online for the script to do its thing. It's reading information from the Indigo database, not from the devices themselves.

Also, I can't be sure, but I think everything is red because all of your devices appear to lack Node 1 as a neighbor.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat May 14, 2016 4:52 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Z-Wave Node Matrix

Hi Dave,
Just tried Edit 2 version.

If I set plot_self to True then the script times out.
I tried running it as an external script and then the mac went highly CPU bound with the ScriptExecutor IndigoPluginHost running at 90% CPU.
I had to Force Quit it to end it.

Can I run it it as an external script (from Indigo) if it is accessing Indigo devices - not sure on this?

Anyway, if I set plot_self to False then it produces the graph OK as it runs in less than 10 seconds.

The good news is that it has picked up / highlighted a couple of issues on my network which I can now sort out. :D

Here is my graph (it's a large scale) :)
Attachments
neighbors.png
MATRIX
neighbors.png (109.06 KiB) Viewed 6970 times

Posted on
Sat May 14, 2016 5:18 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Z-Wave Node Matrix

Hi Jon - please hang tight. I'm working on a pretty substantial recode based on your suggestion to suppress unused node numbers. This is a good thing, and we'll be much better off for it, but it will take a bit of time.

You can absolutely run the script as an external script; in fact, it's my preference to do that whenever possible. Embedded scripts are limited to 10 second run times, whereas linked scripts run in their own threads and are not limited in that way. In the interim, you might also try amending the code thusly.

Change this:
Code: Select all
for dev in indigo.devices.itervalues():

To this:
Code: Select all
for dev in indigo.devices.itervalues('indigo.zwave'):

which will reduce the load considerably for networks with a large number of non-zwave devices. (This change will be included in the updated code I'll post later, too.)

Enjoy!

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat May 14, 2016 5:36 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Z-Wave Node Matrix

DaveL17 wrote:
Hi Jon - please hang tight. I'm working on a pretty substantial recode based on your suggestion to suppress unused node numbers. ...

OK , Thanks - I'll hang tight! :D

Posted on
Sat May 14, 2016 6:09 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Z-Wave Node Matrix

Image

Computer says no.

Posted on
Wed May 18, 2016 4:06 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Z-Wave Node Matrix

Almost there. :D What a fun exercise this has been. I think I'm pretty close, but have to work out some logic to try to anticipate some of the more unusual situations.

For example, in my network I have a valid node (node 43) that has no neighbors (and no other nodes refer to it) and another valid node (node 50) which does have neighbors (but no other nodes refer to it.) It was a fun challenge to hide only the truly unused nodes on both axes.

Another unique challenge was that plotting a node's own number as a neighbor (the grey dots) became tricky because devices can list 'invalid' nodes in their neighbor list (for example, have a look at neighbors 13, 14 and 26 which don't correspond to a valid node.) This created a discontinuous condition which forced me to be a bit creative. I think I've cracked it. I'm working on a way to try to highlight only these 'invalid' neighbors as a signal that something may need to be resynced.

If I don't continue to find other cool things to add, I should have an updated script to post in the next couple days. Here's a shot to whet your appetites. It has all the features turned on.

Dave
Attachments
neighbors.png
neighbors.png (33.92 KiB) Viewed 6830 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed May 18, 2016 4:18 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Z-Wave Node Matrix

Appetite whetted :!:

It's looking good :D

Posted on
Wed May 18, 2016 4:19 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Z-Wave Node Matrix

Thanks!


Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu May 26, 2016 5:40 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Z-Wave Node Matrix

Without further ado, please find a new version of the Node Matrix script (see post #1). The updated script:

Adds feature to hide unused node numbers,
moves indication of devices not associated with node 1 to the x-axis label to avoid obscuring other indicators (red text on X axis),
adds indication of neighbors with unused nodes (blue text on Y axis),
adds optional legend.

Please let me know if something doesn't seem quite right. Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 27, 2016 5:02 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Z-Wave Node Matrix

I've added an optional feature to make certain indications more prominent for color blind users. See post #1 for the current version of the script.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 27, 2016 9:20 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Z-Wave Node Matrix

Hi Dave,
Just tried out your latest iteration - it's a lot more compact now :)

A minor suggestion; I found that the x-axis labels are overwriting one another (especially when the numbers get over 100) and so I changed the script to incorporate x-axis rotation as follows:
Code: Select all
if plot_unused_nodes:
    plt.xticks(np.arange(1, max_addr + 1, 1), fontsize=tick_font_size, color=foreground_color, rotation=90)
    plt.xlim(1, max_addr + 1)
else:
    plt.xticks(np.arange(1, len(final_devices) + 1, 1), sorted(address_list), fontsize=tick_font_size, color=foreground_color, rotation=90)
    plt.xlim(0, len(final_devices) + 1)
I can now easily see what node is being referred to on the x-axis. :)

Again, thanks for all your efforts on this - it's much appreciated :D

Who is online

Users browsing this forum: No registered users and 1 guest