Confusions about Z-Wave stick and Virtual Box integration

Tl;dr: I got HA to see the stick by mapping the serial port in the guest config, and setting Z-Wave JS to the corresponding tty port. But is this the right way?

I have a host running a Homeseer (HS) vm as well as a HA vm. With the HS, I simply capture the Smartstick+ USB in the guest config and HS sees the stick.

With HA, capturing the UZB-7 in the USB guest config does not work. One HA starts, trying to capture the UZB-7 USB device results in an error “…device busy” or something similar.

Since the UZB-7 has a USB to UART bridge, I decided to map to a known serial port on the host, then config’d it in guest config, and specified the port in Z-Wave JS. Z-Wave JS saw the device and created the S0, S1, etc. keys. It looks like I can now add Z-Wave devices, but is this how Z-Wave stick integration supposed to work with HA? I recall reading that HA can detect Z-Wave stick as an USB device rather than having to map it through the serial port.

I would appreciate some clarity. Thanks!

What do you mean by “map to a known serial port”? At least in a Windows host, you add a USB filter for the target USB device. The filter can match any set of USB attributes you want. It then passes it through to the VM directly. One passed to the VM, you use it the same way you would on bare-metal Linux host, with devices paths /dev/ttyUSB0 or /dev/serial/by-id/tty..., etc., there’s no difference.

image

1 Like

Thanks for your reply.

On the Windows host, once the driver was installed, I changed the COM port to 2 (from a higher number) in Device Manager. I did this because VB seems to only support COM 1-4. That was what I meant by mapping.

In VB guest USB settings, I had USB 3.0 selected, and I was able to “Enable” and select the UZB-7. However, after the VM starts, the stick was not captured. I tried to capture it, but received some sort of device busy error.

The only way I was able to get it to work was to set the Serial Ports to COM2 in VB guest settings, then in HA point it to /dev/ttyS1. It seems like the USB part does not work, but using COM does work.

Seeing your screen shots, under the USB settings, I do not see how I could point the USB device to a specific /dev/tty port. I know very little about Linux, so this is unclear to me.

What I am trying to understand is how, in the VB guest settings, by adding the USB filter for the target device, I could set the match the /dev/tty attributes so that HA can see it. Not only was I unable to get the HA VM to capture the target device, the only way I was able to work was using Serial Ports.

In your “USB Filter Details”, I do not see how I can match the tty attributes. In other words, how would HA/Linux identify the USB target device as a serial device?

I would appreciate any guidance.

You don’t need to map the device to any tty path in Linux, it’s discovered automatically. I do not use the Serial Port functionality in VB, just USB.

1 Like

Excellent! Based on your first reply and confirmation from your second reply, I decided to try setting USB to 2.0 rather than 3.0 and HA automatically discovered it. Thank you very much!

Wasn’t sure if that would make a difference or not, but good to know.