Forcing HA to remember a disconnected USB device?

I’ve recently started having problems with my Skyconnect dropping off in the middle of the night. I’m trying to get to the bottom of it, but as I’m running HA in a virtual environment the problem may be with the base metal.

It looks like HA stops being able to sense that my dongle is connected so it removes it as part of a standard cleanup. It may just be a brief dropout but HA never reestablishes the connection, and only does if I perform a reboot.

Presuming that it’s just a dropout rather than a disconnect as the base OS doesn’t think that there is a problem when I check in the mornings.

Is there any way to force HA not to do a cleanup, or to trick it into thinking that the dongle is connected?

I’m looking for a short term bodge, rather than a high quality fix. Just something to hold me over until I figure out why this is dropping out\disconnecting.

This is happening with the latest March build, but it started in mid-February, and I’ve tried restoring backups as far as December, but it’s still happening. Hence it may be a base OS issue rather than an HA one.

The only other change that I made in this time was to update my V1 sky connect to the latest version of Ember.

I’ve got half a dozen threads open on different forums for the base OS and the VM provider, so all I’m really looking for here is a keep-alive solution for the USB.

As a side note, this happens with all USB sockets at the same time, regardless of what is connected. Again leading me to think that this is a VM or base metal issue.

Any power saving options enabled?

First thing that I looked at. No to the base OS and VM.

What I’m ideally looking for is something that would stop HA from automatically removing a device even if power saving were in place.

Have you checked in the BIOS to see if there are any settings there? What hardware and hypervisor is this?

I originally thought that it was an OS\VM issue so I opened a coupe of threads for those things on other forum a while back. I’ve tried everything that they could think of relating to the BIOS, or that could be done in the OS\VM GUI, and nothing resolved the problem. We’ve moved on to other areas now.

What I’m looking for right now is a way of stopping HA from automatically removing the dongle if it drops out for a short period while I figure out why its dropping out in the first place.

I don’t think this exists. It would be easier to help you look at the cause of the dropout if you gave more details about your setup.

I’ve tried restoring older backups up until December last year, and it didn’t resolve the issue.

I’m also having the exact same problem with a Sonoff dongle that I only purchased after the error started happening, ruling out a hardware problem with my Skyconnect, a cable issue, or the new Ember firmware (which isn’t installed on the Sonoff).

Again, more details would be nice. What hardware, what hypervisor? This sounds like typical Virtualbox issues to me.

1 Like

Virtualbox on Intel, on Windows 11.

I’m not with it right now so I’m going from memory.

I’ve disabled all power saving and selective power saving on the OS and the USB, there is no power saving on the USB in the bios\UEFI.

I couldn’t find any windows or virtualbox logs from around the disconnect time.

I deleted the drivers from windows, set to remove them, rebooted and then reinstalled from the latest build downloaded form the chipset maker’s website. I also deleted the filters from Virtual and recreated them, but deleted the driver path specifics and all but the first four textbox items, and set last dropdown box to Any on the advice of people on another forum.

I loaded the virtual machine up and ran HA, and checked that both dongles were present and reporting back as they should (I originally did this with the Sky Connect Dongle using ZHA, and then brought a Sonoff Dongle to set up Z2M, and did the same again when that failed in the exact same way).

Initially I had thought that the new Ember firmware on the sky connect might be the problem, hence buying a Sonoff E pro Dongle, as the error started happening around the time that I upgraded it, but since both dongles dropped out at the same time we can pribably say that the firmware isn’t the problem.

I’ve also changed the USB extension cables, used different USB ports, and used the older V2 virtualbox USB settings instead of the V3 (I ca’t remember the exact name).

Plus a whole load of other things on other people’s reconditions that I can’t remember right now.

If it is power saving, I can’t find out where, I went right into the device manager and looked at the USB devices as well s the com port devices and disabled the power saving there as well as in the regular power savings setting.

My next move is probably going to be to go into the registry as I’ve been given some more tips regarding selective suspend settings that aren’t in the GUI.

I have the latest virtualbox extensions pack installed.

If you need to run this virtualized on a Windows 11 installation, would look into ditching Virtualbox - take a look at VMware workstation, it’s free. I’ve seen a lot of issues with Virtualbox and USB.

I’ve been running with Virtual box since 2023, and this is the fist time I’ve had a problem.

How Familiar are you with windows ?
Do you know Device-Manager ?
What are the “Settings” for the various USB-Ports ?


All Generic Usb Hubs & All USB Root Hubs have this set by Default ! :wink:

NOTE: I don’t say this Is Your Issue, , im just saying Microsoft does what they want with your machine, if you don’t know howto “control” it

The proper way to troubleshoot the issue would be to get an ethernet coordinator. If it doesn’t drop off, then you can be certain the issue is squarely on your virtualbox or pc config.

Out of curiosity, how is the path to your coordinators defined in Z2M & ZHA? Does it look something like dev/tty (bad) or something like dev/serial/by-id (good)?

I went through device manager and power manager extensively on another forum. Along with the power management to the coms ports.

1 Like

Everything USB related is removed at the same time, I’m not sure if this means that they drop off at the same time or just that the cleanup records everything in one go rather than individually.

The coordinator paths are as follows:

/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2 …

/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0 …

I’m pretty certain that this is a PC or Virtual box problem as I recovered to a backup from December and the problem persisted, I have a number of threads open on other forum to cover that.

I was more her to look for a way to stop HA’s clean up routine from removing the entries for the dongles after they dropped out.

The Zigbee integration\app can’t recover once the cleanup routine has removed the devices, so I have to reboot HA to get it to re-attach the dongles.

Yeahhh, I’d be switching to an ethernet coordinator if I were you.

By the time you figure out how to bypass the issue, let alone fix it, it’s gonna take a while.
You can be up & running in under a week with an ethernet coordinator. Think of the time (and hair) you’ll save!

Or try with VMWare, i never had usb issues …On the other hand mine is running on windows 10

Leaving a problem unfixed sets of my OCD.

If it is a base metal problem, wouldn’t VMware experience the same issue?

If Windows power saving or a driver error is knocking the USB ports off line, it would presumably do this for any environment.

Besides, not knowing the answer to this is setting off my OCD.

Yes that is true, but if it’s a Virtualbox problem you wouldn’t.

1 Like