DSK Backup logs - Where do I find them?

Good morning,
I’ve just finished my migration from an Aeotec ZWave stick to a HA ZWA-2. Right now all the devices are still in a mesh network. I need to exclude and include LR capable devices to move them to LR as opposed to mesh.

Unfortunately, I haven’t kept a record of what devices are what and a record of their DSK for SmartStart. I found a script on the Z-Wave JS Ui github page that retrieves them all and matches them with the z-wave device, and it’s supposed to export to console.log, but I have no idea where that log file is.

Can anybody assist?

I’m in a similar situation. I’ve been keeping records of my DSK keys but I missed a device and now that I actually need it… grrrr…

Anyway, I don’t have a complete answer for you. But maybe we can figure this out together.

So if you go to the z-wave JS GUI → Go to the bottom right menu → Advanced Actions → Driver Function → Paste the code in (there are many supposedly working examples) → But wait! Don’t click run yet! Open another window.

In this new window go to the z-wave JS GUI again. Go to the top left menu (yeah, stupid as heck that there are multiple confusing menus… I don’t get it either…) → Then go to Debug and that should show the debug console log.

So back in the first window, hit run. Switch to the second to see… a complete failure. All I ever get is
INFO Z-WAVE: Success zwave api call driverFunction undefined

Even the “example code” that shows up when you first open the Driver Function pane? Yeah… it doesn’t work either. :roll_eyes: I just get that same message without any output. A great “example code” :roll_eyes:

But I’ve pieced this together from like 5 different sources because no one actually bothers to explain all of these details at once and it’s all horribly documented…
(OK… so I may just be super grumpy right now because this shouldn’t be so flipp’n hard but apparently even though it’s been a problem for years, no one has figured out how to make it easier so… :man_shrugging: )

If I figure out anything else, I’ll post back but I’m getting rather annoyed tonight and am probably going to step away for a while… Best of luck.

Option 1:

  1. Select the Debug tab
  2. Select the “open in window” icon, it opens a dedicated browser window for logs messages
  3. Go back to the original window and then back to the Control Panel
  4. Click the Blue FAB button (hamburger) in the lower right
  5. Select Advanced actions (magic wand)
  6. Under “Driver function” select WRITE
  7. In the driver function text box paste this code that prints each DSK (or not) to the debug window:
const { logger, require } = this
const { dskToString } = require('@zwave-js/core')

for (const node of driver.controller.nodes.values()) {
  if (node.dsk) {
    logger.info(`Node ${node.id} has DSK ${dskToString(node.dsk)}`);
  } else {
    logger.info(`Node ${node.id} has no DSK`);
  }
}
  1. Select the “Run” button
  2. Look in the debug window and each node with its DSK will be printed

Option 2:

  1. Goto the Control Panel
  2. Expand the desired device
  3. Select Advanced
  4. Under “Export json” select DRIVER
  5. It will download a JSON file
  6. Open the JSON file and look for “dsk”
  7. Repeat for each device

Thank you @freshcoast ! That actually gave output!

Unfortunately, the vast majority of my nodes are Z-WAVE Node $ID_number has no DSK :frowning_face:

I know it’s gotta be stored in HA somewhere…

Thank you. That did the trick.