October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Bettesworth Construction
Home Assistant

How I Turned My Raspberry Pi Into a Zigbee Hub and Made My Smart Home Better

A Raspberry Pi needs a separate Zigbee coordinator to control smart-home devices. Here is the practical Home Assistant setup, including ZHA versus Zigbee2MQTT, mesh planning, troubleshooting and recovery.

By Bettesworth Construction Team 9 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: a Raspberry Pi cannot become a Zigbee hub through software alone. It needs a separate Zigbee coordinator, usually a USB adapter. My practical setup is a Raspberry Pi 4 or 5 running Home Assistant OS, connected to a compatible coordinator such as the SONOFF ZBDongle-E.

The result is one locally managed system for lights, switches, sensors and plugs from different manufacturers. Local automations continue working during an internet outage, while the main reliability gains come from correct radio placement, a good Zigbee mesh, suitable devices and reliable backups—not simply from using a faster Raspberry Pi.

As an Amazon Associate I earn from qualifying purchases.

Why I changed my smart-home setup

My old arrangement had the usual weaknesses: separate manufacturer hubs, several phone apps, cloud-dependent routines and no single view of battery levels or device status. A routine that should have switched on a light could be delayed by an internet connection or fail when a vendor service was unavailable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Home Assistant gave me one dashboard and one automation engine. Zigbee devices could communicate locally with the coordinator, while Home Assistant handled scenes, schedules, notifications and cross-brand logic. That did not make every part of the system cloud-free—voice assistants, remote access, weather data and some notifications can still depend on the internet—but it removed cloud dependence from the core Zigbee controls.

#1 Best Overall
SONOFF Zigbee 3.0 USB Dongle Plus MG24, Zigbee Gateway with EFR32MG24, Thread & Zigbee USB Stick, Zigbee Controller for Home Assistant or Zigbee2MQTT
  • Powerful EFR32MG24 chip. Powered by the advanced EFR32MG24 chip, offering richer resources and higher performance to deliver faster automation processing and stable sub-device control.
  • Enhanced Antenna Gain. Default 3dBi antenna gain, optimized up to 4.5dBi for stronger signal strength and wider coverage, ensures a reliable device connection.
  • Wide platform compatibility. Zigbee Dongle works with Home Assistant, Zigbee2MQTT, openHAB and supports Zigbee 3.0 devices such as Philips Hue, Aqara, IKEA Tradfri and SONOFF.
  • Flexible firmware flashing. Firmware can be easily flashed via the SONOFF dongle flasher or Add-on to switch between Zigbee coordinator, router or Thread RCP mode.
  • Compact design with USB extension cable. Smaller enclosure with USB extension cable allows flexible placement and reduces electromagnetic interference for stable communication.

The important distinction: the Pi is not the Zigbee radio

The Raspberry Pi is the host computer. It supplies processing, storage, networking and the software platform. The USB dongle or other radio adapter is the Zigbee coordinator, the device that creates and manages the Zigbee network.

  • Coordinator: creates and controls one Zigbee network. A Zigbee device can belong to only one network at a time.
  • Router: normally a mains-powered device that relays messages and extends the mesh.
  • End device: commonly a battery-powered sensor or remote that sleeps to conserve power.

Adding more mains-powered routers usually improves coverage and capacity, although a poor-quality or incompatible router can cause problems. Home Assistant explains these roles and mesh requirements in its ZHA documentation.

What I used

  • Raspberry Pi 4 or 5
  • Appropriately rated power supply
  • High-quality microSD card, or an SSD for heavier workloads
  • Ethernet connection
  • Compatible Zigbee coordinator
  • USB extension cable
  • Home Assistant OS
  • Mains-powered Zigbee router devices for areas beyond direct coordinator range

A Pi 4 is sufficient for a normal Home Assistant and Zigbee installation. A Pi 5 provides more headroom for cameras, databases, voice processing and other add-ons, but it does not automatically improve Zigbee range or reliability. The Pi 5 requires suitable 5V/5A USB-C power; its current specifications are in the official product brief.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a new installation I would choose a Pi 4 or 5 rather than a Pi 3. Zigbee2MQTT’s current Home Assistant add-on guidance recommends at least a Pi 4 and warns that a Pi 3 may be unstable. Pi Zero-class hardware should not be treated as a general-purpose Home Assistant recommendation without checking the exact installation and workload.

Choosing the coordinator

I used the SONOFF ZBDongle-E as a practical example because SONOFF lists it as pre-flashed, compatible with Home Assistant and Zigbee2MQTT, and based on the EFR32MG21 chipset. It is one suitable option, not a universal winner.

When choosing an adapter, I check:

  • Current support in ZHA or Zigbee2MQTT
  • Available coordinator firmware
  • Backup and migration support
  • Antenna and USB interference considerations
  • Whether it is pre-flashed
  • Local availability and warranty
  • Whether I need Zigbee only or also want to experiment with Thread and Matter

Home Assistant lists compatible adapters in its ZHA documentation. Zigbee2MQTT documents supported adapter families in its adapter guide. That guide also notes that coordinator backups are currently supported by zStack and EmberZNet adapters, while changing adapter families may still require repairing devices.

ZHA or Zigbee2MQTT?

Choose ZHA when you want Choose Zigbee2MQTT when you want
Fewer moving parts More advanced device and network controls
A Home Assistant-native setup MQTT-based interoperability
No separate MQTT broker Access to Zigbee2MQTT converters and device-specific controls
Simple pairing and maintenance The option of a network-attached coordinator

My recommendation for a first build is ZHA. It is built into Home Assistant and avoids adding an MQTT broker and another service to maintain. ZHA creates a Zigbee network after a compatible coordinator is configured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Zigbee2MQTT is a strong alternative when device compatibility, detailed configuration or a separate Zigbee service matters more than simplicity. It requires an MQTT broker, commonly Mosquitto. Its Home Assistant add-on instructions describe the current installation route.

Rank #2
Sonoff Zigbee USB Dongle Plus-ZBDongle-E 3.0 External Antenna Interface SMA Gateway Universal, Pre-Installed with Zigbee Firmware Based on EZNet 6.10.3 Coordinated Home Assistant or Zigbee2MQTT
  • Pre-flashed with Zigbee coordinator firmware based on EZNet 6.10.3 out of box
  • Support smart home platforms like Home Assistant, openHAB, Zigbee2MQTT and so on
  • Based on EFR32MG21
  • +20dBm output gain
  • Aluminum housing effectively reduces signal interference from peripherals

Do not run ZHA and Zigbee2MQTT against the same coordinator. They are separate controllers. Both can exist on one host only if they use different adapters and separate networks, which is rarely worthwhile for a beginner.

Installing Home Assistant OS

  1. Download the current Home Assistant OS image for the exact Raspberry Pi model from the Raspberry Pi installation page.
  2. Write the image to a microSD card or supported boot device with Raspberry Pi Imager or another supported tool.
  3. Insert the storage into the Pi, connect Ethernet and attach power.
  4. Open the current local Home Assistant onboarding address from another computer or phone.
  5. Create the administrator account and set the location, time zone, units and currency.

Home Assistant recommends Home Assistant OS for most users because it provides the appliance-like operating system and supports apps/add-ons. A durable microSD card is suitable for a modest system; an SSD is preferable for heavy history retention, cameras or frequent writes. USB SSDs can draw substantial power, so use an adequate supply or powered hub if instability appears. Keep backups somewhere other than the Pi’s local storage.

Connecting the coordinator correctly

I connected the coordinator through a USB extension cable rather than plugging it directly beside the Pi. I kept it away from USB 3 devices, Wi-Fi access points, metal cabinets and other sources of radio or electromagnetic interference. The antenna should be in an open position, ideally fairly central to the home.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SONOFF recommends an extension cable for this reason. Zigbee2MQTT generally prefers a locally connected USB/UART/GPIO adapter, or a wired Ethernet coordinator where the radio needs to be placed elsewhere. Wi-Fi serial adapters are not the default choice because latency and packet loss can reduce stability.

