Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

P-R-O-C-H-Y
Copy link
Member

Description of Change

This pull request updates theesp_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

@P-R-O-C-H-YP-R-O-C-H-Y self-assigned thisMay 21, 2025
@P-R-O-C-H-YP-R-O-C-H-Y added Status: Review neededIssue or PR is awaiting review Area: ZigbeeIssues and Feature Request about Zigbee labelsMay 21, 2025
@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMay 21, 2025
edited
Loading

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message"Update libraries/Zigbee/src/ZigbeeCore.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message"Update libraries/Zigbee/src/ZigbeeCore.cpp":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • followConventional Commits style
  • correct format of commit message should be:<type/action>(<scope/component>): <summary>, for examplefix(esp32): Fixed startup timeout issue
  • allowed types are:change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses theConventional Precommit Linter).

👋Hello P-R-O-C-H-Y, we appreciate your contribution to this project!


📘 Please review the project'sContributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by thePR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with eachpush event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger isnot a substitute for human code reviews; it's still important to request a code review from your colleagues.
-Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manuallyretry these Danger checks, please navigate to theActions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫dangerJS againstee9e890

@P-R-O-C-H-YP-R-O-C-H-Y requested a review fromCopilotMay 21, 2025 08:38
Copy link
Contributor

@CopilotCopilotAI left a 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.

  • Introducesleave_params to inspect the leave type.
  • Logs leave type and executesfactoryReset 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 theESP.restart() behavior, as current tests only cover the reset scenario.
else { // Leave with rejoin -> Rejoin the network, only rebooot the device

P-R-O-C-H-Yand others added2 commitsMay 21, 2025 10:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMay 21, 2025
edited
Loading

Test Results

 76 files   76 suites   12m 43s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commitee9e890.

♻️ This comment has been updated with latest results.

@tofurky
Copy link

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 couplelog_i() like this will be helpful to see when this occurs.

P-R-O-C-H-Y reacted with heart emoji

@P-R-O-C-H-YP-R-O-C-H-Y added Status: Pending MergePull Request is ready to be merged and removed Status: Review neededIssue or PR is awaiting review labelsMay 23, 2025
@tofurky
Copy link

Seems to have worked; message is cut off, but it didn't factory reset:

[24529967][I][o2.ino:133] zigbee_reading_handler(): Sent averaged readings of oxygen=20.7%, temperature=22.5 C (60 total readings)[24589470][D][ZigbeeTempSensor.cpp:134] setHumidity(): Setting humidity to 2070[24589471][D][ZigbeeTempSensor.cpp:81] setTemperature(): Setting temperature to 2250[24589782][I][ZigbeeCore.cpp:384] esp_zb_app_signal_handler(): LESP-ROM:esp32c6-20220919Build:Sep 19 2022rst:0xc (SW_CPU),boot:0xc (SPI_FAST_FLASH_BOOT)Saved PC:0x4001975aSPIWP:0xeemode:DIO, clock div:2load:0x40875720,len:0x1260load:0x4086c110,len:0xdc4load:0x4086e610,len:0x3018entry 0x4086c110=========== Before Setup Start ===========Chip Info:------------------------------------------  Model             : ESP32-C6...[   665][I][ZigbeeCore.cpp:249] esp_zb_app_signal_handler(): Device started up in non factory-reset mode...

@me-no-devme-no-dev merged commit91fd517 intoespressif:masterMay 27, 2025
56 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@me-no-devme-no-devme-no-dev approved these changes

@lucasssvazlucasssvazlucasssvaz approved these changes

Assignees

@P-R-O-C-H-YP-R-O-C-H-Y

Labels
Area: ZigbeeIssues and Feature Request about ZigbeeStatus: Pending MergePull Request is ready to be merged
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Zigbee end device "randomly" factory resets; seems due to handling of ESP_ZB_ZDO_SIGNAL_LEAVE
4 participants
@P-R-O-C-H-Y@tofurky@me-no-dev@lucasssvaz

[8]ページ先頭

©2009-2025 Movatter.jp