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

Abstract/generic LED interface? #807

Open
vintagepc opened this issue Oct 25, 2023 · 0 comments
Open

Abstract/generic LED interface? #807

vintagepc opened this issue Oct 25, 2023 · 0 comments

Comments

@vintagepc
Copy link

vintagepc commented Oct 25, 2023

Is your feature request related to a problem? Please describe.

While poking around in the LCDProc/MythTV interface I noticed it has rather expansive support for LEDs that are attached to certain LCDs.

It'd be neat to abstract this out for a more general purpose capability given that on many small form-factor systems like the Pi or other hardware, it is very easy to have LEDs attached to GPIO headers, I2C, etc.

Describe the solution you'd like
I'm not entirely sure how this would look as even within the generic Linux SysFS LED interface configurations vary - e.g. GPIO LEDs are either on or off, other types (PWM, I2C) may support brightness values or full RGB data, and on top of that you have things like pattern-triggers for effects.

It may be an exercise to the user to implement this support in their own custom script, resulting in the interface becoming an extra dedicated option in the system event configuration, or a property of the LCD configuration to redirect LED handling to a script or binary instead of LCDProc. Currently the set[X]LEDs(...) calls are buried in quite a few places and the LCD code already serves as a point where they all end up converging.

Most likely the interface would be similar in that the script is passed a (stringified?) enumeration and state for the user to act on.

Describe alternatives you've considered
It appears this may be possible in an obscure way by implementing a collection of system event scripts, but this seems very tedious to understand which events end where, and not all of the places that call setLED-ish functions seem to have an obvious event hook where they might be captured.

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

No branches or pull requests

1 participant