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

Unifi POE GPIO Driver #1212

Open
appkins opened this issue Jan 12, 2024 · 4 comments
Open

Unifi POE GPIO Driver #1212

appkins opened this issue Jan 12, 2024 · 4 comments
Assignees
Labels
type:feature New feature or request

Comments

@appkins
Copy link

appkins commented Jan 12, 2024

Is your feature request related to a problem? Please describe.
I would like to control the POE state of a Unifi switch natively within pikvm. I have a working prototype for this, and am willing to clean up/change the code for a suitable PR.

Describe the solution you'd like
Ideally, all modes for Redfish power management would be supported. The Unifi API supports cycling and power states, so this is all demo'd in my POC.

Describe alternatives you've considered
At the moment, I'm overwriting the files in the python lib for kvmd. This is not ideal. I had originally considered a cmd based gpio implementation, but the flexibility of a native driver is working much better.

Additional context
More of a side note, but I also rewrote the Redfish implementation to support all configured power drivers. This will likely need much more guidance and review from the project owners, but very interested to discuss this side more in depth. Happy to open a separate issue.

My current work can be found in the following fork/branch. If you have time to look over it, please feel free to leave any feedback. I'm looking for general tips/guidance before I begin the PR process, as it's likely this could use a rework before I push anything for formal review.

https://github.com/appkins-org/kvmd

@mdevaev
Copy link
Member

mdevaev commented Jan 13, 2024

Hi! I love Unifi devices, so having such a plugin would be great. I have briefly reviewed your changes and can suggest that you send me only the gpio plugin first, after which I will do some refactoring and we can continue further.

PS: I would prefer not to add hacks and various things specific to your environment. If you need to run and test something, then there is a pytest in the repository for this.

@mdevaev mdevaev self-assigned this Jan 13, 2024
@mdevaev mdevaev added the type:feature New feature or request label Jan 13, 2024
@appkins
Copy link
Author

appkins commented Jan 14, 2024

Hi! I love Unifi devices, so having such a plugin would be great. I have briefly reviewed your changes and can suggest that you send me only the gpio plugin first, after which I will do some refactoring and we can continue further.

PS: I would prefer not to add hacks and various things specific to your environment. If you need to run and test something, then there is a pytest in the repository for this.

Awesome, sounds great. I will split this out into a single purpose branch for the Unifi driver and create a PR.

@mdevaev
Copy link
Member

mdevaev commented Jan 14, 2024

Please don't include API change in it. Only gpio.

@appkins
Copy link
Author

appkins commented Jan 22, 2024

Will do, please disregard any mention of Redfish. This needs a dedicated design discussion the more I explore. For now, I'm only planning to add the gpio PR.

@mdevaev mdevaev changed the title Unifi POE GPIO Driver - Working POC - Gauging Interest Unifi POE GPIO Driver Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Development

No branches or pull requests

2 participants