[Plugin] pirate audio

First of all @AxLED the post# you mention is the one i used (mine here tells me it’s post#108, but that’s semantics). I can tell you your instructions work beautifully i didn’t get a single error. So all must be good on that side (the web page shows the pirateaudio under plugins in Volumio). Oh and as mentioned i used the Pirate Audio LineOut.

So as @DarrenHill mentioned my thoughts went to the config file as well. However from previous posts that looks OK. My confix.txt is exactly like yours. My userconfig.txt has an extra line “gpio=13=op,dl” & no reference to buttons at all. After fixing that (i also included the button code, just in case) i can see then OLED get’s at least power, but that’s where it ends…So my config.txt is:
initramfs volumio.initrd
gpu_mem=32
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1
force_eeprom_read=0

include userconfig.txt

Volumio i2s setting below: do not alter

dtoverlay=hifiberry-dac

And my userconfig.txt:

Start of parameters for pirateaudio plugin

dtparam=spi=on
gpio=25=op,dh
#gpio=13=op,dl

AxLED - Fix for Button X Y of pirate audio

gpio=16=pu
gpio=24=pu

End of parameters for pirateaudio plugin

# Add your custom config.txt options to this file, which will be preserved during updates

@Brommer

can you please connect via ssh and execute the following command:

sudo python3 /data/plugins/miscellanea/pirateaudio/display.py

and tell me the output?

AxLED

sorry to cut to the chase - but i dis just a complete reinstall: new volumio image, new plugin install - guess what? - it come up good ! Now i’ll test it to see if all works as it’s meant to

to answer your question:
register 5
success
register 6
success
register 16
success
register 20
success

Just tried some radio stations they come up OK albeit in several LARGE pixel refreshes. Is that normal? Also the background it comes up with seems to be too big for the OLED. Can that be adjusted along with the refresh rate?

also the OLED goes blank after a while - so i take it i have to add “idle_timeout = 6000000” Or some other large number to prevent that from happening at this point if a press any of the buttons i don’t get the screen back. Maybe I should also set the Y-button to 24…instaed of 20

The current version of the HATs use pin 24 for the Y-button. Older ones use pin 20.

There’s more details and a test Python script to see which buttons are in use in this older thread here.

The screen blanking after a while is normal, or at least mine does it too. It wakes up if something happens or you press a key.

1 Like

huh, this is what I want to happen on mine but its not, my screen is always on :frowning: What needs to go into my config for this to happen?

@Brommer

to your questions:

  • pixel or screen refresh depents on changes received via websockets. There is no periodical refresh so far.
  • background image and cover images will be resized to 240x240px, so they should fit (can you post a photo of your screen?). The images are blured a little bit, so the text is better readable.
  • screen blanking while listening to music - doesnt come from my plugin (pirate audio). The only blanking my plugin does is:
  • switchoff backlight while booting, shutdown or reboot
  • switch off backlight, if you use sleeptimer via pirate audio pllugin on your pirate audio hat

AxLED

Hmmm @ AxLED not sure why, but after rebooting a few times all seems fine. So what i mentioned above, ONLY happened the FIRST time

1 Like

Worked for me also, with the released Volumio 3. Running on a Pi 0 W.

Doesn’t work for me.
Raspberry Pi Zero W. Volumio 3 latest build.

I get this:

Welcome to Volumio for Raspberry Pi (5.4.83+ armv6l)
volumio@volumio:~$ git clone GitHub - Ax-LED/volumio-plugins
Cloning into ‘volumio-plugins’…
remote: Enumerating objects: 25637, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 25637 (delta 14), reused 0 (delta 0), pack-reused 25610
Receiving objects: 100% (25637/25637), 320.31 MiB | 897.00 KiB/s, done.
Resolving deltas: 100% (13157/13157), done.
Checking out files: 100% (767/767), done.
volumio@volumio:~$ cd /home/volumio/volumio-plugins/plugins/miscellanea/pirateaudio
volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$ volumio plugin install

This command will install the plugin on your device

Compressing the plugin
No modules found, running “npm install”
npm WARN pirateaudio@0.0.6 No repository field.

