How to Build a Solid Zigbee Mesh

From Hubitat Documentation
Revision as of 00:03, 20 March 2019 by Doug (talk | contribs) (32 or less battery powered Zigbee devices)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to Build Your Zigbee Mesh (or Keeping your Zigbee Mesh Happy)

If you use Zigbee devices, your Zigbee mesh is the backbone of your home automations. This mesh network is the way Zigbee devices communicate with each other and with the Hubitat Elevation™ hub. Zigbee devices build this communication mesh automatically, but it is not instantaneous. You MUST give your Zigbee mesh time to establish itself BEFORE automating your Zigbee devices. Automating devices too quickly can lead to frustration due to dropped devices and other issues down the road. It may take several days for your Zigbee mesh to automatically find the optimal routing, however if you power down your hub for 20 minutes, you can expedite the process of re-building the wireless mesh.

To maintain a successful communication, all Zigbee devices must be accessible. Adding devices near the Hubitat Elevation™ hub, then moving them to their final location may lead to dropped device and other issues down the road. Therefore, it is recommended to always pair your devices in their final, intended location. Although the hub can support up to 32 directly connected devices, one or more Zigbee repeating devices will help strengthen the ability of your devices to maintain communication with the hub. Your environment, the distance to the furthest device, obstructions and device performance will determine the number of repeating devices required. A Zigbee repeating device is one that is plugged into an outlet or powered by mains voltages. Battery powered Zigbee devices do not repeat signals. They are known as end devices, whereas Zigbee repeating devices are routers.

Follow these procedures when discovering your Zigbee devices to establish a strong Zigbee network. Please be patient, as it is key to success.

32 or less battery powered Zigbee devices

  1. Pair your Zigbee devices one at a time. See Discovering you Devices for detail instructions on adding devices to your Hubitat Elevation™ hub.
  2. The distance to your hub, building materials, metal objects and obstructions, as well as the performance of the end devices will determine the maximum distance possible without losing communication with the hub.

32 or more Zigbee devices

Hubitat Elevation™ can support up to 32 end devices (devices connected directly to the hub without the help of a repeating device). Beyond 32 battery powered or non-repeating end devices, you must add mains powered repeating devices. A Zigbee repeating device is one that is plugged into an outlet or powered by mains voltages. Battery powered Zigbee devices do not repeat signals. End devices only communicate with a parent device, which could be the hub or it could be a repeater. Zigbee repeating devices (Routers) communicate with both the hub and End devices. Your environment, distance to the furthest device from the hub, and the range of the Zigbee repeating devices will determine the correct number of repeating devices required. Unlike Z-Wave, there is no limit to the number of Zigbee devices that can be added to your network, as long as there are an adequate number of repeating devices and they are properly distanced from each other.

  1. Pair your Zigbee repeating devices one at a time. See Discovering your Devices for detail instructions on adding devices to your Hubitat Elevation™ hub.
  2. Now pair your Zigbee battery powered devices one at a time, in their intended location, within range of either the hub or a Zigbee router. See Discovering your Devices for detail instructions on adding devices to your Hubitat Elevation™ hub.
  3. When all of your devices have been added, power down your hub for 20 minutes. After booting Hubitat Elevation™ again, your Zigbee mesh will automatically choose the best route for your devices within approximately a 24 hour period. Alternatively, you can wait several days for the Zigbee mesh to establish the best path for communication between the hub and your devices by itself.

How Zigbee Repeaters (Routers) Work

A Zigbee repeater or router, is a messenger that relays information, until the messages between end devices and the hub have reached one another.

Zigbee repeaters may be any device that will always powered by mains voltages, but should not included a Zigbee lightbulb. A Zigbee outlet is an example of a repeater acting as a relay point for devices that are too far from the hub to reliably send and receive signals. ZigBee and Z-Wave are two different wireless protocols, therefore a mains powered ZigBee device can only function as a repeater for other ZigBee devices, and Z-Wave devices only act as repeaters for other Z-Wave devices.

Devices too far from the hub or obstructions will result in dropped connections from weak Zigbee signals.

