-
Notifications
You must be signed in to change notification settings - Fork 7.6k
feat(zigbee): Check the type of leave signal #11385
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
base: master
Are you sure you want to change the base?
feat(zigbee): Check the type of leave signal #11385
Conversation
👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Zigbee leave signal handler to distinguish between leave-with-reset and leave-with-rejoin events, triggering a factory reset or device reboot accordingly.
- Introduces
leave_params
to inspect the leave type. - Logs leave type and executes
factoryReset
for non-rejoin leaves. - Reboots the device on leave-with-rejoin signals.
Comments suppressed due to low confidence (1)
libraries/Zigbee/src/ZigbeeCore.cpp:383
- Add a test case covering the leave-with-rejoin path to validate the
ESP.restart()
behavior, as current tests only cover the reset scenario.
else { // Leave with rejoin -> Rejoin the network, only rebooot the device
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Test Results 76 files 76 suites 13m 50s ⏱️ Results for commit af9b642. |
Thanks @P-R-O-C-H-Y looks good, I've reflashed with this change applied to 3.2.0 (wound up being .arduino15/internal/esp32_esp32_3.2.0_5be222ba8658a6b6/libraries/Zigbee/src/ZigbeeCore.cpp locally w/arduino-cli). Having a couple |
Description of Change
This pull request updates the
esp_zb_app_signal_handler
function inZigbeeCore.cpp
to enhance the handling of Zigbee network leave signals. It introduces new logic to differentiate between leave types (with or without rejoin) and adds appropriate actions for each scenario.Tests scenarios
Tested just the leave without rejoin to make sure, this addition is not breaking current code.
@tofurky please give it a try in long term and send feedback.
Related links
Closes #11381