Pirate Audio Headphone Amp Help

I’m new to Pimoroni products and I was hoping that this would be easy sailing.
I’ve followed the instructions on the product page, amended the boot/config.txt file with respect to disabling onboard audio and although I can get audio out of the headphone jack whilst using VLC I’m not getting anything via Morpidy nor the onboard LCD display.

I am starting to realise this isn’y for the lay person and my experience so far is terrible.

Has anyone else have this up and running and if so how?

Thanks

If you type aplay -l what do you get? If you have correctly disabled the onboard sound then it should only list one soundcard:

pi@zero:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0

However, since you say you are not getting anything on the LCD display it sounds like something very fundamental has gone wrong.

Morning.
I’m getting audio out via VLC player, but nothing via Mopidy(?)
The display shows icons, pause, next, volume but doesn’t display artwork etc and the control buttons do not control any tracks, volume.

So far it’s a frustrating experience.

If you’re not using the Mopidy-Iris (web) front end to start a track playing then you might have some difficulty. The buttons and interface on the LCD are not sufficient to select songs/lists and start playback, only to manage playback of a currently playing playlist.

There have been a lot of improvements to the install script since you first installed- it might be easier to install a fresh copy of Raspbian and start the install process from the beginning- although in this case you don’t look far off.

If you want to forge ahead with trying to get your existing install up and running, then you should post the (sanitized) output of /etc/mopidy/mopidy.conf which you can display in Terminal using sudo cat /etc/mopidy/mopidy.conf.

You should probably also update the plugins: sudo pip install --upgrade mopidy-pidi pidi-display-st7789 pidi-display-pil

You can also run sudo systemctl status mopidy to determine if Mopidy is outputting any debug information that might suggest what’s wrong.

You may also be able to check /var/log/mopidy/mopidy.log depending on your setup.

Further to this I’ve made some improvements to install.sh that should make it better able to recover configuration files botched by earlier versions of the installer.

If you still have a local copy of the pirate-audio github repo, you could try a git pull origin master followed by running sudo ./install.sh again.

Your configuration will be backed up so you’ll be able to copy/patch any settings over.

Hi

I’m having the same problem, same screen display.
Error 98 address already in use. For the front end.
I have tried twice with a clean version of buster, but is still the same problem.

@rivale are you attempting to run mopidy manually?

The installer should set it up with the assumption it’ll be run as a service, and sudo systemctl status mopidy should show whether or not it’s currently running.

Thanks for your prompt reply, I have sorted the problem with the address. The status says that everything is running ok but my display is still the same(only showing the. Volume control and the pause and next track button), I have done the updating and upgrading.
I can see the raspberry server on my Mopidy app on my phone.
I would be grateful for any help. By the way what should the front end on the display look like?
The examples works ok.
Thanks

1 Like

I’m now able to ‘see’ the rpi via the Android Mopidy Mobile app and that’s about it.
Music files are installed in the music folder on the sd card and an external ssd and I’m unable to select an album/track.
Plus I’m in the same position with respect to the screen, play and volume showing and that’s it.

Until a song is playing then the display will only show volume/control icons. I’m working on updates to make it show the IP address of the Mopidy server by default, since that’s considerable more useful.

@sandyjmacdonald did some poking into local file storage and found that using SQLite (a real database) instead of JSON (a text “database”) has a big impact on the Pi. We’re going to update our install script to set this up properly.

Either way, Mopidy needs to scan tracks and add them to the database before it will play local files. There should be a button in settings for this, otherwise you can run sudo mopidyctl local scan on command-line.

Sorry for the confusion here, you’re not the only ones having trouble with Mopidy. It’s great when it’s up and running, but certainly not without its config foibles to trip up beginners.

Hi
I finally got my display to show and play my local files.

I edited the Mopidy conf file
Sudo nano /etc/Mopidy/Mopidy.conf

Changed the
[local]
media_dir = /var/lib/Mopidy/media
to
media_dir = /home/pi/Music

All my music is in the Music directory.

I tried the Mopidy local scan it seems to be working but the library.json.gz did appear on iris but it seems to be corrupted, or I was doing something wrong.

Hi
did you get the pirate audio working?

Gave up and returning it.
I’m not interested in troubleshooting a product that shouldn’t have issues.
Shame as I don’t mind tinkering and this was my first Pimoroni product.

I managed to get mine going. Shame you had to return it.
I always find Pimoroni kit very good and always managed to get them going, and I was going to say how I got it going.

1 Like

You can still say how you got it going, I’m.sure it would be helpful for others.

1 Like

I’m really frustrated as well. I was able to install the software, but am not sure where to go from there? I would like to use Spotify on the device, but not sure what to do? I found an install file that I was able to edit and add my Spotify username, password, client id, and secret number, but nothing happens when I reboot the pi. Could you list the directions on how to add Spotify once the automatic install is finished? Additional steps would be greatly appreciated. Also, I’m not sure how Mopidy on the web interacts with the amp? Do I go to Modipy.com to stream? Thanks.

Hi
This is how i got it working.

I put my music in the Music folder in the raspberry pi.

Edited the Mopidy.conf:

Sudo nano /etc/Mopidy.conf

Changed the line

[local]
Media_dir = /var/lib/Mopidy/media

To

[local]
Media_dir = /home/pi/Music

Then found the iP address of the pi

In the terminal type

hostname -I

Then open a browser in a tablet or phone and enter

http://local:6680/iris/

Where local = the IP address

Once their iris page is up press

Setting

Scroll to the bottom of the page and click

Run local scan

Now it will start to scan, but it may take a few minutes depending on the number of files you have in the music folder.

Once it says the scan is completed click
Restart server

When Mopidy is reconnected click

Browse

And

Local media

You should now have the list of folder or tracks.

Let me know if it works for you.

3 Likes

Hi

I don’t have Spotify but on the iris page under setting there is a Spotify button try clicking on it.

Iris

http://piaddress:6680/iris/

How to setup to display Chinese characters on LCD display?

Now Chinese characters shows as TOFU with “X”.

Thank you.

Okay, here are the steps I used to get Spotify to work with the Pirate Radio:

  1. Install the Pirate Radio Audio and Installer that is listed on the Headphone Amp for the Raspberry Pi webpage.
  2. Goto https://mopidy.com/ext/spotify/#authentication
  3. Click on the “Authenticate Mopidy with Spotify” link.
  4. Enter in your “Premium only” Spotify account information – unfortunately, free accounts are not supported.
  5. Write down all the information listed in the window. You will need it in the next few steps
  6. SSH or connect directly with your Raspberry Pi. Plugging a keyboard and montior made this process much easier for me, however, if you know how to access through SSH that works too!
  7. Open a terminal and go to cd /etc/mopidy
  8. Type in sudo nano mopidy.conf
  9. Scroll down and look for an entry that looks like this:

[spotify]
enabled = true
username = your Spotify username (I used my email address)
password = your Spotify account password
client_id = taken from the authenticator page from step 3
client_secret = taken from the authenticator page from step 3

  1. Exit and save mopidy.conf
  2. Open a browser and go to – http://localhost:6680/iris/ (where localhost is your Raspberry Pi’s IP address)
  3. Go to settings
  4. Click on Spotify and sign in to your account again
  5. Restart your Raspberry Pi, then restart Iris again
  6. You should now be able to stream Spotify

*For some reason, even after completing the above steps, I had to wait about 3 hours before it started working. Either there was an issue on Spotify’s side, or it was something going on with Mopidy. In either case, I was able to get everything working in a few hours.

Good luck! Once everything is working, this little amp is a lot of fun.

2 Likes