Raspberry Pi aplay command works, mopidy audio does not

I installed mopidy and iris on my raspberry pi, mostly following this guide before spending quite a bit of time in the official documentation to see if I did something wrong. the aplay audio test works for me, but playing through mopidy does not produce any sound. I am plugged into the audio jack on the pi, and have added the mopidy user to the video group. Any ideas for what I should try next?

Posting my config as a reply as I’m getting a “Too many links” message from the forum.

Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

[audio]
mixer = software
mixer_volume = 
output = alsasink
buffer_time = 

[proxy]
scheme = 
hostname = 
port = 
username = 
password = 

[local]
enabled = true
max_search_results = 100
media_dir = /media/pi/Tim's Stuff/Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions = 
excluded_file_extensions = 
  .cue
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
directories = 
  Albums                  local:directory?type=album
  Artists                 local:directory?type=artist
  Composers               local:directory?type=artist&role=composer
  Genres                  local:directory?type=genre
  Performers              local:directory?type=artist&role=performer
  Release Years           local:directory?type=date&format=%25Y
  Tracks                  local:directory?type=track
  Last Week's Updates     local:directory?max-age=604800
  Last Month's Updates    local:directory?max-age=2592000
timeout = 10
use_artist_sortname = false
album_art_files = 
  *.jpg
  *.jpeg
  *.png

[iris]
enabled = true
country = NZ
locale = en_NZ
spotify_authorization_url = removed urls
lastfm_authorization_url = removed urls
genius_authorization_url = removed urls
data_dir = $XDG_DATA_DIR/iris

[file]
enabled = true
media_dirs = 
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins = 
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols = 
  http
  https
  mms
  rtmp
  rtmps
  rtsp
metadata_blacklist = 
timeout = 5000

Moderator bot is removing my config posts.

What version of Raspberry Pi OS - is this the Desktop or the Lite image? If the former, can you please try the steps in this section.

It is the Desktop image. I just tried those steps but still am not hearing any audio from mopidy.

I see this error in the mopidy status around the time I tried to play:
Feb 11 20:14:38 raspberrypi mopidy[10586]: ERROR [LocalBackend-3] mopidy_local.library Lookup error for local:directory?type=track&album=local:album:md5:357f8d1234f4f038ae5e4aa6488ac428&artist=l

Can you restart Mopidy, try and play something and then post the full log from just that run with:

sudo journalctl _PID=$(systemctl show --value --property MainPID mopidy)

I restarted Mopidy, tried to play something and it played! I went back through my command history and I definitely restarted Mopidy after making the changes last night so I’m not sure what changed… Maybe I needed the pulse restart to happen before the Mopidy restart? Not sure, but it is working now.

Thanks for the help @kingosticks, as I was searching for the solution yesterday I feel like I saw your name on every post, so I just want to say I appreciate your dedication to helping everyone!

Still see that error in the status so here are the logs in case you are interested.

Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.1.1
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.config Loading config from builtin defaults
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.config Loading config from command line options
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.__main__ Enabled extensions: http, iris, softwaremixer, m3u, file, stream, local
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.__main__ Disabled extensions: none
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.commands Starting Mopidy audio
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.commands Starting Mopidy backends: LocalBackend, FileBackend, M3UBackend, StreamBackend
Feb 12 12:33:02 raspberrypi mopidy[4648]: INFO     [Audio-2] mopidy.audio.actor Audio output set to "pulsesink server=127.0.0.1"
Feb 12 12:33:03 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Feb 12 12:33:03 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: IrisFrontend, HttpFrontend
Feb 12 12:33:03 raspberrypi mopidy[4648]: INFO     [IrisFrontend-8] mopidy_iris.core Starting Iris 3.55.4
Feb 12 12:33:03 raspberrypi mopidy[4648]: INFO     [HttpFrontend-10] mopidy.http.actor HTTP server running at [::ffff:0.0.0.0]:6680
Feb 12 12:33:03 raspberrypi mopidy[4648]: INFO     [MainThread] mopidy.commands Starting GLib mainloop
Feb 12 12:33:07 raspberrypi mopidy[4648]: ERROR    [LocalBackend-3] mopidy_local.library Lookup error for local:directory?type=artist: Invalid lookup URI
Feb 12 12:33:19 raspberrypi mopidy[4648]: ERROR    [LocalBackend-3] mopidy_local.library Lookup error for local:directory?type=track&album=local:album:md5:357f8d1234f4f038ae5e4aa6488ac428&artist=lo
lines 1-20/20 (END)

I am glad that fixed it. Raspberry Pi OS has changed to use Pulseaudio recently (for the Desktop image only) so looks like I need to add that specifically to our Raspberry Pi documentation. I don’t use the Desktop image myself so I’ve been a bit lazy in testing it out.

That error is OK now that I can see it’s just from Iris trying to lookup a Mopidy-Local virtual directory Directories (which Mopidy-Local does not support) and that’s fine, Iris will also then do the correct browse call so that’s fine and yes, you are right, nothing to do with your audio problem.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.