Skip to content

feat(esp32): Zigbee power outlet example #11296

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lboue
Copy link
Contributor

@lboue lboue commented Apr 24, 2025

Checklist

  1. Please provide specific title of the PR describing the change, including the component name (eg. „Update of Documentation link on Readme.md“)
  2. Please provide related links (eg. Issue which will be closed by this Pull Request)
  3. Please update relevant Documentation if applicable
  4. Please check Contributing guide
  5. Please confirm option to "Allow edits and access to secrets by maintainers" when opening a Pull Request

Description of Change

Add Zigbee power outlet example (ESP_ZB_HA_MAINS_POWER_OUTLET_DEVICE_ID device type)

Tests scenarios

I have tested my Pull Request on Arduino-esp32 core v3.2.0 with ESP32-C6 Board with this scenario)

Tested with Zigbee2MQTT
image

image

Related links

Please provide links to related issue, PRs etc.

Copy link
Contributor

github-actions bot commented Apr 24, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lboue, 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 ...


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

DangerJS is triggered with each push 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 is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions 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 against 8f71c44

@lboue lboue marked this pull request as ready for review April 24, 2025 19:31
Copy link
Contributor

github-actions bot commented Apr 24, 2025

Test Results

 76 files   76 suites   13m 26s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit 8f71c44.

♻️ This comment has been updated with latest results.

Zigbee power outlet example
@lboue lboue force-pushed the zigbee-power-outlet branch from 0d22e85 to ae36672 Compare April 24, 2025 19:47
Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S30⚠️ +1680.00⚠️ +0.03000.000.00
ESP32S20⚠️ +1680.00⚠️ +0.03000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP320⚠️ +1680.00⚠️ +0.03000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch⚠️ +1680⚠️ +1680000000⚠️ +1680
libraries/Zigbee/examples/Zigbee_Gateway⚠️ +1680⚠️ +168000----⚠️ +1680
libraries/Zigbee/examples/Zigbee_On_Off_Switch⚠️ +1680⚠️ +1680000000⚠️ +1680
libraries/Zigbee/examples/Zigbee_Range_Extender⚠️ +1680⚠️ +1680000000⚠️ +1680
libraries/Zigbee/examples/Zigbee_Thermostat⚠️ +1680⚠️ +1680000000⚠️ +1680
libraries/Zigbee/examples/Zigbee_Analog_Input_Output------0000--
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor------0000--
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light------0000--
libraries/Zigbee/examples/Zigbee_Contact_Switch------0000--
libraries/Zigbee/examples/Zigbee_Dimmable_Light------0000--
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor------0000--
libraries/Zigbee/examples/Zigbee_OTA_Client------0000--
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor------0000--
libraries/Zigbee/examples/Zigbee_On_Off_Light------0000--
libraries/Zigbee/examples/Zigbee_PM25_Sensor------0000--
libraries/Zigbee/examples/Zigbee_Power_Outlet------------
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor------0000--
libraries/Zigbee/examples/Zigbee_Scan_Networks------0000--
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy------0000--
libraries/Zigbee/examples/Zigbee_Temperature_Sensor------0000--
libraries/Zigbee/examples/Zigbee_Vibration_Sensor------0000--
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor------0000--
libraries/Zigbee/examples/Zigbee_Window_Covering------0000--

@lucasssvaz lucasssvaz requested a review from P-R-O-C-H-Y April 24, 2025 23:51
@lucasssvaz lucasssvaz added the Area: Zigbee Issues and Feature Request about Zigbee label Apr 24, 2025
@lucasssvaz
Copy link
Collaborator

There is also a compilation warning:

https://github.com/espressif/arduino-esp32/actions/runs/14650359254/job/41114439256?pr=11296#step:8:128

Is this fixable in the code or does it come for the Zigbee SDK ?

@lboue
Copy link
Contributor Author

lboue commented Apr 25, 2025

There is also a compilation warning:

https://github.com/espressif/arduino-esp32/actions/runs/14650359254/job/41114439256?pr=11296#step:8:128

Is this fixable in the code or does it come for the Zigbee SDK ?

Yes it comes for the Zigbee SDK because I am not using groups, scenes like in the ZigbeeLight.cpp example:

warning: missing initializer for member 'esp_zb_mains_power_outlet_cfg_s::groups_cfg' [-Wmissing-field-initializers]
warning: missing initializer for member 'esp_zb_mains_power_outlet_cfg_s::scenes_cfg' [-Wmissing-field-initializers]
warning: missing initializer for member 'esp_zb_mains_power_outlet_cfg_s::on_off_cfg' [-Wmissing-field-initializers]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Zigbee Issues and Feature Request about Zigbee
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants