Sonoff install, struggling to get success

Hi, looking for some help with getting a Sonoff Zigbee dongle to work with my HA arrangement. Here’s the story so far…My son has Home Assistant running and showed me some Zigbee temperature sensors working with a Sonoff Zigbee dongle, his system worked perfectly well with no issues installing or operating. I took a note of the Sonoff device which is the “Sonoff Zigbee 3.0 USB Dongle Plus ZBDongle E”. I also got some Zigbee UK appliance sockets to work with it. My HA installation is run in an Oracle VirtualBox VM running on a Windows 11 PC. I plugged in the Sonoff dongle and it didn’t work with the Zigbee integration on HA. I found out that when using a VM you need to tell the VM that the specific USB device is installed so carried out this fix on the VM. It worked, but not for long. I would maybe get two days of connection then it would fail. So, reading up on other things to try I did the following:-

Upgraded the firmware on the Dongle.
Set the USB port on the VM to xHCI to support USB 3.0.
Used an extension lead to get the dongle away from the PC.

It worked but not for long. It seemed to be okay until you reboot the PC, or maybe the VM, or both. The Zigbee integration reports “File or folder not available” with the file starting something like “/dev/serial/by-id…”

I am finding this very frustrating, and I apologise to the community for being a novice(!), I would have thought it should have been straightforward but it doesn’t seem to be.

I welcome any help on this, I am sure it is fixable but haven’t found the solution yet.

Thanks in advance.

You should add the usb device by id, not by usb port location:


(use device overview to find it)

Especially on virtual machine, the location of a usb device could change after a reboot; however, the ID will always remain the same….

I use zigbee2mqtt, and i use by-id

Hi ,thanks for the info.

This is the total path to the Sonoff device:-

“/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_44425a2a8df3ef11bd7cbd1b6d9880ab-if00-port0”

I have managed to get it to work this evening but I didn’t need to do anything other than unplug and replug etc. Before I got it to work by the “switch on and off” method I found where I could enter the path, and so entered the string above. It didn’t accept it, I assume its because the hardware didn’t see it. Or did I do something wrong? It certainly feels like a hardware issue but I am stuck again, unless of course it stays working if I don’t fiddle with it!

Thanks for the support.

You could try using another hypervisor, VMware workstation is free. I’ve seen some USB related issues on Virtualbox over the years.

Didn’t know that. That may be worth a serious look.

Thanks flekefjes for the info.

I can totally concur with VirtualBox…for me it was quite unstable, it would stall almost daily :scream:

VMware was a huge leap forward stability wise, I used that for a couple of years before I went supervised (mainy due to reduce power consumption :hugs:)
Maybe this helps Installing Home Assistant on VMWare Player / Workstation 16 (or 17)

But you have an alternative option (if you are running Zigbee2mqtt), instead of running it as app on home-assistant, you could just run it stand-alone on the host (I used that construction when I still was running HA on HyperVisor with a windows host :wink:).

Thanks team for the good advice. I think I will look at VMWare and I will install it on a little PC first to understand how to work with it, then I can install it on my dedicated HA machine.

When I got Zigbee working a couple of nights ago, it is still working but my feeling is that if you do anything hardware wise (reboot etc.) it will stop working and needs to be removed and re-installed. And that’s just hassle I could do without so maybe VMWare will be better.

I’ll update on here.

If you’re machine is dedicated, why not run HAos without VM?

Even in VMware workstation we have to connect the USB device explicitly if we restart the host machine (your dedicated host that is running the Virtual Machine) during any patching or other activities that you perform.

In VMware Workstation, a physical USB device can only be connected to either the host machine or the virtual machine (VM) at one time. Never both simultaneously. By default, plugging a USB device into your computer routes it to the host operating system.

Really? That is new to me (I only connected it once).
True it was a bit of a hassle to find usb’s id, and register it in the vmx file, but after that it was fine.
Also Debian was updated regularly, as well as vmware (and when that happened, the autostart would break temporarily because the vmware kernel needed to be recompiled. Once recompiled autostart would work again too).

So down the line, it ran flawless for more than 2 years :hugs:

Thanks everyone for the comments and information. I decided to try VMware on a small spare computer that had Virtualbox and HA installed some time back. Cleared off the old VM and went through the instructions highlighted by “aceindy” (see above).

These instructions are helpful and the VMware version 17 is a little different to what 16 looks like according to the instructions, and it is different to Virtualbox but I managed to get it installed. I restored my HA configuration from a recent backup and all was well.

My HA reinstall stated my SonOff device was there and ready but it couldn’t have been because it was a different device with a different ID. So it was pulled and reinstalled and it was up and running instantly. So, with confidence I moved onto my Intel NUC (my go forward HA machine) and performed the same install etc. Pretty much worked out well as for the spare PC I tried and got My SonOff devices up and running in no time.

NUCs are noisy, or at least mine is, and it used to run at 15-20% CPU load all the time with the Virtualbox and HA configuration, and the NUC fan howled constantly. The NUC was stripped and new thermal paste applied - the NUC noise lessened but it was still noticeably noisy, certainly not to be sited in your living room! But now, with the VMware, the CPU (currently) is much lower and the NUC is much quieter.

So again, thanks for all the help, time to get serious with my HA configuration!