Confused about which device belong to which zwave-node Topic is solved

For Z-Wave related questions in Domoticz

Moderator: leecollings

User avatar
jvdz
Posts: 2265
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by jvdz »

datagutten wrote: Sunday 31 December 2017 14:14 You should send a pull request on this, it would be nice to have as a default feature.
Pull request is made: https://github.com/domoticz/domoticz/pull/2033
datagutten wrote: Sunday 31 December 2017 14:14 Edit:
When using whitespace the search does not work, so the underscore must be there.
I see you changed your post, but I have implemented it in the same was as displayed in the Zwave hardware devices list.
It now displays like this:
Knipsel.PNG
Knipsel.PNG (56.74 KiB) Viewed 3392 times
What I do to check things is just type the name of the ZWave hardware "ZWAVE" and then sort on the Hardware column so the display has the same sequence as the ZWave hardware devices list.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
mischa
Posts: 74
Joined: Tuesday 07 April 2015 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8872
Location: Heerhugowaard, The Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by mischa »

First of all, thank you for this addition. Makes life a lot easier, switching from PI to Synology and have to include 30 nodes.
As some of the devices only appear after a while or for example when clicked on like the triple click of Fibaro devices.
this could take a while.

Not sure if possible but would it be a nice addition if the table could be grouped
Something like this.
Hardware
NodeID
Devices

Perhaps there is other hardware that could also benefit from this approach, like evohome, rfxcomm, ect ect

Mischa
Pi 2 - Pi 1 - Razzbery 2.0 - Fibaro FGD-211 - Fibaro FGD-212 - Fibaro FGRGBWM-441 (RGBW Module) - Fibaro FGBS321 (Universal Switch) - FGWPF-102 - TBK Home TZ67-G - Synology DS1515+ - Esp Easy (with wemos D1 mini)
SchattenMann
Posts: 73
Joined: Friday 09 October 2015 19:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by SchattenMann »

thank you @jvdz - this is the single best add to Domoticz since I can remember :D

As a suggestion, add a "link" on the device ID to filter the devices' table. This is how I'm doing it now (added to my themes custom.js)

Code: Select all

$("#devices tbody tr").each(function() {
			var html = $(this).children()[2].innerHTML;
			var className = $(this)[0].className;
			
			var res = html.match(/(\s[0-9]{3}\s[\(][0-9]x[a-zA-Z0-9]{2}[\)])$/g);
			
			var css = "";
			
			if(className == "odd") {
				css = 'style="color: #FFF"';
			}
			
			if(res){
				$(this).children()[2].innerHTML = $(this).children()[2].innerHTML.replace(res,'<a href="#/Devices" '+css+' onClick="filter(\''+res+'\')">'+res+'</a>');
			}
			
		});

		function filter (idx) {
			$("#devices_filter input").val(idx);
			$("#devices_filter input").trigger( "keyup" );
		};
mischa
Posts: 74
Joined: Tuesday 07 April 2015 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8872
Location: Heerhugowaard, The Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by mischa »

@SchattenMann

where to put it, if you use the default theme?
Pi 2 - Pi 1 - Razzbery 2.0 - Fibaro FGD-211 - Fibaro FGD-212 - Fibaro FGRGBWM-441 (RGBW Module) - Fibaro FGBS321 (Universal Switch) - FGWPF-102 - TBK Home TZ67-G - Synology DS1515+ - Esp Easy (with wemos D1 mini)
SchattenMann
Posts: 73
Joined: Friday 09 October 2015 19:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by SchattenMann »

just create a custom.js file on /domoticz/www/styles/your_theme and paste

Code: Select all

jQuery(window).load(function() {


	
	setTimeout(function () {
		$("#devices tbody tr").each(function() {
			var html = $(this).children()[2].innerHTML;
			var className = $(this)[0].className;
			
			var res = html.match(/(\s[0-9]{3}\s[\(][0-9]x[a-zA-Z0-9]{2}[\)])$/g);
			
			var css = "";
			
			if(className == "odd") {
				css = 'style="color: #FFF"';
			}
			
			if(res){
				$(this).children()[2].innerHTML = $(this).children()[2].innerHTML.replace(res,'<a href="#/Devices" '+css+' onClick="filter(\''+res+'\')">'+res+'</a>');
			}
			
		});

		

	},2500);

});

function filter (idx) {
			$("#devices_filter input").val(idx);
			$("#devices_filter input").trigger( "keyup" );
		};
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by madpatrick »

jvdz wrote: Sunday 07 January 2018 11:11
datagutten wrote: Sunday 31 December 2017 14:14 You should send a pull request on this, it would be nice to have as a default feature.
Pull request is made: https://github.com/domoticz/domoticz/pull/2033
datagutten wrote: Sunday 31 December 2017 14:14 Edit:
When using whitespace the search does not work, so the underscore must be there.
I see you changed your post, but I have implemented it in the same was as displayed in the Zwave hardware devices list.
It now displays like this: Knipsel.PNG
What I do to check things is just type the name of the ZWave hardware "ZWAVE" and then sort on the Hardware column so the display has the same sequence as the ZWave hardware devices list.

Jos
Hello Jos,

I've adjusted the file /app/DevicesController.js but i don't see any changes in list.
Do i need to chage the database also as in your previous post ? or should changing the file be enough ?
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
User avatar
jvdz
Posts: 2265
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by jvdz »

