Constant problems with Zigbee network due to a dongle

Hi everyone,

I hope someone can assist me with this because I’m fairly new to Home Assistant, and this issue is driving me crazy.

I have a mini PC running Windows 11 (came pre-installed, will probably change it later) with VirtualBox on it, which is running HAOS.

I set up a Zigbee network using the ‘SONOFF Dongle Max MG24’, which is plugged into the mini PC via USB, and added in VirtualBox.

The Zigbee network goes down every few hours or every time I restart the PC/VM. When I look into HA, I find something like this:

(I blurred some kind of device ID. I didn’t know if this was supposed to be private or not, but just to be sure :smile:)

I figured out that whenever this happens, one of these issues appears:

  1. The Sonoff dongle’s name in VirtualBox changes from “SONOFF Dongle Max MG24” to “Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light” and becomes unusable.
    OR
  2. The dongle doesn’t change its name and just becomes unchecked in enabled devices. Trying to re-enable it causes this error:

The only way I found to fix this is to physically reconnect the dongle, and sometimes restarting the VM as well.

What could be the problem? Dongle? Mini PC? VirtualBox?
If you need any logs or other data, please let me know what you need and how to obtain them. I’m trying to learn HA :slightly_smiling_face:.

  • First, if it’s not on a 1 oe 2 meter extension cord, put one on there. It may be getting interference from a nearby radio source like another dongle, a USB3 port, or something else.
  • Second, if it is primarily happening ar restart, you have have this problem. The TTY ports can sometimes change internally, so it is suggested to use the /serial/by-id/ URL that always talks to your dongle by serial so it is always right.
    You can find out what that is by using:
    Link to Hardware – My Home Assistant
    and looking for it under all hardware, something like this:

Once you have the long URL use that instead of the ttyxxx one.

If you are using a Container installation, this is how to see the /serial/by-id/ URL:
ls -l /dev/serial/by-id

Thanks for the answer.

I set the dongle in HA using the /serial/by-id and my ZigBee network hasn’t failed in a few days! Restarting the OS or the VM also seems fine for now.

However, if I reboot the host machine, the problem is back. VirtualBox doesn’t see the “SONOFF Dongle Max MG24” device, but only “Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light”, which cannot be used anyways. I still have to physically reconnect the dongle for it to appear in VirtualBox.

Any help with this?

Have you checked the first item that @Sir_Goodenough posted? Using an extension cord is pretty much mandatory if you want to prevent random issues.

Yes, it is currently on the 1-meter extension cable.

Any power saving option that is active on the Windows side? If you don’t use this machine for anything other than running the HAOS vm I strongly suggest ditching Virtualbox and go for either HAOS bare metal or Proxmox.

Makes no sense to have to deal with the instability when you have a bunch of connection options on your dongle.

Skip the whole USB passthrough thing and connect your Sonoff Max via PoE (or use ethernet and use the USB simply for providing power).

If you go the above route, note 2 things:

  • You’ll have to nuke your ZHA install and redo the integration setup to use tcp.
  • Your dongle will lose power temporarily if you reboot the entire host machine if you keep using its USB port for power. Generally it’s not an issue because your entire HA instance (including ZHA) will also be rebooting. However, if you want to avoid this, use an old phone charger or some other USB device which doesn’t get rebooted as frequently as a power source.
1 Like

Windows…

This has not been mentioned yet: Zigbee network optimization: a how-to guide for avoiding radio frequency interference + adding Zigbee Router devices (repeaters/extenders) to get a stable Zigbee network mesh with best possible range and coverage by fully utilizing Zigbee mesh networking

I finally switched to Proxmox (been planning to do so for some time now), and the issue seems to no longer appear. I guess this was caused by Windows or VirtualBox…

Leaving this here for any potential future visitors.

Thanks to anyone who tried to help!