[Plugin] pirate audio

Thank you, updated (don’t need to have those handlers as they are already globally registered)

Aaah. That makes sense.I’m not that used to python to be honest :slight_smile:

I have run this script to update the display.py file on my Pi3 running volumio 3.695 and it works. :grinning:

You have to enable SSH via the GUI at volumio.local/dev to be able to connect to your pi

hello!
the plugin is now updated to v0.1.2
To be used with volumio => v3.695
no new feature!
:wink:

3 Likes

Been trying to make this work for 3 days. Have a Zero w with pirateaudio headphone. Just tried a fresh image, 3.703 (only one offered) and plugin 0.01.2. No audio, and no screen or buttons. Prior to this I had audio, blank (dark), and no buttons. Please help.
Thanks in advance, Karl

1 Like

Tried with 3.703 and 3.735 with a zero 2W. Have audio, dark screen, and no action fro buttons.
On power, backlight is momentarily on, the goes dark. On shutdown, backlight goes back on. Well into a week of reading this thread, and experimenting without success. Even tried to download an older ver 3.631 and it immediately started upgrading on power-up. Any help would be greatly appreciated!

Are you sure you are not having an issue withthe hardware, Pi or Pirateaudio? I have not used mine for a while and did not try to reinstall since I applythepatch for the community user. I think he did make further chnages afterwards and not sure if it was added to the general release.

It’s only a week since using the Pimoroni-Mopidy with this hardware, working at that time. Tried both a Zero w and a 2w.

Pi Zero 2WH, New Version of PirateAudio-Hat (the one you have to change the pin for the y-button) with Headphone-Jack

Tried with a fresh install of volumio (3.703-2024-06-04-pi) and the latest version of the pirateaudio-plugin (0.1.2) -
you’re right, does not work.

→ ssh onto device, when trying to start the display.py directly I ran into following error :

volumio@volumiotest:/data/plugins/system_hardware/pirateaudio$ python3 display.py 
Traceback (most recent call last):
  File "display.py", line 13, in <module>
    import ST7789  # v0.0.6
ModuleNotFoundError: No module named 'ST7789'

when trying to install ST7789 I ran into a depency problem :

volumio@volumiotest:/data/plugins/system_hardware/pirateaudio$ sudo pip3 install st7789
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting st7789
  Using cached https://files.pythonhosted.org/packages/e3/dd/4fe563f2a757425a3460eee92f9a19ba893ed90f9d85f1be3d7dc91df305/st7789-1.0.1-py3-none-any.whl
Collecting numpy>=1.26.4 (from st7789)
  Could not find a version that satisfies the requirement numpy>=1.26.4 (from st7789) (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6)
No matching distribution found for numpy>=1.26.4 (from st7789)

Crosschecked with my currently working device (which was updated via online updates) and has the lastest plugin installed, I found following versions of st7789 (0.0.4) and numpy (1.16.2) - so I installed them and additionally installed python-socketio >=4 and < 5

sudo pip3 install numpy==1.16.2 
sudo pip3 install st7789==0.0.4
sudo pip3 install "python-socketio>=4,<5"

and tried starting the script again:
volumio@volumiotest:/data/plugins/system_hardware/pirateaudio$ python3 display.py

made sure plugin has a configuration (press configure, and save), enabled it and rebooted the device.

– works.

seems there is a dependency problem… but I’m not an expert nor very used to the volumio infrastructure, so we might have to ask the volumio-maintainers (maybe @balbuze or @tario are the ones to ask?) for help. from my oppinion we would need to install specified versions of these libraries in the plugins install.sh script…or port the plugin to be able to work with higher versions of st7789 (breaks as soon you upgrade from version 0.0.4 to 1.0.0)

# Install the required packages via apt-get, install new python 3.x depencies
echo "Installing new python 3.x and pip3 dependencies for pirateaudio plugin"
sudo apt-get update
sudo apt-get install -y python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy
sudo pip3 install st7789 "python-socketio>=4,<5"

Hope that helps you get it working :crossed_fingers:

It is now displaying and buttons all function. Many Thanks.

glad it worked for you . would you mind setting my post as a solution then ?
(three dots under my post, set the checkbox)

Edited : Just saw that I can set my own post as solution …

I’ll try to get it to work with st7789 in 1.0.0 as soon as I have some time…

:slight_smile:

Hi,
after following all the commands listed in the thread i get

Traceback (most recent call last):
  File "display.py", line 39, in <module>
    offset_top=0  # v0.0.6
  File "/usr/local/lib/python3.7/dist-packages/ST7789/__init__.py", line 123, in __init__
    self._spi = spidev.SpiDev(port, cs)
FileNotFoundError: [Errno 2] No such file or directory

any help greatly appreciated!

1 Like

Try a reboot, should work after it.
Got the same error before rebooting

Thank you so much! works perfectly now, can’t belive i didnt just reboot