Setting up ZHA

  1. Open Settings.
  2. Select Devices & services.
  3. Choose Add integration.
  4. Search for Zigbee Home Automation.
  5. Select the detected coordinator, or choose the appropriate radio type and serial device.
  6. Complete setup and open the Zigbee integration.
  7. Choose the current device-pairing control, such as Add device.
  8. Put the Zigbee device into pairing mode.
  9. Give it a stable name and assign it to an area.

If the coordinator is not detected, check its cable, power, firmware and device path. Make sure another integration or add-on is not already using the serial device. Home Assistant’s ZHA documentation is the current reference for supported radios and troubleshooting.

Pairing devices and building a stable mesh

I factory-reset each device according to its manufacturer’s instructions before pairing it. I paired it close to the coordinator when necessary, then tested it in its final location. For every device I recorded the manufacturer, model, firmware and intended role.

Battery devices may need time to wake and complete their interview. A device can pair successfully yet expose incomplete entities if it uses manufacturer-specific behavior. Home Assistant notes that standards compliance does not guarantee every feature will be available; quirks, firmware and non-standard clusters can affect the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The coordinator does not need to reach every device directly. Good router candidates include mains-powered plugs, permanently powered lights and suitable in-wall switches. I placed routers between the coordinator and weak areas rather than concentrating them in one room. I did not assume that every mains-powered Zigbee product was a reliable router.

Rank #3
SONOFF Zigbee 3.0 & Thread Dongle Lite (EFR32MG21) | USB Stick Coordinator for Home Assistant & Zigbee2MQTT | Compact Gateway with Easy Firmware Flashing & Extension Cable
  • Reliable EFR32MG21 chip. Built with the proven EFR32MG21 chipset, this USB dongle offers low-latency communication and excellent compatibility with Zigbee 3.0 devices—ideal for building a dependable smart-home network.
  • Compact & Easy to Install. The lightweight, compact design fits conveniently in crowded USB ports on PCs, mini-servers, or Raspberry Pi, making it suitable for any smart-home setup.
  • Wide platform compatibility. Fully compatible with Home Assistant, Zigbee2MQTT, openHAB, and more. Supports a wide range of Zigbee 3.0 brands, including Philips Hue, Aqara, IKEA Tradfri, and SONOFF, enabling flexible device integration.
  • Flexible firmware flashing. Switch easily between Zigbee Coordinator, Router mode, or Thread RCP by flashing firmware through the SONOFF Dongle Flasher or official Add-on tools.
  • Includes USB extension cable. Comes with a USB extension cable to help position the dongle away from USB 3.0 interference sources, improving signal strength and ensuring more stable Zigbee and Thread network performance.

Planning the Zigbee channel

Zigbee shares the 2.4GHz band with Wi-Fi. The best channel depends on the local Wi-Fi channel, neighbouring networks, building materials and the devices in use. I treated channel selection as an installation decision, not a magic setting that is always best.

Choose the channel before pairing a large network and consult the current guidance for the stack you select. Changing it later may require reconfiguration or expose compatibility problems. Do not treat a manufacturer’s mention of particular channels for a specific use case as a universal recommendation for every home.

The automations that made the biggest difference

  • A motion sensor switches on hallway lighting after sunset.
  • A door sensor sends a notification and turns off a light or HVAC device.
  • One button controls lights from different manufacturers.
  • A bedside button turns off multiple rooms at once.
  • A leak sensor triggers a local safety action and a phone alert.

Local Zigbee and Home Assistant actions can continue during an internet outage. Remote notifications, cloud voice assistants, weather services and other external integrations may not. I therefore treat internet-independent lighting and safety routines as local automations, not as proof that every connected service is cloud-free.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What went wrong and how I fixed it

The dongle was not detected

  • Checked the USB cable, extension and power supply
  • Confirmed that the adapter had suitable coordinator firmware
  • Checked the stable device path rather than assuming a path such as /dev/ttyUSB0
  • Restarted Home Assistant after attaching the coordinator
  • Made sure no other integration had the serial device open
  • Moved the adapter away from USB 3 equipment

