List all devices in z-wave network

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
benwindheim
Posts: 2
Joined: 18 Dec 2019 20:54

List all devices in z-wave network

Post by benwindheim »

I'm developing a module that relies on dynamically growing and shrinking the amount of door locks it's working on. Is there a way to list all devices of a certain type, or just all devices connected to a Z-Way controller from the index.js of my module?
Specifically, I'm looking to get the device ID of all door locks connected to my Razberry.

Code: Select all

zway.devices[1].data.neighbours
gives me

Code: Select all

[ object ZDataHolder ]
but I haven't gotten anything useful out of that.
Thanks!
benwindheim
Posts: 2
Joined: 18 Dec 2019 20:54

Re: List all devices in z-wave network

Post by benwindheim »

Partially solved:

Code: Select all

 zway.devices[1].data.neighbours.value 
returns node id routing list for z-way controller.
Now how do I derive Device Type given the NodeID?

EDIT solved: Better approach found in manual -

Code: Select all

vDevList = this.controller.devices.filter(function(x) {
	return x.get("deviceType") === "doorlock"
});
User avatar
PoltoS
Posts: 7650
Joined: 26 Jan 2011 19:36

Re: List all devices in z-wave network

Post by PoltoS »

Yes, this is the correct one!
Post Reply