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): Add Zigbee library#10265

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

@P-R-O-C-H-YP-R-O-C-H-Y commentedAug 30, 2024
edited by VojtechBartoska
Loading

Description of Change

Introducing Zigbee Arduino library (wrapper for esp-zigbee-sdk).

Tests scenarios

Locally with all included examples.

Related links

Relates to issue#10135
ZB_STRUCT warningsfixespressif/esp-zigbee-sdk#416

xttlegendapi, lboue, and janmasrovira reacted with thumbs up emojiWebklex, Forceu, and tbrown2337 reacted with heart emoji
Fixed ep_thermostat to compile successfullyRemoved cb from all EP, as it have been removed, virtual methods will be used instead.Moved zigbee handlers out of Zigbee_core to Zigbee_handlers for better readability.Fixed zigbeeInit to be bool and return status of initialization for begin function.Updated examples with edited roles and custom method for on_off light
Implemented basic function calls of switch commands to on/off light:  lightToggle, lightOn, lightOff, ...Implemented virtual methods for on/off light that have to be override in user code:  setOnOff, sceneControl, setOnOffTime, setOffWaitTimeAPIs can be changed, still early development.
Implemented Factory reset of Zigbee device, in order to connect to new network without reflashing/erasing flashImplemented optional setting for Manufacturer and Model namesAdded option to allow endpoint to have multiple endpoint connected -> switch - 2 lights (tested)Minor sketches update
Implemented easy transfer from device it to Device type (0x0000 = ESP_ZB_HA_ON_OFF_SWITCH_DEVICE_ID  -> "General On/Off switch".
Implemeted color dimmable light and color dimmer switch HA devices + examples.Removed unnecessary stored attribute clusterRenamed on/off light and switch examples
Implemented Zigbee network scanning (async) to mostly match WiFi scan APIs.Added Zigbee_Scan_Networks example
Implemeted thermostat and temperature sensor HA devices + examples.Implemented configure report handler.Updated READMEs and description of examples.Minor code updates
Simplified bounded device print as the structure is common for any EP typeAllowed setting custom app version for EP, default is 0Small fixes and code updates
@P-R-O-C-H-YP-R-O-C-H-Y added the Area: LibrariesIssue is related to Library support. labelAug 30, 2024
@P-R-O-C-H-YP-R-O-C-H-Y self-assigned thisAug 30, 2024
@github-actions
Copy link
Contributor

github-actionsbot commentedAug 30, 2024
edited
Loading

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message"Add Thermostat + fix enum":
    • summary looks empty
    • type/action looks empty
  • the commit message"Add check for SOC_IEEE802154_SUPPORTED":
    • summary looks empty
    • type/action looks empty
  • the commit message"Apply suggestions from code review by @lucasssvaz":
    • summary looks empty
    • type/action looks empty
  • the commit message"Change virtual methods to callbacks (TODO)":
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev Update: Color DImmable light + switch implemented":
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev Update: Thermostat and Temperature sensor EP":
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev Update: Version setting, Thermostat fix, ...":
    • summary should not end with a period (full stop)
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev update: Device ID to string":
    • body's lines must not be longer than 100 characters
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev update: Factory reset, names, multiple EPs":
    • body's lines must not be longer than 100 characters
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev update: implement on/off light and switch methods":
    • summary looks empty
    • type/action looks empty
  • the commit message"Dev update: roles, cb removal, handlers":
    • summary looks empty
    • type/action looks empty
  • the commit message"Fill keyworkds.txt, remove unnecessary defines":
    • summary looks empty
    • type/action looks empty
  • the commit message"Fix compilation errors in examples":
    • summary looks empty
    • type/action looks empty
  • the commit message"Ignore false positive unused variable/function":
    • summary looks empty
    • type/action looks empty
  • the commit message"Implement Network Scanning":
    • summary looks empty
    • type/action looks empty
  • the commit message"Implement cmd default response handler":
    • summary looks empty
    • type/action looks empty
  • the commit message"Initial commit - light bulb + switch working":
    • summary looks empty
    • type/action looks empty
  • the commit message"Refactor classes methods + implement Identify command":
    • summary looks empty
    • type/action looks empty
  • the commit message"Remove EP template + add lib to CMakeLists":
    • summary looks empty
    • type/action looks empty
  • the commit message"Remove outdated comments":
    • summary looks empty
    • type/action looks empty
  • the commit message"Remove ported IDF examples":
    • summary looks empty
    • type/action looks empty
  • the commit message"Remove unnecesary defaults defines":
    • summary looks empty
    • type/action looks empty
  • the commit message"Remove unused _identify_cluster":
    • summary looks empty
    • type/action looks empty
  • the commit message"Rename classes to have proper naming":
    • summary looks empty
    • type/action looks empty
  • the commit message"Rename methods, variables + make private/protected":
    • summary looks empty
    • type/action looks empty
  • the commit message"Update READMEs + add openNetwork fucntion":
    • summary looks empty
    • type/action looks empty
  • the commit message"Update Scan networks Readme":
    • summary looks empty
    • type/action looks empty
  • the commit message"Update Zigbee examples with new APIs":
    • summary looks empty
    • type/action looks empty
  • the commit message"Use [[maybe_unused]] instead of #pragma":
    • summary looks empty
    • type/action looks empty
  • the commit message"Use gpio calls for OnOff Light example":
    • summary looks empty
    • type/action looks empty
  • the commit message"fix(): Codespell issues":
    • summary looks too short

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 20 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).

