Posted on 8 Comments

#35: Sonoff BasicZBR3: Zigbee, not WiFi!

Every single Sonoff model has used the Espressif ESP8266 / ESP8285 processor – until now.

But now ITEAD has gone in a different direction, and released the Sonoff BasicZBR3 which drops WiFi entirely in favour of Zigbee. It doesn’t even use an Espressif processor: instead it uses a Texas Instruments CC2530, which is based on the 40-year-old Intel 8051 processor architecture.

What is Zigbee, and how does it compare to WiFi? Is the Sonoff BasicZBR3 any good?

Let’s find out!

https://youtu.be/yFwJAQFndEo

Resources

Zigbee basics

Zigbee is a wireless communications system that’s similar to WiFi in some ways, but they are optimised for very different purposes. They both use the 2.4GHz unlicensed ISM band, and they’re both based on standards managed by the IEEE: 802.11 for WiFi, 802.15.4 for Zigbee.

WiFi is optimised for devices with plenty of power available, and that also require very high throughput. It provides bandwidth in the region of hundreds of Mbps. Perfect for laptops, smartphones, tablets, and security cameras.

Zigbee is optimised for devices that need to run at extremely low power for a long time, and that don’t need to transfer much data. It provides bandwidth of 250kbps, so only about 1/1000th as much as WiFi. It’s suited to tiny devices that need to run on a coin cell for several years, and only pass small amounts of data. Great for temperature sensors and similar IoT devices that only need to send tiny amounts of data every few minutes.

Star topology vs mesh topology

WiFi uses a star topology, with each client device connecting directly to an access point. All communication is arbitrated through the access points, and end devices don’t talk to each other directly. The access points are linked together using some sort of backhaul, usually wired Ethernet. With this topology, you need enough access points to provide coverage of the entire area where you will be deploying devices:

Zigbee is much more flexible in its topology. It can be operated as a simple star just like WiFi, but it can also operate as a mesh because some Zigbee devices can act as relays to extend the coverage of the network:

There are three types of Zigbee device.

Zigbee End Devices (ZED) are nodes that only connect to one other device. They can enter a deep sleep mode to go offline when they aren’t sending data, so they can typically operate for 2 years or more from a tiny coin cell. Typical ZEDs include temperature sensors, light switches, and motion detectors. There can be many ZEDs in a typical Zigbee network.

Zigbee Routers (ZR) are nodes that don’t go into sleep mode. They stay awake continually, ready to pass on messages between other Zigbee devices. They are also functional devices in their own right: they include smart power plugs and light globes, because these typically have mains power available and can remain operating indefinitely. They don’t need to go into sleep mode to conserve a battery. With a few ZRs spread across your coverage area, your network can provide connections for many ZEDs.

Zigbee Coordinators (ZC) are the most important type of node. There can only ever be one ZC in each network. It always takes the first network address, and then it assigns addresses to all the other devices in the network as they join. You can think of it as being like the DHCP server in a typical LAN. Usually the ZC will also act as a gateway to other types of network, such as connecting your Zigbee network onto your WiFi network or wired LAN. Many home automation hubs can act as a ZC.

Pairing with Alexa

The Sonoff BasicZBR3 is wired up the same way as other Sonoff models, with active and neutral coming in on the input side on the left, and then going out to the load (such as a lamp) on the right. Follow the instructions provided by ITEAD and the guides in my previous videos to make the connections.

Once the BasicZBR3 is installed, turn on the power. It will begin in pairing mode, ready to join an existing Zigbee network. Startup is very fast, and it will be ready within a second or so.

You will need a home automation hub that can operate as a Zigbee Coordinator, such as an Amazon Echo Plus.

With the BasicZBR3 turned on and in pairing mode, and within range of your Echo, say “Alexa, discover devices.”

Your Echo will tell you that it is looking for new devices, and the BasicZBR3 will flash its output when it is discovered. The Echo will wait for some time in case there are devices that are slow to respond, so you will have to wait a minute before it will report back that it has found your new device.

That’s it, you’re done! You can now control the BasicZBR3 using commands such as “Alexa, turn on the first plug.”

Customisation of the node names can be done through the Alexa app.

CC2530 processor connections

Programming the CC2530 requires power to the device, plus DD (Debug Data), DC (Debug Clock), and Reset.

In the BasicZBR3, the output relay is controlled by I/O pin P0_7, and it reads the tactile switch using pin P1_3:

The BasicZBR3 provides the debug connections for the CC2530 in a handy 5-pin header, so if you want to mess around with the firmware and load your own code into it, these are the connections on the PCB:

If you write any custom firmware for the Sonoff BasicZBR3, please join the forum or Discord server and share your results.

8 thoughts on “#35: Sonoff BasicZBR3: Zigbee, not WiFi!

  1. Excellent!!!

    Could you please find some time to post about “SONOFF IFAN03” also if possible?

    1. I don’t have one of those, sorry. I have more Sonoff models on their way to me, but not one of those 🙁

  2. Is this easily converted to use as a dry contact relay?

  3. Jonathan Oxer, can you check if it is possible to connect external light switch to BasicZBR3? Currently, I’m using Sonoff mini, but want to replace with Zigbee and pair it to Alexa Echo Plus.
    I’ll appreciate your help.

  4. In your youtube episode #35 you mention you will be looking at BRZ3 for offline use.

    I’m really interested in this and I’d love to have more information. When do you plan to release this.

    I’m looking to live off grid with a patchy 4g dongle and a echo plus 2nd gen. I’d like to use the switches to initiate fans ,lights and security in relation to sensors such as pir, humidity and maybe cameras.

    Do you think this is the right path?

    Thanks look forward to the episode.

  5. Any news on the promised “forthcoming” episode on using the Sonoff Zigbee ZBR3 without the internet. Now that it seems the Sonoff Zigbee Bridge can be “tasmotized” and thus brought into Home Assistant, it might be a good time to re-visit Zigbee/Tasmota/Home Assistant as the previous 433MHz devices had pretty poor range.

    1. Hey there,

      Plus one for me too please!

Leave a Reply

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