I’m running the latest version of Volumio on a new Raspberry Pi 5 with a HifiBerry DAC2 HD. It seems to work fine in its default state, music plays and the interface functions. Bootup time is noticeably faster by about 20 seconds.
However this isn’t Bookworm. I could be wrong, but it looks like a Pi 5 kernel and libraries got backported to the old Bullseye version of Raspberry Pi OS that Volumio was already based on. That means that there’s NO support for interacting with the GPIO in any way. None of the GPIO-based plugins work at all. There are none of the new Bookworm utilities available in the configured repositories, and short of recompiling them, I doubt any of them would even work anyways.
That means there’s no way to configure external controls. No buttons, no rotary encoders, nothing. Even if I wanted to script those from scratch in the OS, it doesn’t seem possible without the proper utilities. That seems to render Volumio on Pi 5 pretty crippled.
Please respect the free time of people who spend their private time to create free community plugins.
The plugins are not created by Volumio but by community members like yourself.
These plugins needs to be rewritten to work on a rPi5. Meaning people like yourself, need to free up time and spend money to buy a rPi5 to support your ranting free of charge.
So please respect these people and start programming.
Just as a small concept with 4 buttons, to show you how it can be done.
# Rotary encoder using evdev
# Add to /boot/userconfig.txt
# dtoverlay=rotary-encoder,pin_a=23,pin_b=24,relative_axis=1,steps-per-period=2
# Tweak pins and steps to match the encoder
import evdev
import subprocess
d = evdev.InputDevice('/dev/input/by-path/platform-rotary@17-event')
print('Rotary encoder device: {}'.format(d.name))
position = 0
for e in d.read_loop():
print('Event: {}'.format(e))
if e.type == evdev.ecodes.EV_REL:
position += e.value
print('Position: {}'.format(position))
print('Value: {}' .format(e.value))
if e.value > 0:
subprocess.call('XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool key Alt_L+Up', shell=True)
else:
subprocess.call('XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool key Alt_L+Down', shell=True)
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
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
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.
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
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.
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
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
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…