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.
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!
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 ).
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.
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
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!
Hello again! I thought I would update this post with my experience so far with VMware and the Sonoff usb dongle…
WMware is certainly better than the Oracle Virtualbox, as mentioned in an earlier post, the VMware runs with lower CPU demand on the host and also has the facility to suspend running and then re-establish later without having to go through the booting up for HA. I did get my Sonoff usb dongle to work but if anything goes wrong (the host PC sometimes has issues which is annoying) the dongle will not restart. I read that you can add the details to the .vmx file but didn’t fully understand what to do in that respect.
Anyway, yesterday I was trawling through Amazon and found that there is a Zigbee dongle available that can handle connection through usb, ethernet with PoE, ethernet with power from a usb cable or wifi. Since I have a wired network through the house I thought the ethernet way would be worth a try. Got the dongle this morning and set it up on the ethernet. Removed the Zigbee integration in HA then added it again (think it’s a different integration this time) and bingo, up and running. Needed to move the dongle to a different place so thought it would be better to give it a fixed IP address, then moved it to a more central location and bingo again, flawless reconnection! So to give it the real big test, I pulled the plug on the host PC and let it restart, VMware started up and third bingo of the day, it was reconnected with no issues!
I am very pleased with this and I now have the confidence of purchasing more Zigbee devices knowing they are likely to work okay even if I have to reboot my host for any reason.
To lock a specific physical USB device by its Vendor and Product ID, append:
usb:x.present = "TRUE"
usb:x.deviceVid = "0xXXXX"
usb:x.devicePid = "0xYYYY" (Replace x with an incremental index like 0, 1, and the XXXX/YYYY with your device’s actual hex IDs found via lsusb).
So, on a windows machine you need to find the usb’s vendor and product ID’s.
These you can find with windows device manager.
But, as you mentioned. if you use a tcp dongle, there is no need for any of that (which btw would also work on Virtual Box, but i am pretty sure you’re not going to switch back )
PS: thanks for the feedback, appreciated
Maybe mark the post that helped you most as ‘solution’
Thanks for all the comments. It might seem a big unfair that I have marked my post where I got the Zigbee dongle that connects through the ethernet as the solution, but my main issue was that I couldn’t get Zigbee USB dongles to work and the ethernet dongle solved that. However, all the posts in this thread were valuable, especially suggesting VMware than Virtualbox. So big thanks all round.
Glad you got the latest Ethernet version of the Zigbee that connect directly via network cable. You may redeploy your existing Sonoff Zigbee module using 5V USB A connectable adapter and make that as repeater. This will help you to connect some of your devices to this node and improve the signal strength. There are couple of YT videos out there which may help you.
Now I didn’t know you could do that, and that’s ideal because I have two of the USB dongles (bought a second one because I thought the first was knackered).
I had a look on YouTube and there were a few videos of chaps flashing the dongles but they seemed very complicated - taking the body off to expose two buttons, pressing in sequence, rebooting blah blah. However, I remembered that Sonoff have an online flash facility and yesterday the site was down. I thought I was going to be burdened with the hard way to flash the dongles. Today though the site was back up and it was so simple to flash the dongles. I started by flashing one in my work in spare time, when I got home I tried adding it to the new ethernet connected Zigbee system and it added immediately. Flashed the other one and it worked straight away as well.
Thanks for that info, it will give me better coverage in my house without having to spend any more (or maybe I mean not spend as much more!)