How to get a list of Z-Wave Device IDs

I'm foraging into Node-Red and would like to get a list of the device IDs for my Z-Wave devices. I have the Zigbee from the settings/zigbee but not for the Z-Wave.

Is there a way?

Thanks.

Just curious - why would you need the IDs? I use Node-RED for all my automations and have not used device IDs.

1 Like

I have a habit of changing the device names. As the ID's don't change then its safer.

What about device id? That’s the ID within the URL. Maker supplies it. I use it in my MariaDB device list that I collect via NodeRed. It’s also used in the event and log web socket streams too. I have a flow that will update my device list once a day with new names etc in case I change it.

That is what I was asking about. We're able to copy the Zigbee table and get the ID's into excel but the Z-Wave devices have no such table (at least that I've found).

FWIW I recently learned how "includes" works. It makes logging only certain device ID's easy.

const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.includes("Mango");

I use the Maker API app to collect all the devices and the Device ID is there. Just to be clear it’s basically the HE device table ID and not the zigbee or Zwave network ID.

2 Likes

Basically what @ritchierich said. If you go into the instance of MakerAPI that you have set up and exposed devices to Node-RED, you can click on the "Get All Devices", you will get a list of all devices exposed via that instance of MakerAPI.

Screenshot 2023-07-06 at 3.41.08 PM

List of devices - JSON formatted

If you put this into a JSON parser, you an see the IDs of all devices in that instance of MakerAPI

List of devices - parsed

Hope this helps.

EDIT: As @ritchierich had mentioned, this is NOT the Network ID that you can see on the device page. In fact, I don't think this ID is visible anywhere else.

1 Like

It shows up in the URL when viewing an individual device and also in the logs dev:1234 where 1234 is the device ID.

You also need to know it when using Maker to say toggle a switch too.

2 Likes

It was easy to find the deviceId, I was just hoping it would be in a table somewhere.

for the Z-Wave devices I simply opened the past logs, clicked on each device and copied the device ID.

FWIW, using names is safe in Node-RED. The devices are actually referred to by their device-ids behind the scene in calls made to Maker-API, or data received from Maker-API.

So if you change the name of a device, and then reload the corresponding device or command node, it will automatically come up with the new name. You can change names as frequently as you desire!

3 Likes

Good to know. For good or for bad. In my case I'm not using Maker-API. I just reading the eventsocket.

Just a heads up - I use HE's logsocket to grab the log events using the websocket node in Node-RED. I ran into an issue where the websocket connection was not established when HE was rebooted (but Node-RED was not). I worked around that by creating a flow that redeploys NR flows if there is no log entry in the last 15 minutes. Not sure if this has been fixed or is an issue with eventsocket.

I have a rule that fires on hub startup that restarts NodeRed. Has worked flawlessly for a few years.

2 Likes