Weak Zigbee or Z-Wave signal.png

When a repeater is placed between the device and your Hubitat Elevation™ hub, the device communicates with the repeater and the repeater communicates with your hub, significantly improving performance and reliability.

Repeating signals.png

Repeaters can communicate with other repeaters, to form a strong and resilient Zigbee mesh network

Multiple repeaters.png

Non-repeating battery-powered devices must always have a parent to talk to, either Hubitat Elevation™ or mains powered repeating devices. When the device first joins the network, it will choose a parent that provides the strongest Zigbee signal. Once a device chooses its parent, it will hold on until it absolutely cannot communicate with it, even if a different parent with a stronger signal is introduced into the network. Only when the device can no longer effectively communicate with its original parent device, will it then select a new parent. However, if the device can still occasionally communicate with the hub, it will not select a new parent repeater..

For ZigBee devices, communication must worsen before it will automatically heal. Devices must completely lose communication with their parent before they will seek a new one. To put this process in motion, you simply shut down the hub for 20 minutes. When Hubitat Elevation™ boots, routers and the end devices will re-establish an optimal path for communication with each another. Allow up to 24 hours for this process complete.

Tips for designing your Zigbee mesh

Although a Zigbee mesh will automatically establish the optimal path for devices to communicate with your hub over time, there are some design recommendations you should follow to optimize the network and achieve the best possible results.

  1. Locate your hub as central to your home as possible. This will allow signals to spread around your house with minimal obstructions between your hub, any routing devices, and your end devices. Avoid the corners of your home, basements, garages or locations with substantial concrete, pipes and other large metallic objects that may cause signal interference. If your router is in a corner of your home, take steps to get your Hubitat Elevation™ hub centrally located in your home, using either a long Ethernet cable or Powerline Ethernet adapters to convert your homes electrical wiring into a communication path for Ethernet devices.
  2. The actual maximum distance between your Hubitat Elevation™ hub and connected Zigbee devices will vary based on your environment, the end devices themselves, and the strength of your Zigbee routing devices. On average you can expect between 20 to 40 feet (6 to 12 meters) maximum distance before a repeating device is required to relay signals between the hub and the end device. Repeaters are best placed between the distances you need to bridge, whether it is the end device or another repeater.
  3. When installing several devices, install Zigbee repeaters first, beginning closest to the hub and working outward, so other devices will be able to use them to reach the hub. Once the Zigbee routers are installed, add your battery powered Zigbee end devices.
  4. Avoid adding Zigbee lightbulbs to your hub in combination with other Zigbee devices, since the lightbulbs will try to act as routers, but unfortunately they only perform this role properly with other lightbulbs. The exception we have found are Sengled Zigbee lightbulbs, which do not try to take on the role of repeating other Zigbee devices. Zigbee light bulbs do not have issues routing among themselves, therefore a good alternative is a separate Zigbee network via a compatible bridge such as the Philips Hub Bridge, or a second Hubitat Elevation hub with only Zigbee lightbulbs paired to it. This will avoid this issue of bulbs attempting, and subsequently failing to repeat signals for other devices, by establishing two separate and stable Zigbee networks. NOTE: Devices on a separate Zigbee network cannot repeat signals for devices on the main Zigbee network.
  5. Zigbee is designed to coexist with WiFi, as long as both devices properly implement Clear Channel Assessment mode. Prior to transmitting a packet, the device performs CCA on the channel to determine if it is available. The detected energy on the channel is compared with the CCA parameter value to determine if the detected energy exceeds the CCA parameter value, and does not transmit the packet if it does. However, it is recommended to select a location for you Hubitat Elevation™ that is at least 10 feet (approximately 3 meters) from your WiFi router wherever possible.
  6. Building construction and materials can alter the Zigbee signal and its ability to penetrate obstructions, thus making the effective range shorter. Signals may pass easily from one side to the other of a room where there aren't any obstructions, but a single wall, depending largely on its construction, could significantly weaken a signal. Changing device location or adding repeaters can significantly improve this situation.