-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Zigbee in Arduino #10135
Comments
Hi, love the work so far. I'm so excited to get this running. It looks like it's going to be the next best thing since sliced bread! Are there any intentions to add power source/battery level into the config? If mains powered could it act as a router as well or is that too much for a H2? Maybe ok for the C6.. Many thanks and appreciate the hard work! |
Dev update 12/08/2024 pushed to the dev branch:
|
Oh wow, that looks amazing! So easy, I'm going to love this. Thanks! |
Thank you for your feedback 👍 I really appreciate it. About the power source/baterry level I will add it on the list as good to have, so I will look after having the main part done :) |
Dev Update 14/08/2024 pushed to dev branch:
|
Nice, |
@elgerg The temperature sensor + thermostat are on the list of upcoming tasks. Edit: found your issue you opened. Added a comment. |
Thanks for adding to espressif/esp-zigbee-sdk#401 |
Hi @P-R-O-C-H-Y Any chance I can add this to the "Nice to have" list? In the current Temp sensor version there is an identify cluster (?) added:
Any chance you can add something like that to the list so we can blink an LED when triggered? No idea how to do that at the moment.. Thanks! |
Hi @elgerg, Can you explain a bit more? I am not sure if I got it correctly. |
Hi @P-R-O-C-H-Y There is an identify button. In theory this should allow for the device to identify itself by blinking an LED or something when the button is pressed so you can figure out which device is which. This article explains really well on what identify is: So what would be good to have is a simple way of using this just like you are doing with the rest of the wrapper. Does that make a little more sense? Thanks |
Thanks for explaining. That can be really helpful. Adding it to the list :) |
Excellent. Thanks :) |
Dev Update 16/08/2024 pushed to dev branch:
|
If you're taking requests I'd also like to implement some kind of way of getting the current time from the coordinator to display on a screen. Do you know if it's possible to get the time into some sort of callback? Thanks :) |
@elgerg Do you have any example of this feature? |
Dev Update 28/08/2024 pushed to dev branch:
|
Hi @AndunHH, thank you for your feedback. I will take a look on this issue with the |
Hi @Hedda, I was not thinking about that as I use the ESP-ZIGBEE-SDK underneath, which uses the ZBOSS. The main idea of Arduino APIs is to offer a similar approach to other Arduino interfaces. If users want to use ESP-IDF Zigbee APIs, that is still possible, they can just ignore the Arduino Zigbee APIs. This is valid for most of our Arduino APIs, actually, users can always use the ESP-IDF underneath. We don't have a goal of portability of our libraries, only to keep portability of user applications. But for sure other manufacturers can follow the same APIs, but the Implementation will depend on them. |
@P-R-O-C-H-Y Hi! I'm not sure. But is there already a wrapper so you can communicate from device to device e.g. a button that toggles another zigbee light without using automations like homeassistant and/or nodered |
Hi @HexiDev, just flash one ESP with on/off light and second ESP with on/off switch examples. The switch will act as a coordinator and create the Zigbee network, light will join the network and bind to the switch. So clicking a button on switch will turn on/off the light :) |
But would it be also possible to use an existing network and make 2 zigbee end/router devices talk to eachother? Like in a sense that I can setup a switch as a router that can turn on/off my light that is also a router. instead of communicating coordinator > end/router device |
@HexiDev I believe taht the Zigbee feature that you are requesting is called ”Zigbee Binding”, and you normally ”bind” two compatible cluster attributes. Binding is an on-device feature for Zigbee devices. It provides a mechanism for attaching an endpoint of one Zigbee device to an endpoint of another Zigbee device or to a Zigbee group. For example, binding a “target destination” Zigbee device like a remote to a Zigbee light bulb, switch or group of light bulbs allows direct control of the “target” device (light, switch, shade) from the “remote” Zigbee device, bypassing the Zigbee Gateway. This means that the remote can control the light bulb or group even when any Zigbee Coordinator and Zigbee Gateway is not active. Note that not all devices support binding. By default, most any Zigbee Gateway applications binds remotes to the coordinator, so click events are still forwarded to the Zigbee Gateway application for state reporting. Note that as some remotes can only be bound to a single destination, you might need to unbind the remote from the coordinator before binding it to another device or group. See how bindings is used in other software: |
Examples/support for illuminance would be nice, or maybe an example for how support could be implemented if you know the clusters/endpoints/attributes needed. |
Does anybody successfully compiled Zigbee Gateway example in Arduino. Especially ot_rcp part? |
@P-R-O-C-H-Y hi, can you help me?, I'm not sure if there is a way to configure esp32c6 as an end device and esp32H2 as a coordinator so they can connect to each other by sending messages via serial monitor. Is it possible and may I know where I can get the code? |
Hi @Farisabdurrasid. To get this correctly, you want to use Zigbee protocol to send a messages between 2 devices (coordinator <-> end device) via serial monitor? Idk if this is the purpose of the Zigbee library and overall the Zigbee HA devices. What kind of messages it should be? Or can you explain it more deeply? Thanks |
@P-R-O-C-H-Y yes like that, without having to use Home Assistant, so these 2 ESP32C6 devices communicate with each other using zigbee. For the project I am planning to create, the ESP32-C6 (coordinator) will act as the MCU for the soil moisture sensor. When the soil moisture level reaches a set point, another ESP32-C6 (end device) will act as the MCU to change the traffic light's color. The data from the coordinator will be sent to the end device using Zigbee communication. can it? |
Sounds like what you're looking for is something more like ESP-NOW. Any to any comms isn't really what ZigBee does, and trying to do it by working within the ZigBee protocol is just going to unnecessarily complicate implementing what you're looking for IMO. |
Yes, it makes sense.
Thanks for the knowledge
Pada tanggal Kam, 23 Jan 2025 23.42, teambvd ***@***.***>
menulis:
… For the project I am planning to create, the ESP32-C6 (coordinator) will
act as the MCU for the soil moisture sensor. When the soil moisture level
reaches a set point, another ESP32-C6 (end device) will act as the MCU to
change the traffic light's color. The data from the coordinator will be
sent to the end device using Zigbee communication. can it?
Sounds like what you're looking for is something more like ESP-NOW. Any to
any comms isn't really what ZigBee does, and trying to do it by working
within the ZigBee protocol is just going to unnecessarily complicate
implementing what you're looking for IMO.
—
Reply to this email directly, view it on GitHub
<#10135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHCN3YH6U5JWKS6TF42LEGT2MELX5AVCNFSM6AAAAABMIX4LBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJQGM3TMOBRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey P-R-O-C-H-Y, |
Hi @MegaJack22, Thank you for nice words. |
Hi everyone, can you please try #10946 if the OTA works for you? Thanks |
Wow. I bought an ESP32-H2 8 months ago to try out to build Zigbee sensors. I had to deal with the ESP-IDF documentation for several days before finally giving up. Now I'm back to the news and discovering this new arduino library. Thank you very much for your great work. It will clearly help the most beginners among us to get started! Has the PR about documentation already been created? |
Hi @quentains, the documentation is unfortunately not ready yet. I have a quick draft, but as I am still working on adding new stuff, this is on lower priority now. Most of the functionality is demonstrated in the examples, so you can for now take a look at them :) |
As others I also got stuck on using the ESP-IDF platform. And while I managed to get the commissioning process with the Philips Hue bridge starting, my light does not show up in the Hue (no light found). |
Hi @jaccobezemer, can you please give me more info on what exactly you needed to change, so I can add an API for that? If you prefer we can discuss it on our Discord channel. |
In ZigbeeCore.cpp I've added the following code below Initialize Zigbee stack:
Maybe the above is possible with a public set method like .hueCompatible(true) or .setAlternateTCkey(); Below is the log showing the commissioning process with the Hue bridge. Unfortunately the light doesn't show up in the bridge.
Here's some additional information and credits: |
Hi P-R-O-C-H-Y, This example works https://github.com/wejn/esp32-huello-world/tree/efb210dc42a2b8a11f1d66c69ec135010910055e In that example setting the distributed key is just after When setting the distributed key in your wrapper also after esp_zb_init, then it is responding when the Hue bridge is open for joining but it isn't found by the bridge. On the other hand it is still able to join my HomeAssistant ZHA network. So I suspect, in your wrapper, setting the distributed key should be done somewhere else in the code. Do you have a tip? |
Finally 🤗 I manged to get things working in combination with Philips Hue. This blog post from wejn did the trick. (https://wejn.org/2025/01/zigbee-hue-llo-world). These are the changes I've made to the dimmable light example. By the way, with these changes the light works with Philips Hue and Home Assistant ZHA. Changes to ZigbeeCore.cpp After esp_zb_init(zb_cfg); add the following code
Changes to ZigbeeDimmableLight.cpp Line 13: change app_device_version = 0 to 1 The light can now be added to the Philips Hue Bridge 👍 Now we need to correct the off behavior of the Hue Bridge. Add the following code after _cluster_list = zigbee_dimmable_light_clusters_create(&light_cfg); in
Of course these changes should also be made to the on/off light and the dimmable color light. |
Thank @jaccobezemer for nice investigation and description :) |
Hi P-R-O-C-H-Y, That said, I think that with these change the API is not yet compatible enough with Philips HUE. I've noticed that overnight my light is off while the Hue bridge still thinks it on (and it should be on). |
Hi @jaccobezemer, thank you for your additional feedback. |
Related area
Create an API for Zigbee within Arduino
Hardware specification
ESP32-C6 and ESP32-H2 as Standalone Nodes. Other SoC can be used as radio co-processor attached to a RPC (802.15.4 radio layer).
Is your feature request related to a problem?
This is an issue to track the progress of developing Zigbee library, a new API for Arduino.
Describe the solution you'd like
Initial tasks:
Zigbee library (wrapper) tasks:
PR: #10265
Good to have features:
more tasks will be added while in progress.
Development branch
Describe alternatives you've considered
No other usable Zigbee wrapper around.
Additional context
Related issues:
#8807 #9156 #9962 #9480
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: