Home Assistant VM Causing High WiFi Channel Usage

The past few days I’ve been having excessive channel usage on my Ubiquiti access points. I thought it was from a recent firmware update but I rolled back and the usage is still high. When I shutdown the VM everything goes back to normal. My VM is a docker in virtualbox with Home Assistant, Deep Stack, and WireGuard. I have three clones of my VM saved and all three cause the same issue. Any help would be greatly appreciated!

What do you mean by “channel usage”? (I have a Unifi system here, so I know the system)

Is the machine hosting HA set up correctly (wired) or on the wireless network? How many nodes do you have communicating to HA?

My fairly lightweight HA setup (virtualenv installation called Home Assistant Core this week :upside_down_face:) is connected via Ethernet, with around 20 devices reporting to it via wifi (three APs), and:

image

The 2G and 5G WiFi channels that each AP are set on. Currently showing very low since HA is not running.

The machine hosting HA is wired but is currently plugged in to a 10/100 switch before being plugged in to a Ubiquiti 24 port PoE switch.

I have (4) access points, (2) nanoHDs, (1) inwallHD, and (1) AC Mesh Pro outside. I have the power levels turned down and try to use different channels on each AP for each 2G and 5G.

There are roughly 20 devices connected to WiFi, half of which are sensors or other devices that interact with HA. The only two wired devices that interact with HA are philips hue hub and lutron caseta hub.

EDIT:
I should note that the majority of the usage when HA is running is Tx Frames and the utilization on each AP shoots up to between 35% and 96%. Once usage gets that high, my smart switches and some ESP8266 sensors drop or react slowly. I should also note that I am running a Dream Machine Pro and when the channel usage goes up the UDMPro usage increases from 30% to around 45%.

Channel Usage

Have a look at each client’s historical data (Clients screen, click a device to open the side panel, Statistics section, Show historical data) and have a look at the retry rates. Here’s my camera (an old Android phone running IP Webcam) showing ~0.1% retries so no issues there:

image

The shape of the plot is because it sftps a video file every 15 minutes.

Hopefully you’ll find one or more devices that are struggling to “hear” the wifi and are causing your problems. You might be able to identify the likely candidates via low signal values on the Clients page, or by low RSSI values reported by the devices themselves (e.g. via ESPHome logs).

I just fired up the VM again and will take a look at the client historical data. Am I just looking at Transmit Attempts and Retries? Below is how much the usage increased just from starting the VM. It is only showing 1 of the 4 APs but all 4 have the same behavior.

Channel Usage 2

Wow, and on 5GHz as well! That’s unexpected, unless you have 802.11ac IoT devices. Are you sure the host machine isn’t also connecting to wifi?

You don’t have a bunch of HD cameras sending continuous streams, do you?

All of my IoT devices are 2G except the Echos and Firesticks. Some of the echos are still on 2G and I will be switching them over to 5G shortly. I have 1 5MP WiFi camera on 5G but I do not have it tied to HA, only BlueIris. It was actively streaming in both the before and after channel captures.

The only active network connections are my wired (plugged directly into 24 port UI switch now), and the virtualbox adapter.

Hey,

I am experiencing similar issues but not with Unifi. How do you monitor channel usage is it built into Unifi ? Or some 3pp tool ?

Cheers!

It’s built into Unifi but you can download apps for android (not sure about iOS). I think I’m narrowing it down to my Host PC or VirtualBox install. I copied my VM and am running it on my Macbook. I’ve only been testing it for a few minutes so it’s way to early to tell but it looks promising so far. I hope you find your issue. This has been consuming me for the past few days!

UPDATE:
VM and Host PC moslty rulled out. Starting HA makes things worse but I don’t think its the problem. I am out of my element here but I think my access points are setup improperly. I have (4) Ubiquti APs spread out over a 1,600 SQFT house, and 2 car garage. (1) of the (4) APs are outside. I have the power levels set to low for 2G and medium for 5G. If I unplug all but (1), things get alot better. The more APs I plug in, the worse it gets.

Just fyi, I am testing a second HA install using Win10/Virtualbox/Home Assistant OS and I also have my network flooded and therefore many of my wifi devices stop working. This is just a plain Home Assistant OS install and I haven’t configered anyting yet. When I shut down the VM everything is good again.
This is out of my league so I just stopped my testing.
My main HA install is HA Supervised on a NUC running Ubuntu and is working great.

A while ago I had similar WiFi-problems, which where caused by IPTV. Back then the TV streams were provided via multicast. I didn’t have Unifi gear, but as soon as I started watching something from a WiFi device, the whole network was flooded. The problem could be solved by IGMP-related options within my network gear.

Since I don’t have IPTV anymore I don’t know what has changed in this regard over the years. But it might be helpful to point at the “Enable multicast enhancement (IGMPv3)” checkbox, available within the Unifi section to configure the wireless networks (the section where you also configure the networks passphrase etc.). This option could be hidden if you haven’t enabled the advanced settings.

Maybe your problems are unrelated to the IGMP-stuff. But it might be worth a try to toggle the checkbox and observe if anything changes.

If you are able to do packet capture on the port where vm is connected it would likely give you a good idea what’s going on there. Wireshark is your friend. If it is multicast/broadcat related then capturing anywhere else would also help.

Are you using automatic channels, or selecting them yourself?

Run a scan on each AP (Devices, click an AP, Tools, RF Environment, Scan) to see what the local RF situation is — note that this will put the AP out of action for five minutes or so.

For 2G, always use VHT20 and channels 1, 6 and 11 — and for four APs, either disable 2G on one of them or set the two most distant from each other to the same channel.

For 5G, use VHT40 and try to use different channels for each, if your local DFS setup allows you to.

fantangelo
The setup causing my issues is Win 7/Virtualbox/HA. I tried running my VM on a macbook and did not experience the same issues but thought it might have been a fluke until I read your post. I setup an old machine with Ubuntu and ran my VM in virtualbox and so far no issues. I also ran the VM on a seperate Windows machine to verify it wasn’t just my desktop but the issues came back. I didn’t think of testing my VM in linux until you posted. Thank you!

danielperna84
I saw that setting but did not try it yet. I’m happy to have a working solution for now but would really like to figure out exactly why I’m having issues with the Windows machine / VM setup. I will make those changes in unifi and test to see if it resolves anything. Thank you!

svbakulin
I downloaded wireshark and ran it for a bit on Friday. I’m very new to most things networking so I’m not sure what I’m looking at. I watched some youtube videos and read some articles but am still not sure exactly what I am doing or looking for. Any tips? Thank you in advance!

Troon
I originally had power and channels set to automatic and enabled WiFi AI. Recently I set the power levels to low for 2G, Medium for 5G and have each access point on its own channels (2G are on 1, 6, 11, 5G are on non DFS channels due to Reolink Wifi Camera). I ran the RF Environment tool and most channels had very low usage. I live in a rural area and my neighbors are far enough away and don’t have many high powered devices that interfere. This last round of testing I did disable 2G SSIDs on a few of the access points and it seemed to help but didn’t resolve the issue. Now that my VM is running on linux things are MUCH better. I’m glad this happened though as it forced me to learn about properly setting up APs (or at least the basics). Thank you for all of your help!