Plugin succesfully compressed
Progress: 10
Status :Downloading plugin
nloading plugin at http://127.0.0.1:3000/plugin-serve/pirateaudio.zip
Progress: 30
Status :Creating install location
Creating install location
Progress: 40
Status :Unpacking plugin
Unpacking plugin
Progress: 45
Status :Checking that the plugin is suitable for this version of Volumio The plugin has no node version dependency information. The plugin has no Volumio version dependency information. The plugin may not work on this version of Volumio
Checking that the plugin is suitable for this version of Volumio The plugin has no node version dependency information. The plugin has no Volumio version dependency information. The plugin may not work on this version of Volumio
Progress: 50
Status :Checking for duplicate plugin
Checking for duplicate plugin
Progress: 60
Status :Copying plugin to location
Copying plugin to location
Progress: 70
Status :Installing necessary utilities
Installing necessary utilities
Progress: 0
Status :An error occurred while installing the plugin Error
An error occurred while installing the plugin Error
Failed to Install Plugin
volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$ volumio plugin installvolumio plugin install

What am I doing wrong?

@eddie23,

can you try to install the plugin with another try?
Maybe your internet/wifi connection wasn’t fast enough to get all dependencies.
If a second try doesn’t work, we have to try each command of install.sh step by step an check which command is responsible for the error.

I just saw that volumio 3.179 is available now, is this the version you use? Maybe something in 3.179 changed.

AxLED

@AxLED ,
Yes, I am on volumio 3.179.
I think that my internet connection is pretty fast and stable.
I have tried few times already, so this time I started with running install.sh commands line by line.
Firstly, there is no ‘pirateaudio.service’ in ‘papath=/data/plugins/miscellanea/pirateaudio’. The path is empty. git clone https://github.com/Ax-LED/volumio-plugins.git puts ‘pirateaudio.service’ to ‘/home/volumio/volumio-plugins/plugins/miscellanea/pirateaudio’.
Secondly, after ‘volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$ cp pirateaudio.service /etc/systemd/system/’ I’ve got ‘cp: cannot create regular file ‘/etc/systemd/system/pirateaudio.service’: Permission denied’. Solved with sudo.
Thirdly, I couldn’t run ‘sudo pip uninstall -y st7789 socketIO-client’. I’ve got ‘sudo: pip: command not found’. Couldn’t solve it.
Fourthly, after ‘sudo apt-get -y remove python-pil python-pip python-numpy python-spidev python-rpi.gpio’ I’ve got ‘is not installed, so not removed’ for each package.
Fifthly, after running ‘sudo apt-get install -y python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy’ I’ve got message ‘Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?’ And couldn’t do ‘sudo pip3 install st7789 socketIO-client’, becuse there is no pip3. Solved with sudo apt update && sudo apt full-upgrade -y.
Sixthly, tried to uninstall old versions of st7789 and socketIO-client, and got message, that they are not installed.
Finally, installed ‘sudo pip3 install st7789 socketIO-client’ and edited userconfig.txt
Rebooted.
Now I don’t see any plugin installed in Volumio, and I can’t install any plugin as well. They just roll back.

@eddie23

so here are some comments:

  • the pip uninstall part is not really necessary on a fresh install, so there error can be ignored
  • the apt-get remove part is not really necessary on a fresh install, so there error can be ignored
  • all important dependencies will get installed by following command:
sudo apt-get update
sudo apt-get install -y python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy
sudo pip3 install st7789 socketIO-client
  • is there an error poping up at your install?
  • after manual installing dependencies try the following steps:
  • change into pirateaudio pluginfolder by command cd /home/volumio/volumio-plugins/plugins/miscellanea/pirateaudio
  • install plugin manually by command volumio plugin install
  • this should install the plugin under /data/plugins/miscellanea/pirateaudio with all needed dependencies
  • (remove folder /home/volumio/volumio-plugins, if you like)
  • now open your browser and enter http://volumio.local
  • go to the plugin section and activate plugin and set settings
  • restart your raspberry pi

AxLED

