Raspberry Pi 5 Support for GPIO Broken

I’m not complaining about the plugins, I’m pointing out that Volumio as it currently exists is not suitable for GPIO plugin development on the Pi 5. The versions of piwiring, rpi.gpio and gpiozero that are included with Volumio and/or its configured repositories are no longer able to access the GPIO on the Pi 5.

Please read my previous response.
Everything is available and working on a rpi5, both GPIO and rotary encoders. Only not as plugin yet, but for sure if you code it yourself you get what you need.
If you don’t want to invest this time, be patient and respectful. or work very close with the developer of the rotary encoder @T0MR0 and provide what he asked.

but gpioget isn’t available on my system as far as I can see. What package is that from? How do I get that using the currently configured repositories?

Also, implying that I’m somehow freeloading is downright insulting

1 Like

if i recall correctly:

sudo apt-get update
sudo apt-get -y install gpiod
sudo apt-get -y install python3-libgpiod
1 Like

Thank you, that was very helpful. Would be helpful if that was included in the distributed image of Volumio

1 Like

Volumio comes with the bare minimum what is needed. It’s up to the user if they want something else.

Right, but here you are encouraging me to develop a plugin using tools that aren’t available in the base image… that’s not useful unless those tools are there by default. If you want to suggest I use functional tools that already exist in the base image, I’m all ears

1 Like

I am not suggesting anything. Either your patient and wait for the developer to provide an update or do it yourself. What do you think a plugin does when you install it. As starters installing packages.

2 Likes

Thank you!

1 Like

a little remark, even with the new release, the GPIO Button and GPIO Control plugin are still not working

as mentioned by @Wheaten those plugins needs to be rewritten to work on a RPi5

1 Like

I’m assuming that with the new release, those plugins now can be modified to work. At least with regards to the gpio-buttons plugin, it imports a library version that was no longer working at all with the Pi 5, so I figure these resources are being updated to newer versions that support the new board

2 Likes

the plugin must be re-written, nothing to do with the core Volumio system

it was the plugin that was downloading and using the library that is not maintained anymore and not compatible with RPi5

1 Like

What I’d love to see is the updated gpiozero library made available on the system without having to jump through hoops. Version 2.0 is available in more recent versions of Pi OS, but not in Volumio unless I add a different repository or install python3-pip which involves installing an entire build environment. That’s not feasible from the point of view of a simple plugin, I can’t be expecting Volumio users to have to do that, even if it’s automatic in the background.

1 Like

This won’t happen, as @Wheaten mentioned those libraries are not part of the Volumio core image.

if a certain plugin needs a library, it will be downloaded and installed during the setup of the plugin itself.

That’s too bad, it really hampers plugin development. Not everyone has time to waste re-inventing the wheel. Those libraries already implement basic functionalities that can be used with just 2 lines of code rather than over a dozen.

I just got gpiozero-2.0 installed on Volumio with just some basic additional package dependencies, but it requires creating a virtual python3 environment, which I’m pretty sure is beyond the scope of what a simple plugin should have to do

1 Like
sudo apt install python3-venv

The following NEW packages will be installed:
  python-pip-whl python3-venv python3.7-venv

And then inside a python3 virtual environment:

python3 -m pip install gpiozero

Installing collected packages: colorzero, gpiozero
Successfully installed colorzero-2.0 gpiozero-2.0

Now to see whether this library works on Volumio…

If it does, would it be out of the question to include a python3 venv in the default Volumio image specifically intended for plugin development? Throw a bunch of useful libraries in there as the volumio user and call it “volumio-plugins-env” to provide as an official plugin development environment and encourage anyone to create plugins more easily. I realize not everyone chooses python3 as their language of choice, but if Volumio had an “official” plugin environment that could be maintained and updated separately from the base OS, then these big OS changes that break things (like a new Raspberry Pi board being released) could be minimized and resolved quickly and easily in the future

1 Like

ugh, I give up. gpiozero is supposedly successfully installed in my venv:

(deadman-env) volumio@tamusique:~$ pipdeptree
gpiozero==2.0
└── colorzero [required: Any, installed: 2.0]
    └── setuptools [required: Any, installed: 40.8.0]
importlib-metadata==6.7.0
├── typing-extensions [required: >=3.6.4, installed: 4.7.1]
└── zipp [required: >=0.5, installed: 3.15.0]
pip==18.1
pipdeptree==2.9.6
pkg-resources==0.0.0

But attempting to run any simple script that calls on a gpiozero library results in this error:

(deadman-env) volumio@tamusique:~$ deadman-env/bin/python3 button-check.py
Traceback (most recent call last):
  File "button-check.py", line 1, in <module>
    from gpiozero import Button
  File "/home/volumio/deadman-env/lib/python3.7/site-packages/gpiozero/__init__.py", line 19, in <module>
    from .pins import (
  File "/home/volumio/deadman-env/lib/python3.7/site-packages/gpiozero/pins/__init__.py", line 21, in <module>
    from ..devices import Device
  File "/home/volumio/deadman-env/lib/python3.7/site-packages/gpiozero/devices.py", line 19, in <module>
    from importlib.metadata import entry_points
ModuleNotFoundError: No module named 'importlib.metadata'

Which makes no sense because the importlib-metadata module is right there in the venv. And it wasn’t even installed automatically, I had to install it myself because it’s not listed as a dependency by gpiozero.

I think the real problem is that an actual build environment is necessary to install many of the necessary modules, like an adequate pin factory that supports the Pi 5. Again, this is far outside the realm of plugin development. Until Volumio provides a plugin development environment, very few people are gonna be interested in developing or maintaining plugins. They’ll all just end up quitting everytime something breaks.

Also worth pointing out that Buster stops getting security updates in less than 6 months…

1 Like

importlib.metadata is a built-in module of Python 3.8. gpiozero imports this.

On Python 3.7.3 which Volumio uses, the import statement for the external module you installed manually should be from importlib_metadata import ...

1 Like

I figured that might be the issue, but I’m not the one who wrote gpiozero so I have no control over how those libraries are imported. The gpiozero 2.0 documentation states that Python 3.5+ is supported, so it seems odd that they’d explicitly write it to make a call to an internal library that didn’t exist until Python 3.8

1 Like

I altered the post title, as it was misleading. There is nothing wrong with PI5 Volumio core.
You are free to edit it any way to be more accurate

1 Like