Mopidy config file not matching mopityctl config

I am a new user to linux just for the sake of installing snapclient and mopidy. The main source of media would be from Spotify. The status of the mopidy server says it’s running okay, but the web client is not connecting from other computers. I am able to access the localhost client on the ubuntu server. I can’t get iris to work on anything. I eventually get around to running sudo mopidyctl config. It clearly doesn’t match what my .conf file says. I am running mopity as a service and edit the config file in this path:/etc/mopidy/mopidy.conf

Not sure what the problem is. I am running it on my server using an Ubuntu 22.04 VM.

mopidy.conf file:

core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
color = true
config_file =

[audio]
mixer = software
mixer_volume =
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! filesink location=/tmp/snapfifo
buffer_time =

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

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
#password =
max_connections = 5
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
#command_blacklist =
default_playlist_scheme = m3u

[spotify]
enabled = true
username =
password =
client_id = client_id>
client_secret = <client)_secret>
bitrate = 320
volume_normalization = true
private_session = false
timeout = 20
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[spotify_web]
client_id = <client_id>
client_secret = <client)_secret>

[http]
enabled = true
hostname = 0.0.0.0
port = 6680 # Changeme
static_dir =
zeroconf = Mopidy HTTP server on $hostname
csrf_protection = true

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL

[iris]
enabled = true
device = IT
locale - it_IT

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

**Mopidy deps:**Preformatted text

Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps” as user mopidy
WARNING [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf failed; it does not have a config section
Executable: /usr/bin/mopidy
Platform: Linux-5.19.0-41-generic-x86_64-with-glibc2.35
Python: CPython 3.10.6 from /usr/lib/python3.10
Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
Mopidy-Local: 3.2.1 from /usr/lib/python3/dist-packages
Mopidy-InternetArchive: 3.0.1 from /usr/lib/python3/dist-packages
Mopidy-MPD: 3.3.0 from /usr/lib/python3/dist-packages
Mopidy-MPRIS: 3.0.3 from /usr/lib/python3/dist-packages
Mopidy-Spotify: 4.1.1 from /usr/lib/python3/dist-packages
Mopidy-MusicBox-Webclient: 3.1.0 from /usr/local/lib/python3.10/dist-packages
Pykka: 2.0.3 from /usr/lib/python3/dist-packages
setuptools: 59.6.0 from /usr/lib/python3/dist-packages
Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
Mopidy-Mopify: 1.7.3 from /usr/local/lib/python3.10/dist-packages
setuptools: 59.6.0 from /usr/lib/python3/dist-packages
ConfigObj: 5.0.8 from /usr/local/lib/python3.10/dist-packages
six: 1.16.0 from /usr/lib/python3/dist-packages
Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
GStreamer: 1.20.3.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.42.1
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec
mad

sudo mopidyctl config

sudo: /etc/sudo.conf is world writable
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudoers.d is world writable
Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config” as user mopidy
WARNING [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf failed; it does not have a config section
[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 = autoaudiosink
buffer_time =

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

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL

[mopify]
enabled = true
debug = false

[spotify]
enabled = false ; Extension disabled due to config errors.
username = ; Must be set.
password = ; Must be set.
client_id = ; Must be set.
client_secret = ; Must be set.
bitrate = 160
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[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 = 127.0.0.1
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

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[local]
enabled = true
max_search_results = 100
media_dir = /var/lib/mopidy/media
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

[mpris]
enabled = true
bus_type = session

[internetarchive]
enabled = true
base_url = http://archive.org
collections =
audio
etree
librivoxaudio
audio_bookspoetry
audio_tech
audio_music
audio_news
audio_foreign
audio_podcast
audio_religion
audio_formats =
VBR MP3
64Kbps MP3
image_formats =
JPEG
JPEG Thumb
browse_limit = 100
browse_views =
downloads desc|Views
titleSorter asc|Title
publicdate desc|Date Archived
date desc|Date Published
creatorSorter asc|Creator
search_limit = 20
search_order =
cache_size = 128
cache_ttl = 86400
retries = 3
timeout = 10

They don’t need to match, it’s best they don’t. Remove everything from your mopidy.conf except the specific options you need to be different as per the docs at Configuration — Mopidy 3.4.1-7-g1e299e58 documentation

Uninstall Spotify_web, it’s not supported

I’ve no idea what you need to do for your VM networking but ensure you’ve read Mopidy-HTTP — Mopidy 3.4.1-7-g1e299e58 documentation

Thanks for the help. I was able to get it working by changing the [core] section and getting rid of some unneeded stuff in the config file. Now i’ve got spotify, yt music, and snapcast all connected. However, I am not able to play anything. Using Muse web player with YT music I was able to get the snapclients to change to “playing”. I am not hearing any sound though, not to mention the Now playijng section doesn’t work. Play/Pause/Next song does nothing. None of the other web clients do anything either.

This is what the Mopidy status shows:

May 21 16:47:55 Ubuntu mopidy[7351]: WARNING 2023-05-21 16:47:55,219 [7351:Core-13 (_actor_loop)] mopidy.core.tracklist
May 21 16:47:55 Ubuntu mopidy[7351]: Track is not playable: ytmusic:track:ZbkeccGxPJo
May 21 16:47:55 Ubuntu mopidy[7351]: INFO 2023-05-21 16:47:55,367 [7351:YTMusicBackend-3 (_actor_loop)] mopidy_ytmusic
May 21 16:47:55 Ubuntu mopidy[7351]: YTMusic Found AUDIO_QUALITY_HIGH stream with 259506 bitrate for 4G2N2ob15do
May 21 16:47:55 Ubuntu mopidy[7351]: ERROR 2023-05-21 16:47:55,650 [7351:MainThread] mopidy.audio.gst
May 21 16:47:55 Ubuntu mopidy[7351]: GStreamer error: Could not open file “/tmp/snapfifo” for writing.
May 21 16:47:55 Ubuntu mopidy[7351]: WARNING 2023-05-21 16:47:55,650 [7351:Audio-2 (_actor_loop)] mopidy.audio.actor
May 21 16:47:55 Ubuntu mopidy[7351]: Setting GStreamer state to GST_STATE_PLAYING failed
May 21 16:47:55 Ubuntu mopidy[7351]: WARNING 2023-05-21 16:47:55,651 [7351:Core-13 (_actor_loop)] mopidy.core.tracklist
May 21 16:47:55 Ubuntu mopidy[7351]: Track is not playable: ytmusic:track:4G2N2ob15do

There are multiple ways to use Snapcast with Mopidy and they are documented on the Snapcast repo. The FIFO is the least reliable.

I went ahead and decided to go with Alsa instead of fifo. After taking the steps and download gstream, I managed to get playback. Only problem now is that I have no sound. Snapserver shows that the Alsa source is idle. Did I miss any steps?

I added this to the snapserver.conf
source = alsa:///?name=Alsa&device=hw:0,1,0

and this is my updated mopidy.conf

[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 %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
color = true
config_file =

[audio]
mixer = software
mixer_volume =
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! alsasink device=hw:0,0,0
buffer_time =

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

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
#password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname

[spotify]
enabled = true
username =
password =
client_id =
client_secret =

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL

[muse]
enabled = true

[m3u]
enabled = true

[ytmusic]
enabled = true
auth_json = /etc/mopidy/auth.json

[iris]
enabled = true

[local]
media_dir = /home/hemmie/Music

I was able to get sound by changing the device to hw:1,0,0 in the mopidy conf and hw:1,1,0 in snapserver.conf. I also changed it to pcm instead of flac.

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