I’ve got Home Assistant running on a not-a-NUC (OptiPlex 3040 i5, 8GB, 500GB SSD Windows 10) using VirtualBox and a QuickStick Combo HUSBZB-1 by Nortek. Everything works flawlessly when I boot up the virtual machine and install the USB stick. I’ve been able to use both the ZigBee and ZWave sides. However, when the PC reboots (Let’s say to install a Windows Update.) The virtual machine autoruns as I’ve programmed it to do, but it doesn’t seem to see the USB stick right away. I can pull the stick out and reinsert it and that usually solves the problem or I can do that and reboot my virtual machine and that always solves the problem.
I’d like for it to be able to handle rebooting the host machine without manually pulling and reinserting the stick (so it will work when I’m not physically present).
Any suggestions?
Also, if this has been handled in another thread, please point me to it and I’ll delete this extraneous topic and just go there.
Thanks
I’m running into this exact some issue. Did you even resolve this? VirtualBox on a Windows PC. As soon as I reboot it does not see the Quickstick until I remove/reinsert.
Still haven’t found a solution
I posted a workaround on Reddit: HA in VirtualBox on Windows 10 Zigbee failure : homeassistant (reddit.com)
The trick I found was to restart the USB device immediately after I start the VM. There’s a number of ways to do this, but the one I use is to use the Windows DevCon ( Windows Device Console (Devcon.exe) - Windows drivers | Microsoft Learn ). At command line you can run: "C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon.exe restart USB* ". That will restart all of your USB devices (if you’ve got some time, it shouldn’t be too hard to figure out your USB stick’s ID and restart only that).
So my Windows startup routine is to have Task Scheduler immediately run C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm “{aa8508d6-7102-4291-a7ba-a1e6276fa5c2}” --type “headless” [Fill in the appropriate VM ID there]
Task Scheduler then immediately executes the devcon command I gave earlier and the USB driver will load properly. EDIT NOTE: the devcon restart command must run with ELEVATED/ADMIN privileges!
Thanks. I’ll give it a shot.
Hi, I’ve been looking all over for a solution to the same issue - I’m a HA newbie with HA running in a Windows VM Linux setup, and I have a Zooz S2 700 Z-wave stick. Every time I reboot the PC the Zwave JS add on cannot see the USB device from the VM, and yes I have the USB filter enabled in the VM. Once I unplug and plug it in again, the Zwave JS add on finds the USB and I get my devices back working.
I managed to get hold of devcon.exe as a standalone service from github rather than having to install the whole MS Dev suite. I used the command devcon.exe find USB* to find my USB instance which had a description “Silicon Labs CP210x…” and that gave me the associated ID, so I then used the devcon.exe restart “@USB\VID_10C4&PID_EA60\0001” command. Interestingly it responded that it “failed” with this message…
USB\VID_10C4&PID_EA60\0001 : Restart failed
No matching devices found.
And in Device manager it no longer showed under the PORTS (COM & LPT) section. So I thought “ho hum, it didn’t work”. But in fact this command DID reawaken the USB drive and HA picked it up automatically shortly thereafter. So I don’t know if the missing entry in Windows Device Manager is a problem, but Z-wave functionality seems to be OK in HA. So as you suggested I added a 2nd action in Windows Task manager at startup to restart the device after the call to start the Virtualbox.
Many thanks James_Huang for doing the hard work initially, I appreciate it. I wanted to resurrect this post in case this info helped anyone else, it certainly helped me.
I know this is an old topic but I was porting my HA instance to a new computer and couldn’t figure out why in the old setup my USB stick started but in the new setup it didn’t. I know that I didn’t follow the steps as detailed here, so I must have done something different than you guys did.
So after racking my brain, I realized that in the old machine I had installed Silicon Labs’ CP210 drivers for my Nortek husbzb-1 stick. This allowed Windows, to see the USB on startup, thus no need to use devcon.exe.
See this YT video for an explanation: https://youtu.be/wJ5–gXZtD4
Hopes this helps others.