How to minimize Zigbee and Wi-Fi Interference (Zigbee2MQTT)
Once you've set up your Zigbee2MQTT network, you will want to optimize the Zigbee Channel BEFORE you add any devices - as you will have to re-add them if you change the channel. Here's a guide on how to ensure your Wi-Fi and Zigbee networks don't clash
Once you've set up your Zigbee2MQTT network, you will want to optimize the Zigbee Channel BEFORE you add any devices - as you will have to re-add them if you change the channel.
Most of the information I will be providing, I learned at MetaGeek WiFi & Zigbee Info page. Please check them out for more details on the wireless spectrum. I will be trying to focus on how to apply this to HomeAssistant and Zigbee2MQTT.
WHY?
Before we get too far along, you might be thinking - "Why should I do this?". Wi-Fi and Zigbee both exist on the 2.4ghz band, and as such can interfere with each other. This is even MORE important if you have multiple Wi-Fi networks around you, such as an apartment complex. In my opinion, Zigbee gets a bad rap for being unreliable, finnicky, short range, and slow - but I've encountered none of those issues and I think a part of that is due to taking the time to plan my Wi-Fi Channels and Zigbee Channels.
As you can see in the above graphic, 2.4GHz Wi-Fi Channels can over lap with Zigbee Channels. The Zigbee Channel is still visible as "peaking" over the Wi-Fi but it greatly reduces the clarity of the signal.
Ideally, you would measure your local wireless Signals using Wifi Info View, and based on strength of signals change your Zigbee Channel before you pair any devices to your Zigbee Network.
Example
Let's imagine you have two next door neighbors. They live on both sides of your home. To aid in this visualization, we will pretend our Wi-Fi is on Channel 6 (Green). We can see that our neighbors Wi-Fi are on different channels (1 & 11), some routers and access points will do automatic band steering to minimize overlap so this is completely in the realm of possibility. We can also assume that the plateau's (signal strength) shown aren't perfectly accurate due to distance between the homes. (If you were in an Apartment or have close neighbors maybe it will look more like the graphic).
If my Wi-Fi was the green one, I would want to make sure for CERTAIN that my Zigbee is not overlapping the plateau. SO, Zigbee Channels (different scale than Wi-Fi) channels 16,17,18,19 would be the worst ones to use. Given this neighbor constraint, Zigbee Channels 15, 20, 25, and 26 could be the best choices available to you. However, since Channel 11 (wi-fi)is your neighbor and further away (weaker), I would lean towards 25 or 26.
Inversely, if your Wi-Fi is very strong and on Channel 11 (Wi-Fi), You would likely choose Zigbee Channel 15, provided that one of your neighbors isn't using it.
How do we check?
Using the tool from Nirsoft, WifiInfoView, on Windows or the Airport Utility on iOS. We can scan our local Wi-Fi Channels and compare the RSSI (Received Signal Strength Indicator) to the Frequency and Channels.
Above is a screenshot from my PC measuring the Wi-Fi signals around me.
First, lets note that I am sorted on the RSSI column, from strongest to weakest.
Second, note the Frequency. Zigbee is on the 2.4GHz band, so we can ignore any 5ghz signals. (Dallas-5GHz is highlighted as that is the SSID my PC is connected to)
Third, note the Channel Column.
Given this chart, almost EVERY 2.4GHz Wi-Fi SSID is on Channel 1 or 6. There is an 11 lower down but is a good bit weaker. You can see my IOT network is on 1 and 6. So I have a few less choices, but given that there is only one weak Wi-Fi signal at Channel 11, I can really choose any Zigbee Channel 22 and up.
How do I check / change my Zigbee Channel in Zigbee2MQTT?
- Navigate to Settings → Add-ons → Add-on's in Home Assistant.
- Click on Zigbee2MQTT
- Click on "Open Web UI"
- Click the gear at the top, then click settings
- Click on Advanced, then look down to "Zigbee Channel"
We can see that Zigbee2MQTT recommends 11,15,20, or 25 as they are avoiding the Wi-Fi Plateaus.
In my case, Channel 25 is a safe bet and I've had NO Zigbee issues with a single coordinator in a fairly large home that includes 4x Enterprise Ruckus R710 Wireless Access Points.