⚠️Please consider squashing your 42 commits (simplifying branch history).
Messages
📖This PR seems to be quite large (total lines of code: 5267), you might consider splitting it into smaller PRs

👋Hello P-R-O-C-H-Y, we appreciate your contribution to 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.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- 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 against44f5522

@github-actions
Copy link
Contributor

github-actionsbot commentedAug 30, 2024
edited
Loading

Test Results

 41 files   -  74   41 suites   - 74   3m 13s ⏱️ - 1h 33m 7s
 19 tests  -   6   19 ✅  -   5  0 💤 ±0  0 ❌  - 1 
120 runs   - 153  120 ✅  - 152  0 💤 ±0  0 ❌  - 1 

Results for commit44f5522. ± Comparison against base commit84ddf0a.

This pull requestremoves 6 tests.
performance.coremark.test_coremark ‑ test_coremarkperformance.fibonacci.test_fibonacci ‑ test_fibonacciperformance.psramspeed.test_psramspeed ‑ test_psramspeedperformance.ramspeed.test_ramspeed ‑ test_ramspeedperformance.superpi.test_superpi ‑ test_superpivalidation.periman.test_periman ‑ test_periman

♻️ This comment has been updated with latest results.

@lucasssvazlucasssvaz changed the titlefeat(): Zigbee libraryfeat(zigbee): Add Zigbee libraryAug 30, 2024
@Jason2866
Copy link
Collaborator

First like the great work you are doing!
But adding "everything" possible to the Arduino core? It is a library. It is not a lib every esp32 MCU can use. Imho it should be considered not to add to the core. Arduino has the possibility to use librarys. Maybe an option to use the Espressif registry?

Copy link
Member

@lucasssvazlucasssvaz left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Very nice. Looks very intuitive to use. Just some small suggestions. BTW. Shouldn't this target branchrelease/v3.1.x according to what was presented in the community meeting ?

P-R-O-C-H-Y reacted with eyes emoji
@me-no-dev
Copy link
Member

much cleaner now :) just one small nitpick for the on/off light

P-R-O-C-H-Y, lboue, and lucasssvaz reacted with heart emoji

@P-R-O-C-H-Y
Copy link
MemberAuthor

Very nice. Looks very intuitive to use. Just some small suggestions. BTW. Shouldn't this target branchrelease/v3.1.x according to what was presented in the community meeting ?

@me-no-dev Should I change the target branch to 3.1?

@me-no-dev
Copy link
Member

Should I change the target branch to 3.1?

I see no reason why not to have it in the 3.0 if we decide to publish another version

lboue, lucasssvaz, P-R-O-C-H-Y, and HiFiJ reacted with thumbs up 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 labelsOct 1, 2024
@P-R-O-C-H-YP-R-O-C-H-Yforce-pushed thefeature/zigbee-library branch 2 times, most recently from8c15603 to172dd0fCompareOctober 2, 2024 11:02
@Forceu
Copy link

Thank you so much for your hard work!
I tried getting light sleep to work with it, similar to the example inhttps://github.com/espressif/esp-zigbee-sdk/tree/main/examples/esp_zigbee_sleep/light_sleep

Unfortunately it did not seem to work, is it supported by this wrapper?

@P-R-O-C-H-Y
Copy link
MemberAuthor

Hi@Forceu, as light sleep need some specific SDK Config options to be set, which may bring unexpected behavior for whole arduino core, only deep sleep is currently supported by the Zigbee wrapper. It may be added in a future, but it's not planned for now. IF you are interested in the deep sleep, you can check the Temperature Humidity Sensor Sleepy example :)

Forceu reacted with heart emoji

@Forceu
Copy link

@P-R-O-C-H-Y Thanks a lot for the quick reply! Ah I didn't realise that the release candidate contains more examples. Again, thank you for your hard work :)

P-R-O-C-H-Y reacted with thumbs up emoji

@P-R-O-C-H-Y
Copy link
MemberAuthor

P-R-O-C-H-Y commentedDec 10, 2024
edited
Loading

For latest features/fixes of Zigbee lib, check the release/v3.1.x branch :) All new stuff will be available in the 3.1.0 stable release soon.https://github.com/espressif/arduino-esp32/tree/release/v3.1.x/libraries/Zigbee
We are not back porting Zigbee stuff to the 3.0 branch anymore.

Forceu reacted with heart emoji

@cbass27
Copy link

Bit of an Arduino newb but when I try to compile the Zigbee example code I get a compilation error: Zigbee.h" no such file. I'm running Arduino IDE 2.3.4 which says is the latest version so am I supposed to download this library separately and if so, where?

Thanks!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@me-no-devme-no-devme-no-dev left review comments

@lucasssvazlucasssvazlucasssvaz approved these changes

@SuGliderSuGliderAwaiting requested review from SuGliderSuGlider is a code owner

+1 more reviewer

@elgergelgergelgerg left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

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

Labels

Area: LibrariesIssue is related to Library support.Status: Pending MergePull Request is ready to be merged

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

8 participants

@P-R-O-C-H-Y@Jason2866@me-no-dev@Forceu@cbass27@elgerg@lucasssvaz@VojtechBartoska

[8]ページ先頭

©2009-2025 Movatter.jp