@AxLED ,
I did as you recommended in the previous post/
There were no any error messages before volumio plugin install.
But then again, as at my first run, progress went to 70, then installation failed. Output is below:
"volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$ volumio plugin install

This command will install the plugin on your device

Compressing the plugin
No modules found, running “npm install”
npm WARN pirateaudio@0.0.6 No repository field.

Plugin succesfully compressed
Progress: 10
Status :Downloading plugin
nloading plugin at http://127.0.0.1:3000/plugin-serve/pirateaudio.zip
Progress: 30
Status :Creating install location
Creating install location
Progress: 40
Status :Unpacking plugin
Unpacking plugin
Progress: 45
Status :Checking that the plugin is suitable for this version of Volumio The plugin has no node version dependency information. The plugin has no Volumio version dependency information. The plugin may not work on this version of Volumio
Checking that the plugin is suitable for this version of Volumio The plugin has no node version dependency information. The plugin has no Volumio version dependency information. The plugin may not work on this version of Volumio
Progress: 50
Status :Checking for duplicate plugin
Checking for duplicate plugin
Progress: 60
Status :Copying plugin to location
Copying plugin to location
Progress: 70
Status :Installing necessary utilities
Installing necessary utilities
Progress: 0
Status :An error occurred while installing the plugin Error
An error occurred while installing the plugin Error
Failed to Install Plugin
volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$"

After that I go to volumio plugin menu and I see your plugin installed. I have activated it and made settings (changed Y button to pin 24).
My Raspberry Pi plays music from twonky media server, but display stays dark and buttons do not work. And I can’t install any music plugins.

Well, that is it for now. I will wait till you push next iteration of your plugin to volumio or play with volumio2 in the meantime.
Now it’s time for relax.

I wish all of you Merry Christmass and Happy New Year! Stay healthy and be strong!

@eddie23,

i just tested the installation on a clean install of volumio 3.179 on one of my other pi’s and it worked the way i described in Thread 110. Are you trying to install on a fresh volumio image 3.179 install? Is there something else installed?

AxLED

@AxLED ,
Yes, sure, it is absolutely clean install.
I download latest volumio and flash it with Balena etcher. Then follow your instructions.
I am using Raspberry Pi Zero W with Pimoroni Pirate Radio line out.

Please repeat your steps and use different software to flash. Balena seems not to be the perfect one.
(try win32diskimager, or Raspberry Pi Imager)
Have seen some weird behaviors in my own setup, when flkashed with Balena. (stalling, malfunction, strange errors)

@Wheaten ,
Thanks, dude!
I will try your proposed flashers.

Well, @Wheaten , I have flashed Volumio image with Raspberry Pi Imager. And followed @AxLED instructions one more time.
And it’s all the same. Installation goes to 70 percent and then rolls back to 0.
No other error messages. Just this:

volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$ volumio plugin install

This command will install the plugin on your device

Compressing the plugin
No modules found, running "npm install"
npm WARN pirateaudio@0.0.6 No repository field.

Plugin succesfully compressed
Progress: 10
Status :Downloading plugin
"nloading plugin at http://127.zero.zero.one:3000/plugin-serve/pirateaudio.zip"
Progress: 30
Status :Creating install location
Creating install location
Progress: 40
Status :Unpacking plugin
Unpacking plugin
Progress: 45
Status :Checking that the plugin is suitable for this version of Volumio The plugin has no node version dependency information. The plugin has no Volumio version dependency information. The plugin may not work on this version of Volumio
Checking that the plugin is suitable for this version of Volumio The plugin has no node version dependency information. The plugin has no Volumio version dependency information. The plugin may not work on this version of Volumio
Progress: 50
Status :Checking for duplicate plugin
Checking for duplicate plugin
Progress: 60
Status :Copying plugin to location
Copying plugin to location
Progress: 70
Status :Installing necessary utilities
Installing necessary utilities
Progress: 0
Status :An error occurred while installing the plugin Error
An error occurred while installing the plugin Error
Failed to Install Plugin
volumio@volumio:~/volumio-plugins/plugins/miscellanea/pirateaudio$