SONOFF Zigbee Devices Work with Home Assistant

Home Assistant is an open-source home automation that puts local control and privacy first and is designed to be a central control system for smart home devices. You can use a Zigbee coordinator to turn your Home Assistant instance into a replacement for your Zigbee hub, then pair all your SONOFF Zigbee devices so that Home Assistant can talk directly to SONOFF Zigbee devices. There are two main methods for doing this in Home Assistant, ZHA (built into Home Assistant) or Zigbee2MQTT (third-party add-on). Let’s follow the official tutorial to walk you through those steps.

Choose a Good Zigbee Coordinator – ZBDongle-E Or ZBDongle-P

In Home Assistant, Zigbee hubs are referred to as coordinators. Even though they are not the same piece of hardware, they carry out the same function. A Zigbee coordinator is the central device in a Zigbee network that controls and manages communication between other Zigbee devices, such as sensors, switches, and other smart home devices.
For a stable and solidified Zigbee network, you need a good coordinator. SONOFF ZBDongle-P and ZBDongle-E could be the best Zigbee coordinators for Home Assistant currently on the market, please check the difference between ZBDongle-P and ZBDongle-E, you can choose the right one according to your needs.

Flash ZBDongle-p with the Router Firmware

ZBDongle-E on EFR32MG21 vs. ZBDongle-P on CC2652P

Two Ways to Connect SONOFF Zigbee Devices to Home Assistant

Once you have your Home Assistant server running with a Zigbee dongle on a USB extension cable, you can pick your Zigbee integration for Home Assistant. Essentially, you have 2 options:

Integrate SONOFF Zigbee Devices with Home Assistant via ZBDongle-E/P through ZHA

The ZHA (Zigbee Home Automation) is a built-in integration in Home Assistant that allows users to connect to Zigbee devices through a Zigbee dongle. It is a more streamlined option that does not require an additional device or software, as it is already built into the Home Assistant platform.

1. Precondition
A Raspberry Pi with Home Assistant installed: Connect your computer to the same Wi-Fi as the Raspberry Pi and enter the address(homeassistant.local:8123)into your browser to open the Hass page. Raspberry Pi (Linux) is recommended, if you use Windows or macOS, you need to run Home Assistant under a Linux virtual machine. If you want to communicate directly with the dongle on Windows or macOS, you need to install the driver first.

Install Driver:

ZBDongle-P: Windows: CP210x_Windows_Drivers_with_Serial_Enumeration

ZBDongle-E: Windows: CH343SER  macOS: ch34xser_macos-main

2. SONOFF Zigbee 3.0 USB Dongle Plus Setup

As the “Product Description String” of the dongle plus has been customed to a unique identifier “Sonoff Zigbee 3.0 USB Dongle Plus”, which has been also added to Home Assistant’s whitelist of auto-discovered devices, the configuration of the dongle in Hass can be very simple. Just plug the dongle into your computer, it will be automatically discovered.

*Note: If your dongle can’t be auto-discovered, it may be because your version of Hass hasn’t integrated this feature yet, you can follow the normal configuration steps below.

3. Set Up Zigbee Intergration Via ZHA

Go to Configuration, Integrations, and click on the “+” plus icon to Add ZHA, click on the drop-down to choose”/dev/ttyUSB0-CP2102N USB to UART Bridge Controller s/n…” on the pop-up, The Zigbee Dongle Plus ZBDongle-P/ZBDongle-E should come up as an available option to select.Click on Submit, and the integration should identify the type of radio the gateway is using. If it’s not detected, a pop-up will come up for you to select the radio type.for ZBDongle-P, you would choose “ZNP”, and “EZSP” for ZBDongle-E, and then enter port specific setting, for ZBDongle-P, don’t need to choose for data flow control, just click next, for ZBDongle-E, just select “software flow control”.

4. Add SONOFF Zigbee devices to Zigbee Dongle Plus on HA

To add a new Zigbee device, you first need to put it into pairing mode, Once you have your device in pairing mode, click Configure under the ZHA integration. Then click “Add Device”, and the integration starts searching for new devices. When a device is discovered, it’s also paired and automatically added to Home Assistant. Under the Zigbee Network, you can check the devices that you have paired.

