I’ve been running the same version of virtualbox for a couple of years with no upgrades or changes, but Windows 11 has changes forced on it all the time without user’s consent, so it’s more likely to be a Windows problem as it changes regularly while virtualbox is static.
so the balance of probability is that this is an OS issue.
It’s easy enough to test, install another hypervisor like VMware, deploy the vm and restore from backup. If you still see the same issue then at least you know 100% certain that it’s not a Virtualbox issue.
On a sidenote I would strongly recommend running HA on something else than a virtualized deployment on a Win11 machine. A mini PC / NUC or something similar.
And after a few hours of Suggestions trying to help You, we find that You have “discussed” this in other Forums (half a dozen), and we also had to 2 Drag out of You
i.e Which OS, Which VM , and still you “keep” a little Gem, Which HA Ver. etc
All these things which Should be in Your Opening Post, ( If you read the Forums Guide lines ), And i Get a feeling That You Know This, because you have Discussed this in another half dozen Forums
I.e
Thx for the info , excuse me for spending my time asking
Lastly I also assume You have Google Your Hardware/PC( Yes i know it has a Bios/UEFI) ,
But This Hardware and Your VM Driver they, should also match each other
So i assume you verified that VirtualBox latest extension pack are compatible with your VB version ?, And that you have Googled Upon your issue and tried a few other things, of the TOP post there, in regards to USB Issues In Virtual Box
I wonder how many hours you spend in the half dozen forums, And how many peoples OCD You’ve been Setting off
im off, have a nice weekend, and go buy some new “base metal” next week
In my defense I actually said on the very first post I made that I was looking at this from three different angles, the OS, the VM and HA, and that I was discussing the first two elsewhere.
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.
I’m mostly here to look for a way to pause the automatic cleanup when the USB drop out, or at least to extend the amount of time that they can be off line before cleanup takes place.
I know that they come back after a short period of time as the VM automatically reconnects them when they do, but if HA has already performed the cleanup it by that time it won’t pick them up again with rebooting.
Might be so, but with all respect, as we can’t know what you’ve done(or if in a structured manner) Etc. , we just keep asking (until we get OCD)
So another time try to “stick to facts” , not a “story” about beeing around the world
This way we would have/could saved yours and our time, asking questions, just to get answers like " been there, done that "
Anyways my self have no issues with zigbee/868mhz Controllers, as they are Ethernet-connected, it’s very convenient and stable, another benefit is, You can basically place it where it best Suited, from that specific Network Topology
Not sure what the following 3 dots “indicates” “Facts” ( Maybe a random number )
Try this, if you get a “feeling” that it “lost” it’s way Persistant USB names - #5 by NotoriousBDG .
PS: And check(and confirm) Whether your Extention-Pack.Ver IS in fact compatible with You VirtualBox Ver.
There’s clearly something else going on that I’m not aware of, and I don’t want to get in the middle of it, I’m just looking for a way of stopping HA form cleaning up the USB after they’ve dropped out.
I’ve come to the same conclusion, I don’t think that HA is “broken”, it’s doing exactly what it was designed to do, cleaning up when it sees some hardware has been removed.
If anything, I’m looking for a way to break it a little, to stop or delay the cleanup. So that when the USB come back HA still has them registered and can continue.
I appreciate the assistance with the VM, but I’ve been going through this with other people on another forum, and they’ve already asked me the same questions and suggested changes, so my setup isn’t vanilla any more. Lots of little changes have been made, not all of which I can remember.
It’s the same with Windows. I’ve made a lot of little changes already and people are asking me a lot of the same questions.
I guess that the TLDR is that I’m perfectly open to looking at other solutions, but I’m half way through the troubleshooting already and starting again here is making it hard to keep track of.
I’m on a phone, I couldn’t get it to click and drag the entire box with the touch screen.
And check(and confirm) Whether your Extention-Pack.Ver IS in fact compatible with You VirtualBox Ver.
Someone checked this for me, they say yes.
VB is known for being Unstable , Not Only with HA
I’ve heard that a lot lately, I originally started out with VMWare on Linux (for other things) and found it to be problematic because of the way that it grabbed the mouse\keyboard was conflicting with my KVM Software. So I switched to Virtual box on Windows, and this is honestly the first time I’ve experienced a problem with it.
I can give this a try, but because the dropouts are random I may not know if it’s been successful for a day or two.
The Virtualbox forum suggested something similar that involved creating a new USB filter, but stripping out most of the device details so that it wouldn’t matter if something changed because it was only looking at the basic hardware information and would mount anything that had the correct chip in the same way.
I only had one dongle at the time, so it would mount whatever was detected using the same coms profile rather than thinking it was something new or something different. Which is how I read the problem in the linked thread.
HA accepted this on trust, and loaded the dongle identically every time, but the essential problem remained that when the dongle dropped out the cleanup would remove it after a while, and when it came back HA wouldn’t add it back in without being rebooted.
It’s tricky to do this on a small phone screen as the onscreen keyboard is taking up too much space that I can’t see the console input properly, so I’m going to need to get to a PC first, maybe mid next week before I can try?
Mildly Spoken, i’ve never understood People who even try Managing a i.e Server from a Phone … Personally i hate even “Messaging” ( 10 Thumbs Syndrome ! )
I’m not sure how we got here but I didn’t actually ask for help with the VM. People just seem to have gravitated to it.
I’ve been troubleshooting it elsewhere for a while and I didn’t expect that to become the focus of this thread. I did mention that in the original post. My settings aren’t vanilla any more, so most of what’s being mentioned is going over old ground.
If it’s all the same, I’m really just looking for a way to stop the cleanup process from removing the USB devices if they drop out briefly. Maybe extending the time that device is allowed to be off line before it’s removed?
I think that it’s a Hollywood thing. People see character on TV managing server farms or coding on a phone app and they think that it’s easy. It’s not.
Right now my two main problems are that the menu bars and keyboard keep expanding over the console window so I can only see about an inch of each line of code at a time, and whenever I try to drag over text that is off screen the cursor runs away and ends up selecting ten times more than I intended.
On only installed the phone app to look at my sensor dashboard, server management wasn’t even on my top ten of things to do with it.
adjusting the underlying hardware configuration, host OS, or specifically configuring the integration (ZHA/Zigbee2MQTT) to be less aggressive with timeouts, rather than a single "offline timeout" setting in Home Assistant itself.
Here are the most effective ways to manage this:
1. Fix Underlying Hardware/Host Issues (Most Common Cause)
If Home Assistant is removing the device, it is usually because the underlying Linux OS (HAOS) or hardware has disconnected it due to power saving or USB 3.0 interference.
Use USB 2.0 Extension Cable: Always use a USB extension cable to move the USB stick away from the Raspberry Pi or server. USB 3.0 ports cause significant 2.4GHz interference, leading to device drops.
Powered USB Hub: Use a powered USB 2.0 hub to ensure the USB device receives consistent power, preventing disconnects caused by voltage drops.
Disable USB Selective Suspend (Windows/Proxmox): If running in a virtual machine (e.g., Proxmox or Windows), ensure the host is not suspending USB ports to save power.
2. Adjust ZHA (Zigbee Home Automation)
If you are using ZHA, the integration can be sensitive.
Wait for Reconnection: Instead of allowing the device to be removed, focus on fixing the root cause of the drop. However, if using ZHA, ensure the stick is plugged into a USB 2.0 port.
Debug Logging: Enable ZHA debug logging (logger: in configuration.yaml) to identify if a specific error is causing the drop.
3. Adjust Zigbee2MQTT (z2m)
If you use Zigbee2MQTT, it handles USB timeouts differently.
Configure availability: In configuration.yaml for Zigbee2MQTT, you can configure how long a device is considered available. Setting this too low causes issues, but you can increase the timeout setting.
4. Create "Virtual" Delayed Device (Automation)
If the device frequently dips offline, you can create a template binary sensor that adds a delay before reporting it as "unavailable."
Template Sensor with Delay: Create a template sensor that checks the device state but uses a delay_off or a time-based helper to prevent it from marking the device "offline" immediately.
5. Persistent Device ID (Linux/Docker)
If the USB device is removed and reconnected, it may be assigned a new port (e.g., /dev/ttyUSB0 to /dev/ttyUSB1), which breaks the connection in Home Assistant.
Use /dev/serial/by-id/: Ensure your integration is configured to use the persistent ID path (e.g., /dev/serial/by-id/usb-Silicon_Labs_...) rather than the temporary ttyUSB path.
6. Adjusting scan_interval (Generic Entities)
For sensors that frequently go unavailable, you can try increasing the scan interval in configuration.yaml to prevent it from polling too frequently.
yaml
# Example (needs adaptation for specific integration)
sensor:
- platform: template
sensors:
your_usb_sensor:
value_template: "{{ states('sensor.your_device') }}"
attribute_templates:
scan_interval: 300 # 5 minutes instead of standard
Summary: The most effective method is almost always using a powered USB 2.0 hub with a long extension cable, which prevents the device from ever going offline in the first place.
I’m going to look up how to do this, I didn’t know that this was possible
I’m not sure how to do this for a coordinator, it sound more like this is a device level thing
It looks like I’ve achieved this already with a Virtualbox filter as my settings match the recommended ones
I’m confused about this, it looks AI generated can this be done for a coordinator, it looks like something for a zigbee device
It might take me a bit to do 3, 4 as I’ve got to read up on how to do it, and the dropouts are intermittent, I may not be able to tell if they’ve been effective for a while.
:), Yeah, Hint the Url, it’s From Firefox default Google-Search-Engine, AI Summary With urls to Sources … Just mend as an example
I Do understand your “situation”, some times “New” Ideas cost more than one gets.
I.E It’s ages ago i decided to go for Ethernet Where Possible , Including IOT Controllers
Even my freaking Mouses/Keyboards , Wired is WIRED … re-leaves one for Alot of headaches
PS: I have a “Windows” Machine, If i “leave it”, and Don’t Click “Sleep” And the Screen Saver/Disk Sleep Settings “kicks in” USB(Windows) seems to “clean up” and i.e Mouse/Disks connected has to re-initialize ( i.e unplug-re insert mouse )
This Only Happens on 1 Device, the one i use regularly
The One i have VMWare On, i have disable/uninstalled Everything “not needed” in Windows, Apps/Services etc etc, Windows uses less than 2GB Ram and only “dedicated” 2 CPU’s
Windows IP is Blocked in the Router( No Internet to “interfere” ), So it’s only Purpose is to run VMWare, Which keeps me from “interference” from i.e Microsoft “Habits”