Zigbee supporting Esp32 module with Arduino

Yes, I have tried using with and without that line commented out. I also made sure to erase everything via the Arduino IDE when flashing the microcontroller.

On both the C8-Pro and C7, it gets stuck in the INITIALIZING phase of pairing.

Just to add my 2 centsā€¦ I would like to build some sensors as well, and got a ESP32-C6. I can confirm what you have discovered. On my C8 hub it begins to initialize:

As soon as HE starts the initialization however, the ESP32 responds with ā€œLeaveā€ and then ā€œFailed to Initialize zigbee stackā€:

I was able to pair the ESP32 to a ST hub:

And a Tuya hub:

well that's really interesting.
On my C8 it gets stuck at initializing but on my C7 it pairs well.
So we have a problem with Hubitat hubs. Since it pairs with Tuya and ST...

1 Like

Does anyone know, if there are any supported zigbee modules that can pair with the C8?

Are you talking about modules that work through Arduino? There are obviously modules that do otherwise no ZigBee devices would work with it at all.

Plus, the fact that I had gotten my ESP32-C6 to pair (and work) with my C8 and now my C8-Pro means it does work. I just could not get it to work with the Arduino sample. I had to use the Espressif IDF sample instead.

To be honest, at this point I am not worrying so much about it and focusing more on what I can do over WiFi for my projects than ZigBee.

1 Like

I havenā€™t tried it with a C8 or C8-Proā€¦ but possibly the following Zigbee module would work. Not sure if this is the type of Zigbee module youā€™re looking for?

I have one of those. Seems to work fine (including on my C8 - at least last time I tried it, which admittedly has been quite a while).

He has a battery powered version too, but I haven't tried that one.

Battery version:

1 Like

ok. back to the subject.
I'd really appreciae if anyone can write here when some example arduino code really works with esp32-c6 and Hubitat.

I am going to try to get this working on a C7 with ESP-IDF and Arduino later.

To be candid, once you have the IDF extension set up in Visual Studio Code, itā€™s a superior IDE than Arduino (just like PlaformIO in VS is better for Arduino dev than the Arduino IDE).

And as far I understand the IDF platform while more complex is better suited for iot development than the more simplistic. The former is the more native, real time platform for ESP32 dev. Arduino platform which oversimplifies the ESP32 platform and possibilities by offering that simpler but more restrictive setup loop.

Though for very simple device control, you might not care.

1 Like

nice to see someone else is also interested :slight_smile:

I really don't care about the platform we develop. Since I have Arduino ready on my PC, I prefer using it. But installing ESP-IDF shouldn't be so difficult.
I'm just waiting to see a really successful example. Successful on any hub (not just Hubitat C3)
Besides, the examples now we have only include a switch and a bulb. And there is no good documentation for making a sensor for example...

1 Like

Full disclosure: I'm new to the ESP32 boards, but have successfully created some sensors. I'm now trying to integrate the one or another into Hubitat. I have a few of the C6 DevKits and would like to use them if possible.

What are you using that works? I purchased a Freenove kit with S3 WROOM (no Zigbee) first, and they suggested Thonny for Python or the Ardurino IDE for C. I got a C6 DevKit from WaveShare that recommended VS Code (I've been using VS -not code- for years for C#) and a C6 DevKit from DIYMall

I purchased a couple of the ESP32-C6-DevKitC-1-N8 Development Boards off Amazon a while ago (checked my order history and found the listing but no longer available).

As for the code, I put a link to what I used further up in this thread (post 20, UPDATE 3). With a specific sample of it in post 23. I also had to update the libraries that the IDF was using.

@ilkeraktuna , just to be clear, the difference is vast between the Arduino platform (either in its Arduino IDE form or in VS Code with PlatformIO) and ESP-IDF (command line or in VS Code via the ESP-IDF extension). It's not about the IDE or toolchain but is a completely different approach to controller programming.

Where Arduino with its setup/loop approach makes it easy to start with, EDP-IDF is much more complex but offers more in-depth control targeting professional developers and advanced hobbyists who need full features of the ESP32 chips, looking to build real-time applications.

I am just starting now with IDF, having used Arduino prior.

1 Like

Thank you! That really is a big help! I've probably messed up my PC with all the different programs and libraries and such :man_facepalming:, So I need to get rid of it all first and start over (in a VM :wink:).

1 Like

Yeah... I know the Arduino IDE is maybe not the best out there anymore but I am used to it. I also still do most of my 3D generation (printing or graphics) using "code style" engines not graphics-editing tool ones... Heck, I still use Notepad++ for a lot of my code work.

So I am probably not the best example for what IDE to use for something.

I'm a proponent of using the best tool that I have for a particular job. I have no brand loyalty.

As another test, I spent some time installing the Espressif IDF Extension for VS Code on Windows 11. I was able to install the latest IDF v5.2 on my system. I then made sure I could build and flash my ESP32-C6 with the Blink example. All good.

Next, I set up to try and replicate @snell's success using the Espressif IDF with the aforementioned modified code changes. I incorporated the changes, and was then able to build the example Zigbee code. I flashed it to my ESP32-C6 and then attempted to pair it my my C8-Pro, C7, and C3 hubs. Once again, only the C3 was successful. I will say that the device was discovered much more correctly, as a Generic Zigbee Outlet, and the On/Off commands worked properly. Status updates were consistently quick. So, definitely better, but still having trouble pairing with the C7 and C8 hubs for me.

I just received an ESP32-H2 that I will continue testing with later this week.

2 Likes

really your C8 , C7 and C3 experience VS my C7 , C8 experience is different and I am worried about that.

To summarize:
You: (both Arduino and IDF)
C3 : success , pair and control
C7: not pairing
C8-pro: not pairing

Me: (only Arduino so far)
C7: pairing success, control fails
C8: not pairing

I just tried with the ESP32-H2. I get the exact same results using it versus the ESP32-C6.

the problem is not hw, it is the code...