*Learn More about ZHA

Step-by-step Video Instruction

Integrate SONOFF Zigbee Device with Home Assistant via ZBDongle-E/P through ZHA

1. Precondition

A Raspberry Pi with Home Assistant installed: Connect your computer to the same Wi-Fi as the Raspberry Pi and enter the address(homeassistant.local:8123)into your browser to open the Hass page. Raspberry Pi (Linux) is recommended, if you use Windows or macOS, you need to run Home Assistant under a Linux virtual machine. If you want to communicate directly with the dongle on Windows or macOS, you need to install the driver first.

Install Driver:

ZBDongle-P: Windows: CP210x_Windows_Drivers_with_Serial_Enumeration

ZBDongle-E: Windows: CH343SER macOS: ch34xser_macos-main

2. SONOFF Zigbee 3.0 USB Dongle Plus Setup

As the “Product Description String” of the dongle plus has been customed to a unique identifier “Sonoff Zigbee 3.0 USB Dongle Plus”, which has been also added to Home Assistant’s whitelist of auto-discovered devices, the configuration of the dongle in Hass can be very simple. Just plug the dongle into your computer, it will be automatically discovered.

*Note: If your dongle can’t be auto-discovered, it may be because your version of Hass hasn’t integrated this feature yet, you can follow the normal configuration steps below.

3. Set Up Zigbee Intergration Via ZHA

Go to Configuration, Integrations, and click on the “+” plus icon to Add ZHA, click on the drop-down to choose”/dev/ttyUSB0-CP2102N USB to UART Bridge Controller s/n…” on the pop-up, The Zigbee Dongle Plus ZBDongle-P/ZBDongle-E should come up as an available option to select.Click on Submit, and the integration should identify the type of radio the gateway is using. If it’s not detected, a pop-up will come up for you to select the radio type.for ZBDongle-P, you would choose “ZNP”, and “EZSP” for ZBDongle-E, and then enter port specific setting, for ZBDongle-P, don’t need to choose for data flow control, just click next, for ZBDongle-E, just select “software flow control”.

4. Add SONOFF Zigbee devices to Zigbee Dongle Plus on HA

To add a new Zigbee device, you first need to put it into pairing mode, Once you have your device in pairing mode, click Configure under the ZHA integration. Then click “Add Device”, and the integration starts searching for new devices. When a device is discovered, it’s also paired and automatically added to Home Assistant. Under the Zigbee Network, you can check the devices that you have paired.

*Learn More about ZHA

Step-by-step Video Instruction

Integrate SONOFF Zigbee Devices with Home Assistant via ZBDongle-E/P through Zigbee2MQTT

Zigbee2MQTT is open-source software that runs on a small device like a Raspberry Pi or a standalone computer. It acts as a bridge between Zigbee devices and home automation systems by communicating with Zigbee devices via a Zigbee dongle.

1. Install the Zigbee2MQTT Add-on

The first step is you need to create an MQTT user, give the user name MQTT-user and select Allow the person to log in and can only log in from the local network. Plugin the dongle on Raspberry Pi, and use a USB extension cable to connect the dongle to Raspberry Pi. Once you have plugged in, go to Settings > System > Hardware. Click the 3-dot and select All Hardware, find the serial dongle connection, and get the connection details. Go to Settings > Add-ons and click Add-on Store and find the Mosquitto broker. Click Install and Start to start the broker.

Then go to Settings > Add-ons, click Add-on Store, click the 3-dot button and select Repositories. Add https://github.com/zigbee2mqtt/hassio-zigbee2mqtt and click Close. Scroll down to the “Zigbee2MQTT” add-on and click on it. Click on the “Install” button. Wait for the installation to complete.

2. Configure your SONOFF Zigbee devices

Select Configuration tab. On the mqtt section, fill in the information. server: mqtt://core-mosquitto:1883 The user and password are the credential you created earlier. On the serial section, fill in the serial dongle connection details which you get earlier. Click Save. Go to Info tab, click Start and select Show in sidebar. Go to Log tab to verify the result and check if there is any error.