Devices paired only near the Pi

This usually indicates poor placement, too few routers, interference, unsuitable building materials or a weak device rather than an underpowered Raspberry Pi. I used the extension cable first, then added a known-good mains-powered router and tested again from the final location.

A device paired but lacked features

I checked that it had been factory-reset, confirmed that it was genuinely Zigbee, reviewed firmware and looked for stack-specific support. Some devices still need their proprietary hub for unusual features or firmware updates. Pairing success is not the same as complete compatibility.

The network became unreliable

I investigated router placement, interference, channel selection, coordinator position, firmware and excessive polling of battery devices. I also checked that I had not accidentally configured two Zigbee controllers on overlapping networks. Published device limits are not guarantees of reliable performance; practical capacity depends on router structure, traffic, firmware and device behaviour.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

The Zigbee2MQTT alternative

If I chose Zigbee2MQTT instead, the high-level sequence would be:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Install and start the Mosquitto broker app.
  2. Add the official Zigbee2MQTT repository if needed.
  3. Install Zigbee2MQTT.
  4. Select the coordinator family and stable serial device path.
  5. Set the Zigbee channel and MQTT connection details.
  6. Start Zigbee2MQTT and open its web interface.
  7. Permit joining and pair devices.
  8. Connect the MQTT entities to Home Assistant.

The official Zigbee2MQTT Home Assistant repository and getting-started guide should be used for current labels and configuration. Avoid publishing a universal serial path because USB enumeration can change.

Rank #4
Sale
SONOFF Zigbee 3.0 USB Dongle Plus Gateway, Universal Zigbee USB Gateway with Antenna for Home Assistant, IoBroker, Wireless Zigbee 3.0 USB Adapter(1 Pack)
  • Pre-flashed with Z-Stack 3.x.0 coordinator firmware
  • Can use ZHA in Home Assistant or use Zigbee2MQTT
  • Base on TI CC2652P + CP2102N
  • +20dBm output gain
  • SMA interface external antenna,Aluminum housing effectively reduces signal interference from peripherals

Backups and recovery

The Pi becomes a single point of failure, so I enabled scheduled Home Assistant backups and stored copies away from the Pi. I also recorded the coordinator model, firmware, Zigbee channel and network settings.

Home Assistant’s OS documentation includes commands such as:

ha backups list
ha backups new --name nameofbackup
ha backups restore slugname

A practical recovery kit includes an emergency backup, spare storage where possible, the coordinator details and a documented replacement-Pi procedure. Changing coordinators may require repairing some or all devices. Migration and coordinator-backup support depend on the adapter family, firmware, stack and network state.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security and maintenance

  • Do not expose Home Assistant directly to the internet.
  • Use strong, unique credentials and multi-factor authentication where supported.
  • Keep Home Assistant, add-ons, coordinator firmware and device firmware maintained.
  • Protect MQTT credentials and backup files.
  • Use a properly secured remote-access method.
  • Remember that local Zigbee control does not make cloud voice assistants or external integrations private.

Is the Raspberry Pi approach worthwhile?

If I already owned a Pi 4 or 5, yes. Adding a compatible coordinator is a practical way to consolidate brands, reduce cloud dependence and build richer local automations.

If I were buying everything new, I would compare the complete cost: host, power supply, storage, case or cooling, coordinator and extension cable. A Home Assistant Green may be simpler for someone who wants an appliance-like installation. Home Assistant Yellow or a suitable Ethernet coordinator may be preferable when integrated hardware or central radio placement matters. A proprietary hub remains sensible for a single-brand household that values guaranteed vendor support over cross-brand flexibility.

For a large home, several floors or a server located in a poor radio position, an Ethernet coordinator can be worth the extra cost. Zigbee2MQTT’s adapter guidance favours wired Ethernet over Wi-Fi serial links when a remote coordinator is needed.

The project is worthwhile when local control, cross-brand automation and customisation matter. It is less attractive when the priority is zero maintenance, a guaranteed device catalogue or plug-and-play support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Site Office

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.