User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
homeautomation:zigbee [2025/02/02 08:09] – [Planning] willyhomeautomation:zigbee [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== ZigBee ====== 
- 
-[[https://en.wikipedia.org/wiki/Zigbee|ZigBee (Wikipedia)]]  is an IEEE 802.15.4-based specification for a suite of high-level communication protocols used to create personal area networks with small, low-power digital radios, such as for home automation, medical device data collection, and other low-power low-bandwidth needs, designed for small scale projects which need wireless connection. Hence, Zigbee is a low-power, low-data-rate, and close proximity (i.e., personal area) wireless ad hoc network.  
- 
-In other words, **ZigBee** is a wireless protocol, low power, low consumption and highly reliable which proves very efficient for our needs. It's cheap, which means that ZigBee devices aren't expensive. It's low-power, wihich means you can have battery powered devices using it, and it's very widely used, which means you can find lots of devices using ZigBee. 
- 
-=== Mesh === 
- 
-A **wireless mesh** is an approach where the wireless signal is extended by devices that pick up the signal on one side, and creates additional signal on the other side. Excuse my poor explanation, but i hope it's easy to understand.  
- 
-On a wireless mesh, a much wider range is achieved by extending the original signal by devices at the edge of the original propagation area. This is not good for bandwitdh, because the same bandwidth get shared along the entire area covered by the mesh, but allows weak signals to cover extended areas without requiring any wired calbing. 
- 
-ZigBee creates a wireless mesh using repeaters / routers. 
- 
-=== Hub / Coordinator (ZC) === 
- 
-It's the starting point of your ZigBee network. It can be a USB dongle connected to your Home Assistant or something more complex like a ZigBee to WiFi proprietary hub. 
-It should be located as far as possible from any 2.4Ghz interference, including WiFi cards, bluetooth stuff and electronics.  
- 
-It's a good idea to plug your USB ZC dongle to an USB extension cable to keep it a few decimeters from the computer itself. 
- 
-The official name is __coordinator__, but it's almost always referred as __hub__. 
- 
-=== Repeater / Router device (ZR) === 
- 
-Usually a non-battery powered device is always alzo a ZR. This kind of device acts as a mesh router (but it's almost always called __repeater__), and your ZigBee network will need quite a few of them as the signal is very weak and even thin walls can shield it completely. 
- 
-=== End device (ZED) === 
- 
-Usually a battery powered device that cannot act as a router / repeater.  Beside this, there is no difference with ZR. 
- 
-===== Planning ===== 
- 
-ZigBee is a low-power network mesh, so a little bit of planning is required unless your entire house is an open space without walls or furniture, no wiring in the walls and no metal whatsoever (or rocks) either... 
- 
-You ZigBee network, again, will **not** be easy to debug when messages starts to get lost, i will give you some pointers later on on this. Better plan properly from the start. 
- 
-From my personal experience ZigBee signal will: 
-  * **not** cross walls (unless, maybe, pure betongas walls) 
-  * **not** cross floors (unless pure wooden floors) 
-  * **not** cross stone walls 
-  * be shielded by metal rebars (including drywalls structures and concrete with rebars) 
-  * be distorted by running current or magnetic fields (including your electrical wirings) 
- 
-First of all you //must// ensure that your ZigBee channel does not overlap/get disrupted by your WiFi (2.4Ghz) network, but this will be discussed shortly. The following will assume you have taken care of that. 
- 
-The basic rules with ZigBee planning are: 
-  * Buy a good number of pure ZRs and place them properly scattered. I have one ZR for each floor of my house. 
-  * Place your other kind of ZRs (like smart plugs) so that they are __not__ covered by the appliance they power. For example, the smart plug behind the fridge will __not__ manage to get a good signal, due to the fridge itself. 
-  * Do not assume your smart switches will act as good ZRs. Since they are buried inside the wall and mixed with electric wires, they will __not__ work reliably as routers 
-  * While a good suggestion can be //only buy good brands, and good quality//, i went the chapo chinese way and adding a few, cheap as well, dedicated routers solved all my problems and saved lots of money too. 
- 
-So, to elaborate on the above, your ZigBee mesh will start acting up with no reason at all and spit out various errors in Home Assistant and your automations will start to fail at random? It's time to add some dedicated ZR devices. By dedicated i mean that they are **only** routers, not smart plugs, smart bulbs, smart switches at all, they only have one function: to be a router. They usually are small USB devices that you plug into your wall plugs with a USB charger (<1A is plenty enough). You need them, even if your home is small, and that is **the only reliable solution to ALL ZigBee issues acting up**. 
- 
-With some more details, ensure you have at least one ZR in each room, and two ZR always are in line of sight, if possible. Ideally, add one dedicated ZR every crucial point in your home, and at very least one or two for every floor. Don't forget that the signal irradiates like a sphere, so the shortest best could be trough a floor or a wall. 
- 
- 
- 
-==== Interference ==== 
- 
-ZigBee is a very delicate protocol, which unfortunately shares the same 2.4Ghz spectrum as WiFi 2.4Ghz and **will** be heavily disturbed by it. [[https://www.metageek.com/training/resources/zigbee-wifi-coexistence|this]] page explains pretty well how to setup your WiFi and your ZigBee to avoid interference. 
- 
-The basic idea is to choose WiFi channels that do not overlap your ZigBee channel. Since changing a ZigBee channel after it's been in use is complicated and will need repair for a few devices each time, i suggest to plan it in advance **or** move your WiFi channels and not your ZigBee one. 
- 
-The basic idea is that there are three //non overlapping// WiFi 2.4Ghz channels: 1, 6 and 11. These are the only ones that can be used totally free of respective interference. All ZigBee channels (11-26, which are __not__ the same as the WiFi ones, despite having similar numbers) do overlap with at least one WiFi channel, and often with more than one. 
- 
-So, pick two WiFi channels (ex 1 and 6, or 6 and 11, or 1 and 11) and choose your ZigBee channel do overlap with the channel you **do not** use.  
- 
-Please take into consideration your neighbors as well, as they might have an overlapping WiFi. 
- 
-There is no golden solution, i am afraid, try to play around.  
- 
-If possible, choose ZigBee channel 11(the first one) or 24 (channels 25 and 26 might not be supported by all devices). 
- 
-See the following overlapping map. Blue is the WiFi channel 1, green is the WiFi channel 6 and yellow is the WiFi channel 11, the smaller ones are all the ZigBee channels: 
- 
- 
-{{:homeautomation:zigbee_channels.png?nolink&800|}} 
- 
-==== Home Assistant ==== 
- 
-Home Assistant provides at least two different implementations for ZigBee. The main one, which i am using, is called [[https://www.home-assistant.io/integrations/zha|ZHA]], or ZigBee Home Automation. 
- 
-You need to install it from the add-ons page in your Home Assistent installation, then you can start activating your ZigBee devices and pair them, one at a time. 
- 
-=== Pairing === 
- 
-Each ZigBee device usually has a way to start pairing, you should refer to each device manual. Usually either you power it up, or you long-press a button to start pairing mode.  
- 
-When pairing mode is active, head to Home Assistant ZHA device page (under settings) and tap the **add device** floating button in the corner. 
- 
-At this point, each new ZigBee device should popup and you can assign a name and a zone to it. I strongly recomend you start pairing one a time and not more than one device simoutaneously or things can get messy. 
- 
-=== Grouping === 
- 
-ZHA let's you group devices together, which can be nice to issue common commands and even reduce your ZigBee network load. 
- 
-=== Graphical view === 
- 
-ZHA provides a nice graph view to visualize your ZigBee Mesh network. From this view, you can appreciate how your ZRs are partecipating in the mesh and you can use it to understand where and how to add ZRs or move devices around for a more logical mesh distribution. 
- 
- 
-=== Usage === 
- 
-After the device is paired, it will appear as a new Home Assistant device and it will expose one or more entities that you can start using immediately. Each devie type and brand will expose different entities and behaviours. Most of them, if battery powered, will also report the battery level, which is very handy to replace them before they dies. 
- 
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information