Page 2 of 4

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

Posted: Sunday 07 January 2018 11:11
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 3416 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

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

Posted: Monday 22 January 2018 23:43
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

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

Posted: Wednesday 14 February 2018 12:04
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" );
		};

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

Posted: Wednesday 14 February 2018 17:58
by mischa
@SchattenMann

where to put it, if you use the default theme?

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

Posted: Wednesday 14 February 2018 18:22
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" );
		};

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

Posted: Wednesday 01 August 2018 16:32
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 ?

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

Posted: Wednesday 01 August 2018 17:05
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

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

Posted: Wednesday 01 August 2018 17:10
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.

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

Posted: Wednesday 01 August 2018 17:13
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

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

Posted: Wednesday 01 August 2018 17:23
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

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

Posted: Sunday 12 May 2019 9:55
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... ?

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

Posted: Monday 20 May 2019 9:06
by jeecee
I have the same problem...

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

Posted: Wednesday 29 May 2019 5:56
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?

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

Posted: Wednesday 29 May 2019 10:04
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

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

Posted: Wednesday 29 May 2019 10:43
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

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

Posted: Wednesday 29 May 2019 11:50
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

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

Posted: Wednesday 29 May 2019 12:27
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

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

Posted: Tuesday 04 June 2019 21:29
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.

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

Posted: Wednesday 27 November 2019 17:59
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)

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

Posted: Wednesday 27 November 2019 20:31
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