Wi-Fi and Zigbee both operate on the same frequency space (2.4 GHz). While many newer phones, tablets, and laptops support 5 GHz Wi-Fi and can be separated from other traffic, as long as your access point supports simultaneous dual-band, most IoT devices will only support 2.4 GHz Wi-Fi. For example, Every ESP8266 and ESP32 device you have in your smart home will only ever be able to connect to 2.4 GHz Wi-Fi, and that is a problem. This article is a continuation of my previous guide on using Zigbee Groups in Zigbee2MQTT, which can also be used to reduce traffic and thus increase reliability.
As you continue adding Wi-Fi and Zigbee devices to your smart home, your Wi-Fi devices most likely will continue to function normally, though perhaps at a slower speed or with more frequent drop-outs. It is usually the Zigbee network that takes the larger hit, as it doesn’t handle flooding very well due to its low bandwidth.
While it is possible to create Zigbee Groups at any time, this guide is intended to be followed before you set up your Zigbee network. Changing your Zigbee channel in Zigbee2MQTT requires repairing of all your Zigbee devices.
Table of Contents
- How to avoid 2.4 GHz band congestion
- Choosing the best Wi-Fi channels
- Choosing the best Zigbee channels
- Plan ahead
How to avoid 2.4 GHz band congestion
Before optimizing your channels, it’s best to reduce the amount of traffic on the 2.4 GHz band. There are a few different ways of doing that. But it all boils down to removing as many devices from the 2.4 GHz Wi-Fi band as possible. As Zigbee devices can only use the 2.4 GHz band, there isn’t much you can do with them except minimizing the number of commands sent using Zigbee Groups.
If possible use a cable
While Wi-Fi is very convenient and having to manage fewer cables is nice, there is one principle I stick to when it comes to setting up a home network: if something can be connected using an Ethernet cable, it has to be connected using an Ethernet cable. The easiest way of reducing the amount of Wi-Fi traffic is by wiring up systems and completely bypassing the issue.
You’d be surprised at how much data is transmitted from security cameras and televisions streaming from a Plex server. Cutting out that traffic will do wonders for your Wi-Fi network as a whole.
Make sure you choose the right cable as there are varying categories. Anything from Cat 5e upwards will support Gigabit Ethernet. Cat 6 cables have to meet more stringent specifications for crosstalk and system noise than Cat 5e and support 10 Gigabit Ethernet.
Use 5 GHz Wi-Fi
The next step I recommend taking is making sure that all non-IoT devices which support 5 GHz Wi-Fi exclusively use it. Most phones and laptops released in the last couple of years should support it. And any router or access point marked as simultaneous dual-band capable will also support it.
To achieve this make sure that any form of smart switching (different vendors give it different names, on my Netgear router it is called Smart Connect) on your access point or Wi-Fi router is disabled. Having that option enabled will allow your access point to decide which band to use. You want to be able to see and control both the 5 GHz band and 2.4 GHz bands in your list of access points.
Your router or access point should now show up as two access points on your phone and laptop. One marked as 2.4 GHz and the other as 5 GHz. If it does, remove the 2.4 GHz access point from any device which supports 5 GHz Wi-Fi and have it only ever connect to the 5 GHz band.
Choosing the best Wi-Fi channels
Now that you’ve laid your Ethernet cable and have connected your phones and laptops to the 5 GHz band Wi-Fi, you can start by optimizing your existing 2.4 GHz band in your home network. Wouldn’t it be nice, if the Zigbee and Wi-Fi channel numbers were the same? Unfortunately, they are not, and you will have to plan both your Wi-Fi and Zigbee network carefully.
If you use multiple access points or routers, start off by using channel 1 on your first one, channel 6 on your second one. These channels don’t overlap and thus will deliver the best results.
Normally, you would use channel 11 on your third access point, which also doesn’t overlap with channel 1 and channel 6. But as this channel overlaps with Zigbee channels 23-26, you might want to drop it. You can stick to channel 1 and channel 6 for your 2.4 GHz band Wi-Fi, as long as you make sure that same-channel access points are as far away from each other as possible. For example, use channel 1 in the cellar, channel 6 on the ground floor, and once again channel 1 on the first floor. This should make for ample room in the 2.4 GHz band for Zigbee to operate in.
Choosing the best Zigbee channels
You can change your Zigbee channel in the Zigbee2MQTT configuration.yaml file. As mentioned before, you will have to repair all of your devices if you change the channel on a running network. As usual, it’s best to plan ahead!
With the 2.4 GHz band Wi-Fi channel 11 eliminated, the Zigbee channels 24-26 will deliver the best results with the least amount of interference.
That’s how you can optimize the 2.4 GHz band in your smart home. As mentioned, it is best to develop a thorough plan for your Wi-Fi and Zigbee networks before you start connecting anything to them. Having a plan for your channels will save you the hassle of having to repair every Zigbee device which might be stuck to the ceiling or hidden at the top of a window later on.