Along with several others, my Z-wave network stopped working about 7-10 days ago. I’ve been wanting to migrate my HA instance away from my Raspberry Pi to my Unraid server so I figured that I may as well start fresh since I would have to spend time getting Z-wave working again anyway.
I set up HA OS to run on a VM within Unraid - no sweat. Based on some of the threads, I’ve downgraded Core to version 2023.8.2. Here are all of my versions:
Home Assistant 2023.8.2
Supervisor 2023.10.0
Operating System 10.5
Frontend 20230802.0 - latest
Aeotec Z-Stick Gen5
Ultimately, I’d like to use Z-Wave JS UI. Question - do I also need to install the Z-Wave JS add-on to make JS UI work? It seems as if I do, but I’m finding some conflicting information.
I can’t seem to determine the path to my USB stick. I can occasionally get the “/mnt/serial/…” path to show up in the dropdown but usually all I can choose from are the “/dev/ttyS#” path.
Can anyone clear these up first? I’d liked to at least be sure I’m starting on solid ground to troubleshoot the other Z-Wave issues
There will be a /dev/serial/by-id path in the dropdown (there is no device path starting with /mnt). This by-id path is the only one you should used. If it’s not there, then your USB pass-through settings for the VM are not correct. You can also confirm in the HA Settings / Hardware page. This is one of the added complications of moving from the Pi to a VM. For the Gen5, and especially with a VM, you should also disable soft-reset, which is one of the issues others have struggled with in the new releases.
I would personally stick to a Pi running the ZUI container, and locate the Pi in a central location, unless your Unraid server is centrally located. Also, make sure you are using a USB extension cord to move the USB stick away from the host and any noise, mention of a Unraid server often means some kind of server rack which is bad for RF signals.
Ok, thank you very much for the response! The document you linked to is for switching between the official add-on and ZUI whereas I’m starting with a fresh install. In any case, along with your answer the documentation that is loaded with the add-on in HA helped me to understand the answer to my 1st question, so that’s resolved.
Speaking of that documentation, in step 3 it says to enter a Network Key.
Enter the following information:
Serial Port (e.g., /dev/serial/by-id/usb-0658_0200_if00)
However in the ZUI configuration I see four items (3 named “S2…” and one named “S0”) that seem to be network keys. If I click on the refresh/recycle looking icons to the right, it will generate values for those, but I’m not sure if this is correct. Is there somewhere that I should be retrieving these values from instead of generating them?
After generating those values and saving I get through the rest of the steps up to here:
…
5. In the next dialog it will ask for the server. Enter: ws://a0d7b954-zwavejs2mqtt:3000
6. Confirm and done
When I click submit, I get this:
PS - I shut down the VM and unplugged the USB stick. After rebooting, I was able to see the /dev/serial/by-id path as expected (/mnt/serial was a mistype on my part). So question 2 is now resolved as well.
Forgot to include, I do have a 20’ USB extension cable. I’m not using it at the moment because i wanted to eliminate that as a point of failure. My server isn’t in a rack, and I have the stick plugged into the front which has open space in front of it.
Lastly, I wanted to switch from a Pi to VM because my Unraid system is on a UPS, has plenty of horsepower, and has been absolutely rock-solid. It just seems like the most reliable platform to me. That being said, i’m not opposed to going back to my Pi if there’s a definite way to get over these recent Z-Wave issues.
Current error message in my ZUI log is:
Failed to open the serial port: Error: No such file or directory, cannot open /dev/serial/by-id/usb-0658_0200-if0
Correct, but the answer still covers your question:
Can I switch between the Official Z-Wave JS add-on and the Z-Wave JS UI add-on?
You can, but you cannot run them both at the same time. Only one of them can be active at the same time.
Also, later in the docs is a more detailed explanation of the system, including this diagram:
Notice that the Z-Wave JS add-on and Z-Wave JS UI add-on are providing the exact same functionality for HA. If you had both installed, they would compete for access to the USB stick, which is not a shared resource.
Speaking of that documentation, in step 3 it says to enter a Network Key.
Yeah, guess this line is out of date and was written when S2 wasn’t supported yet.
If I click on the refresh/recycle looking icons to the right, it will generate values for those, but I’m not sure if this is correct. Is there somewhere that I should be retrieving these values from instead of generating them?
If it’s a new install, the randomly generated keys are fine and the rest of this paragraph is irrelevant. If you are migrating from another software (even another instance of Z-Wave JS), then you would retrieve the keys from that software. If you lost the keys, then you’ll have to exclude and re-include any secure devices.
Forgot to include, I do have a 20’ USB extension cable.
Unless that’s an actively powered cable, I’d be concerned it might be too long. There is some power loss the longer the cable is. I just use a short 6" cable. Mostly you need to keep it some distance from the actual noisy USB ports.
That’s fine, I’d prefer to have mine on a battery backup too. Dealing with serial ports is just a bit harder with VMs. A Pi running only Z-Wave JS UI is going to be pretty reliable I think though. Z-Wave JS UI does not have any serious performance demands.
Current error message in my ZUI log is:
Seems you figured it out, but this would have been the result of the soft-reset disconnecting the USB port, and the VM USB pass-through not working properly to dynamically add the USB stick back into the guest OS.
Understood, I was expecting to have to re-include all of my devices. I have less than 15, so it’s not that big of a deal.
I thought the same, so that’s part of the reason I’m excluding it for now. Omitting an extension cable wouldn’t cause a problem with the integration talking to the stick would it? Also, I’m assuming that RF noise would cause issues with connecting to devices, but it shouldn’t be causing the serial port connection problem should it?
I disabled soft-reset in ZUI, then rebooted and I still have the same error. I’m switching to more verbose logging to see if there are any more clues.
Credit to CrashnBrn on the Unraid forums for figuring this out!
It seems that checking the box in the Unraid VM setup isn’t enough to reliably pass the USB stick to the ZUI integration. You also have to edit the XML to change this setting. To get to this XML, go to edit your VM, then toggle from ‘Form View’ to ‘XML View’ in the top right.
Ok, no problem. I did find in the Unraid docs that hot-plugging of USB devices is not supported. Was wondering if the change in the post you linked to enabled that.