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

Make RPi.GPIO optional #283

Closed
Pako2 opened this issue Jul 23, 2024 · 4 comments
Closed

Make RPi.GPIO optional #283

Pako2 opened this issue Jul 23, 2024 · 4 comments

Comments

@Pako2
Copy link

Pako2 commented Jul 23, 2024

Dependency on RPi.GPIO is a problem because RPi.GPIO does not support RPi5 and has problems with recent kernels. The temporary solution is of course to install lgpio and rpi-lgpio (which emulates RPi.GPIO). It would be nice if the dependency on rpi-lgpio was removed and luma.core used lgpio directly.

@thijstriemstra
Copy link
Collaborator

Dependency on RPi.GPIO is a problem because RPi.GPIO does not support RPi5 and has problems with recent kernels.

Agreed.

lgpio and rpi-lgpio (which emulates RPi.GPIO).

I'll take a look. I don't have an RPI5 though (so not high priority for me), but I'm sure you or someone else can verify a possible PR I might come up with, using an rpi5.

@thijstriemstra thijstriemstra changed the title Dependency on RPi.GPIO Make RPi.GPIO optional Jul 23, 2024
@thijstriemstra
Copy link
Collaborator

Ah, it's a duplicate of #270

@Pako2
Copy link
Author

Pako2 commented Jul 24, 2024

Of course I read #270, but I started a new issue anyway. I think it is not understood correctly. In the case of #270, it's primarily that in some cases luma.core works without the RPi.GPIO library installed (and without any replacement for it), but based on the dependencies listed in setup.cfg, the system still tries to install it automatically and if that fails, then the entire installation fails.
On the contrary, in this case it is a matter of specifying the lgpio library instead of RPi.GPIO in the setup.cfg (and of course the necessary changes must be made for this in the luma.core library). At the same time, I agree with #270. Why is the dependency not optional (on any RPi.GPIO or lgpio type library)? After all, it is not even necessary for displays with an i2c interface.

@Pako2
Copy link
Author

Pako2 commented Jul 24, 2024

And I have two more comments.

  1. I don't have an RPi5 either and yet I ran into the problem. I created the OLEDproc add-on for LibreELEC/Kodi about two years ago. In LibreELEC there is (perhaps from the very beginning of existence) also the "Raspberry Pi Tools" add-on, which also included the RPi.GPIO library. My addon also had the "Raspberry Pi Tools" addon listed as dependencies. However, with the new version of LibreELEC (LE12) there has been a change. The RPi.GPIO library was dropped so my OLEDproc plugin stopped working.
  2. The solution with lgpio plus rpi-lgpio works for RPi 4 (and should for RPi5 too) immediately, without changes in luma.core. But my wish is to completely remove the dependency on rpi-lgpio and that requires changes in luma.core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants