Zigbee supporting Esp32 module with Arduino

I want to build a custom zigbee device. Does anyone know any esp32 module with Zigbee support ?
better with Arduino...

Has anyone used esp32-c6 or esp32-h2 with Hubitat ?

Zigbee and Openthread Compatibility:

ESP32-C6 and ESP32-H2 have integrated radios for Thread and Zigbee protocols. Additionally, ESP32 C Series is matter certified. ESP32 S and ESP32 C can be used as board routers for thread applications and ESP32 H2 as radio coprocessors making them an ideal choice for Thread, Matter and Zigbee-based projects.

LINK FIXED

Look at this post DIY Zigbee solution.

Think your link is broken....

I use ESP32-H2-DevKit for Matter device development (barf). Haven't tried it w/Zigbee as I don't use zigbee for much of anything (all my in-production sensors are LoRaWAN or zwave).

2 Likes

@ilkeraktuna: I was looking at the ESP32-C6 and hoping to check out the ZigBee portion... but that is still not available yet even on the dev version of the ESP32 boards for the Arduino IDE. Thankfully the rest of the C6 is finally supported (it seems). I have two of these boards just waiting for official support.

Otherwise, I have a number of ESP8266 that I have on WiFi and being controlled by a Hubitat.

@snell , what do you mean by "zigbee support not available" on esp32-c6 ?
According to here:

there is already zigbee support on the dev kit.
I have ordered one.

Zigbee examples are referred here :

  • Official example 1 path: Zigbee -> light_sample -> HA_on_off_switch.
  • Official example 2 path: Zigbee -> light_sample -> HA_on_off_light.

The dev kit definitely has ZigBee but that hardware needs to be able to be used by the code and it seems that portion is still in progress. I also thought you were looking for it with Arduino not Visual Studio.

The ticket for the ZigBee support is still in the open state:

The examples and documentation below, aren't they usable in Arduino ?
I did not check them as I still don't have a board to try.
Well, if they are only VS , then maybe we can try to build on VS.
Isn't that possible ?

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/developing.html

@snell,
the ticket you mentioned is not open.
It was closed 3 weeks ago saying:

Update: Ported 2 simple Zigbee examples from ESP-Zigbee-SDK (esp-idf) #9024.
Creating a wrapper or a library is not planned for now, so after merging the examples we are closing this issue.

Also, there are ported examples, here:

for example:

I think , following these, we can create our own apps.

I saw the examples but the base one I linked (#8807) still has Open and a status of "In Progress". It was just updated to mention the examples they will be including in the examples section.

I will try to see if I can run one of those examples with one of my boards tonight though, to see if it will actually work.

UPDATE:
I just loaded the light bulb on one of my two boards. It loaded without errors... but nothing is happening at all. I have it just a couple feet away from a hub and it is not being detected when I hit Start Zigbee pairing on the hub. I plan on trying more to see if I can get it functional... but right now I have family things to go deal with.

1 Like

@snell that would be wonderful. Please let me know if it works.
Actually I am not sure if we have to install any libraries to make these zigbee examples work.
Any idea ?

the readme here doesn't say anything about installing a library:

but the example code for light bulb has these includes:
#include "esp_zigbee_core.h"
#include "ha/esp_zigbee_ha_standard.h"

Do you know where they are available ?

the examples are not meant to work with Hubitat hub.
actually they are designed to connect to each other. Light switch is the coordinator, Light bulb is the end device.
So if you have 2 boards you can try connecting them together.
Or you can modify the code and add a network join routine...

You do not need to do anything special for the libraries, at least not on mine and I do not have much of any libraries installed.

I was HOPING as an end-device it had been set up as a "normal" ZigBee device that would be recognized... not just using it as a communication protocol between them. I have made drivers for ZigBee devices but I have never done anything involving this side of stuff with Arduino, most of my Arduino code is pretty basic.

So this means I have to get the rest of the ZigBee join done because there is zero value to me to have to set them up any other way... since I know the WiFi side and already have working code to integrate that with my Hubitats.

UPDATE:
Tried a bunch of things to no success. I will see if I come up with any better ideas tomorrow or stumble across any examples I can actually understand better. Not giving up overall though.

Those β€œZigbee” are examples are NOT using the Zigbee Home Automation (ZHA) standard (neither 1.2 nor 3.0). They are just a tech demo. Been there, tried that….

Yup, I figured that out. Just a "using ZigBee as a communication method" not what most people REALLY would want. So my plan is to look for different ones or maybe someone that has a project I can ask for some pointers from. Certainly a nights sleep did not give me any new insight. Oh well... off to work.

1 Like

@ogiewon , @snell
that's too bad. I was hoping to just modify some examples to make my own zigbee device and join the Hubitat hub.
So if this is the case, we must find either other examples or maybe another development environment.

Btw, there is a sdk documentatiom. Maybe we can find methods there for joining a hub.

@ogiewon , @snell : any news ?

this page says :

Zigbee

  • Zigbee 3.0 Home Automation - Supported
  • Zigbee RCP - Supported
  • Zigbee Gateway - Supported
2 Likes

and here are some HA examples:

1 Like

Nice! Looks like Zigbee Home Automation (ZHA) support is finally coming along for the ESP32-C6. I typically wait for support to be added to the Arduino IDE, as that is where I am most comfortable. But, if I have some time, I may try to build one of the ZHA examples using the Espressif IDF.

Thank you for sharing what you've found!

To be honest I got side tracked with other stuff and was not thinking about it much after the previous roadblocks. I will take a look at the new stuff you posted tonight.

UPDATE:
Unfortunately the HA samples are the same ones that have been around for a bit and that I have tried, where one is the end device and the other is the coordinator. They are not using the methods needed to work with Hubitat as they still do not rely on the ZigBee network/mesh. So they definitely have the capability for it... but no examples of how to do it yet. I replied to igrr about it... need to see what they respond with.

UPDATE 2:
Ok, so the examples they gave do supposedly allow connecting to a hub. They just did not say they could in the initial readme. Unfortunately these are not Arduino ones like you are looking for and are meant for the Espressif IDF. I have ZERO familiarity with it... but am trying to build it to at least see for myself. Hello World... Ugh... can't somebody come up with something new by now...

UPDATE 3 (Last for tonight):
I got the On/Off light to work with Hubitat. The example (as is) cannot pair with it at all... It will sit there forever and it will always be showing about Network steering not successful in the IDF's monitor. However, after updating the dependencies listed (all 3 dependencies in the idf_component file are outdated) and completely changing the esp_zb_task per people's work in this issue... it now pairs as a "Generic ZigBee Outlet" and the LED responds to On/Off commands. Tomorrow night I will try the Color Dimmable one...

So long story short, these CAN work with Hubitat (finally). The IDF examples do not appear to work as is (but CAN be made to work). After playing with these a bit over the next couple days I may see what is missing from the Arduino example and see if I can start making changes there. Fingers crossed.