This patch is part for the current release & beta, but it should appear right away after you clear the browser cache and refresh the page.
No other changes required. ;)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by madpatrick »

I'm currently still on v.3.8153, so that must the case ;-)

I did not make any changes to the database, but only adjusted the file.
After clearing the cache and refresh nothing is changed.
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
User avatar
jvdz
Posts: 2265
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by jvdz »

Check with F12 in Chrome whether the source looks correct as it is really a pretty simple change to the page generation for the Zwave devices.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by madpatrick »

jvdz wrote: Wednesday 01 August 2018 17:13 Check with F12 in Chrome whether the source looks correct as it is really a pretty simple change to the page generation for the Zwave devices.

Jos
That was the problem :roll:
Thanks for the help
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
vinisz
Posts: 11
Joined: Monday 21 January 2019 20:05
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by vinisz »

Hmm, I had it like this in the previous domoticz version. Now, updated and running Version: 4.10730 , I do no longer see the node-id , next to the controller (I want it to show as mentioned in this thread)
Am I doing something wrong or what do I need to change in the version I am running now... ?
jeecee
Posts: 5
Joined: Tuesday 27 February 2018 13:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by jeecee »

I have the same problem...
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by Plantje »

jvdz wrote: Friday 29 December 2017 22:16 Guess I have too much time on my hands. :)
...so was playing with file /www/app/DevicesController.js, which generates the Domoticz devices webpage.
Added a few lines of code to extract the ZWave DeviceID from the DeviceID and concatenated that to the Hardware name to allow for sorting in the Hardware name to group all devices by ZWave device. This is actually a pretty simple modification to accomplish what is wanted here.
This is the diff for the file in case you are interested to play and comment on this:

Code: Select all

+++ b/www/app/DevicesController.js
@@ -384,6 +384,13 @@ define(['app'], function (app) {
                 itemSubIcons += '&nbsp;<img src="images/empty16.png">';
              }
              var ID = item.ID;
+             if (item.HardwareTypeVal != undefined && item.HardwareTypeVal == 21) {
+                var ZWID = item.ID.substr(-4, 2);
+                if (ZWID == '00') {
+                  ZWID = item.ID.substr(-2, 2);
+                }
+                item.HardwareName = item.HardwareName + ' ' + ZWID;
+             }
              if (item.Type == "Lighting 1") {
                ID = String.fromCharCode(item.ID);
              }

Jos
Hmmm, I tried just adding this piece of code. That didn't work. Now I replaced a part that looks like this with this part and if still doesn't seem to do anything.
Can you tell me exactly where this goes?
User avatar
jvdz
Posts: 2265
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by jvdz »

Did you clear your browser cache to ensure it did load the updated DevicesController.js?
You can check it also in developer mode (F12), to see whether you have the modified code loaded.

EDIT: I don't see DevicesController.js in the current version anymore so which file did you change?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by Plantje »

jvdz wrote: Wednesday 29 May 2019 10:04 Did you clear your browser cache to ensure it did load the updated DevicesController.js?
Did a full reboot of my Domoticz server
jvdz wrote: Wednesday 29 May 2019 10:04 You can check it also in developer mode (F12), to see whether you have the modified code loaded.
Will do. Didn't really recognize the code in the developer mode.
jvdz wrote: Wednesday 29 May 2019 10:04 EDIT: I don't see DevicesController.js in the current version anymore so which file did you change?
Jos
I did change that file. Perhaps it is still in there from previous installs and my update doesn't change a thing
User avatar
jvdz
Posts: 2265
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by jvdz »

Plantje wrote: Wednesday 29 May 2019 10:43
jvdz wrote: Wednesday 29 May 2019 10:04 Did you clear your browser cache to ensure it did load the updated DevicesController.js?
Did a full reboot of my Domoticz server
Clearing the cache is a PC side thing, nothing to do with the Domoticz server itself! ;)
It looks like the last modification I made should still be in there, which is the highlighting of the Hardware id part in the deviceId.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
jvdz
Posts: 2265
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Confused about which device belong to which zwave-node

Post by jvdz »

I did some more checking on what we did at the time and remembered we found a "compromise" to highlight the ZWAVEID part in the DeviceID.
see: https://github.com/domoticz/domoticz/pull/2664 and made a comment about that here https://github.com/domoticz/domoticz/co ... t-33717380 .
So isn't that still the case in your version?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by Plantje »

Altering the .js file like you suggested didn't work or I am doing it wrong... the latter is most likely the case.
I don't see any highlighting in the ID when searching.
puls8
Posts: 13
Joined: Friday 04 August 2017 8:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by puls8 »

vinisz wrote: Sunday 12 May 2019 9:55 Hmm, I had it like this in the previous domoticz version. Now, updated and running Version: 4.10730 , I do no longer see the node-id , next to the controller (I want it to show as mentioned in this thread)
Am I doing something wrong or what do I need to change in the version I am running now... ?
I am running version 4.10717; is this already added? (I did not modify the domoticz code)
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Confused about which device belong to which zwave-node

Post by Plantje »

It will not be added anymore. If you want it, you need to add it yourself.
Currently I'm having a hard time altering the files as TeamViewer has for some reason flagged my usage as commercial
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest