Z-Stick serial location keeps changing, can't SSH into system to identify persistent ID

I’m attempting to migrate from HomeSeer to Hass.io running in Virtualbox on a Windows 10 system (my Blue Iris machine). Everything is working great with the exception of Z-wave. I purchased an Aeotec Z-Stick Gen5 and can get it to work by specifying the serial port address (/dev/ttyS1, etc.) but then the address changes either when I reboot or when the USB stick gets unplugged and plugged back in.

To combat the changing serial path, I read that I should be able to use /dev/serial/by-id/usb-0658_0200-if00 to identify the Z-Stick. I tried that and it doesn’t find the device. So my next thought is to log in via SSH to run “ls -l /dev/serial/by-id/*” to identify the correct persistent ID. However, this is Hass.io, and you can’t just SSH into the box.

So I created a public key in puttygen and saved it into a file called “authorized_keys” and put it on a USB stick entitled “CONFIG” (as outlined at https://developers.home-assistant.io/docs/en/hassio_debugging.html). I then “Import from USB” in Hass.io–the logs then state this:

19-06-01 04:45:53 INFO (MainThread) [hassio.hassos] Syncing configuration from USB with HassOS.
19-06-01 04:45:53 INFO (MainThread) [hassio.host.services] Restart local service hassos-config.service
19-06-01 04:45:53 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.RestartUnit on /org/freedesktop/systemd1

I’m not sure if that means it was successful or not. Regardless, I then try to SSH using Putty into the system of my Hass.io install using the private key also generated by puttygen. After trying for a few seconds, I just get a pop-up message that says:

Network error: Network error: Connection refused

What am I missing here? First of all, it seems like the persistent ID that others use should also work for me, but it doesn’t. Then when I try to SSH into the system to identify the correct ID, I can’t get in. Looking for help…

You can’t use the persistent path, it is not exposed to the container.

https://github.com/home-assistant/hassio/issues/911
https://github.com/home-assistant/hassio/issues/867

Is there any way to keep my serial path from changing upon reboot and when the USB stick is unplugged and plugged back in? That’s really the root of the issue

Well that’s what the /dev/serial/by-id path is for, it never changes. The root problem is that the Hass.io container supervisor does not pass the paths to the container(s) that are running HA. The path in the host will be fine. At this time, I would not recommend to anyone to use Hass.io if Z-Wave is part of your setup.

The only stable way is to install Linux and run HA there so it has access to the persistent path. I think you can still run Hass.io as a container if you run docker yourself. If that’s correct, you can manually pass in the /dev/serial/by-id path to the container, which would solve the problem. You’re still installing Linux yourself though. From what I’ve seen I don’t think there’s any alternative when it comes to the image-based Hass.io install.