Nortek HUSBZB-1 configuration for VirtualBox on Ubuntu host

Just wanted to share a fix that worked for me in case anyone else comes across this. Very new to HA, I’ve got an Intel NUC running Ubuntu 20.04 and for HA I’ve spun up a VM for HA OS in VirtualBox.

I have the Nortek HUSBZB-1 connected to the NUC by way of a 4-port USB 3.0 extension adapter. While the /dev/ttyUSB0 and /dev/ttyUSB1 ports show up correctly when looking at dmesg, VirtualBox would never seem to find them when looking at the USB section of the VM settings.

$ dmesg | grep tty
[    0.098933] printk: console [tty0] enabled
[    0.401530] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    3.470806] usb 2-4.2: cp210x converter now attached to ttyUSB0
[    3.483272] usb 2-4.2: cp210x converter now attached to ttyUSB1

HA wouldn’t show any USB devices or serial devices in the default configuration, so setting up Zigbee or Z-Wave integrations were failing as well of course. Eventually the steps below fixed it for me:

  1. On the host machine, run sudo chmod 666 /dev/ttyUSB[0,1]
  2. In VirtualBox, open the settings for the VM and go to the Serial Ports section.
  3. Enable 2 of the Serial Ports (doesn’t matter which numbers), and set the Port Mode to “Host Device”.
  4. Leave the IRQ and I/O Ports as they are, and leave the “Connect to existing pipe/socket” box checked.
  5. Enter the path /dev/ttyUSB0 for the first serial port, and /dev/ttyUSB1 for the second serial port.
  6. Fire up the VM and check with dmesg | grep tty in the HA terminal to see if the you now have a couple new ttyS[number] entries there. The IRQ numbers should match those in the VirtualBox serial port settings.
  7. Try adding the integration for ZHA and Z-Wave JS. You might pick the wrong serial port while setting it up first, if it fails make sure you try both serial ports.

Not sure if this is already known information or not, but I couldn’t seem to find these steps laid out anywhere else so hopefully this helps someone in the future!

1 Like