3. Pair your SONOFF Zigbee devices

In the sidebar, go to Zigbee2MQTT and select Permit join (All). Put your SONOFF Zigbee device in pairing mode. Wait for seconds. If successfully paired, you will see the list of devices there.

4. Control your SONOFF Zigbee devices

Click on the “Dashboard” tab in the sidebar. Find your SONOFF Zigbee device in the list of devices. Click on the device to open its control panel.

Use the controls to turn the device on or off, adjust its settings, or perform other actions.

*Learn More about Zigbee2MQTT

Step-by-step Video Instruction

Integrate SONOFF Zigbee Device with Home Assistant via ZBDongle-E/P through Zigbee2MQTT

1. Install the Zigbee2MQTT Add-on

The first step is you need to create an MQTT user, give the user name MQTT-user and select Allow the person to log in and can only log in from the local network. Plugin the dongle on Raspberry Pi, and use a USB extension cable to connect the dongle to Raspberry Pi. Once you have plugged in, go to Settings > System > Hardware. Click the 3-dot and select All Hardware, find the serial dongle connection, and get the connection details. Go to Settings > Add-ons and click Add-on Store and find the Mosquitto broker. Click Install and Start to start the broker.

Then go to Settings > Add-ons, click Add-on Store, click the 3-dot button and select Repositories. Add https://github.com/zigbee2mqtt/hassio-zigbee2mqtt and click Close. Scroll down to the “Zigbee2MQTT” add-on and click on it. Click on the “Install” button. Wait for the installation to complete.

2. Configure your SONOFF Zigbee devices

Select Configuration tab. On the mqtt section, fill in the information. server: mqtt://core-mosquitto:1883 The user and password are the credential you created earlier. On the serial section, fill in the serial dongle connection details which you get earlier. Click Save. Go to Info tab, click Start and select Show in sidebar. Go to Log tab to verify the result and check if there is any error.

3. Pair your SONOFF Zigbee devices

In the sidebar, go to Zigbee2MQTT and select Permit join (All). Put your SONOFF Zigbee device in pairing mode. Wait for seconds. If successfully paired, you will see the list of devices there.

4. Control your SONOFF Zigbee devices

Click on the “Dashboard” tab in the sidebar. Find your SONOFF Zigbee device in the list of devices. Click on the device to open its control panel.

Use the controls to turn the device on or off, adjust its settings, or perform other actions.

*Learn More about Zigbee2MQTT

Step-by-step Video Instruction

Supported Zigbee Devices

Special Offer

FAQ

1.Can I pair other brand of zigbee sub-device with this zigbee usb dongle?

Yes, you can pair to 50 direct children, and up to 200 children via the router, flash the latest firmware by yourself. You can download the firmware tool on the platform if needed.

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator

2.Do I need a separate hub to use SONOFF ZBDongle-E/P with Home Assistant?

No, you don’t need a separate hub to use SONOFF ZBDongle-E/P with Home Assistant. The dongle acts as a coordinator and enables your computer or Raspberry Pi to communicate directly with your Zigbee devices.

3.Can I use the ZBDonlge-P/E as a Zigbee router and how to flash the firmware?

Yes, you have to flash the router firmware by yourself refer to the below tutorial documentation.
https://sonoff.tech/wp-content/uploads/2023/02/SONOFF-Zigbee-3.0-USB-dongle-plus-firmware-flashing.pdf

For ZBDongle-P router firmware link:
https://github.com/Koenkk/Z-Stack-firmware/tree/master/router/Z-Stack_3.x.0/bin
For the ZBDongle-E router firmware link:
https://github.com/itead/Sonoff_Zigbee_Dongle_Firmware/tree/master/Dongle-E/Router

Here is a tutorial made by our collaboration KOL:
https://www.youtube.com/watch?v=4usy1ESI4k4

4. What should be filled in the Baud Rate when configuring Dongle?

115200

5. I want to flash the Dongle firmware, what tool should I use?

Dongle-P: SmartRF Flash Programmer
Dongle-E: Any serial communication tool that supports sending Xmodem, such as SecureCRT