Skip to content
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

Multi plug improvements (CON-1465) #1202

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

hankedan000
Copy link
Contributor

I wanted to make a multi-zone light controlled, and this multi-on-off-plugin example was really close to what I wanted. I just wanted to control more lights really. This updates makes this example project more of an "out of the box" solution for my project, and I hope others will find the same.

  • added support for up to 16 plugs
  • updated menuconfig to only display config options for the # of virtual plugs the user has defined
  • added a factory reset button with customizable GPIO level, and pin # via menuconfig

default options

full options

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2024

CLA assistant check
All committers have signed the CLA.

@hankedan000 hankedan000 force-pushed the multi-plug-improvements branch from b1859f4 to dae802f Compare December 11, 2024 13:08
@github-actions github-actions bot changed the title Multi plug improvements Multi plug improvements (CON-1465) Dec 11, 2024
@shubhamdp
Copy link
Contributor

and this multi-on-off-plugin example was really close to what I wanted

Glad to hear that this example was helpful in curating your solution.

@shubhamdp
Copy link
Contributor

@hankedan000 Added minor comments, change LGTM! Also, please resolve the addressed comments.

@shripad621git
Copy link
Contributor

LGTM!

 * adds reset button logic
 * adds support for upt to 16 plugs

Add ability to configure up to 16 plugs

Add factory reset via GPIO

Use bsp instead of device_hal for button initialization

Check if reset button IO pin # conflicts with plugs

Update default IO to be usable accross all supported targets

Updates readme

Adds reset_gpio out arg. Fixed error code usage. Fixed non-static variable names
@hankedan000 hankedan000 force-pushed the multi-plug-improvements branch from 575d4fc to a41e41b Compare December 31, 2024 13:39
@tanishqmanuja
Copy link

Is there a way to add button support for toggling the lights ? Something like GPIO_BUTTON_1 would toggle GPIO_PLUG_1 on press down.

@hankedan000
Copy link
Contributor Author

Is there a way to add button support for toggling the lights ? Something like GPIO_BUTTON_1 would toggle GPIO_PLUG_1 on press down.

Yes, that could be implemented, but it doesn't support that feature currently. I didn't really need that feature for what I was updating this for, and I don't think it was implemented originally due to the simplistic nature of these example projects.

If you're looking for an example on how to implement such a feature, I'd recommend looking here: https://github.com/espressif/esp-matter/tree/main/examples/light/main

@hankedan000 hankedan000 closed this Jan 5, 2025
@hankedan000 hankedan000 reopened this Jan 5, 2025
@espressif-bot espressif-bot merged commit ea6d52c into espressif:main Jan 6, 2025
1 check passed
@shubhamdp
Copy link
Contributor

@hankedan000 We have merged this PR, Thank you for contributing!

@hankedan000 hankedan000 deleted the multi-plug-improvements branch January 6, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants