Config file edit / Spotify playback problems

Hi,

I would be very happy with some help, as I seem to miss something regarding the first setup.

I managed to install Mopidy on a Raspberry Pi as a service.

root@pi:/etc/mopidy# sudo systemctl status mopidy
● mopidy.service - Mopidy music server
   Loaded: loaded (/lib/systemd/system/mopidy.service; enabled)
   Active: active (running) since Sun 2017-03-19 14:06:01 CET; 29min ago
  Process: 18914 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
  Process: 18910 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
 Main PID: 18919 (mopidy)
   CGroup: /system.slice/mopidy.service
           └─18919 /usr/bin/python /usr/bin/mopidy --config /usr/share/mopidy...

Mar 19 14:06:07 pi mopidy[18919]: INFO     Starting Mopidy mixer: SoftwareMixer
Mar 19 14:06:07 pi mopidy[18919]: INFO     Starting Mopidy audio
Mar 19 14:06:07 pi mopidy[18919]: INFO     Starting Mopidy backends: Stream...nd
Mar 19 14:06:07 pi mopidy[18919]: INFO     Audio output set to "autoaudiosink"
Mar 19 14:06:08 pi mopidy[18919]: INFO     Creating dir /var/lib/mopidy/.lo...3u
Mar 19 14:06:08 pi mopidy[18919]: INFO     Starting Mopidy core
Mar 19 14:06:08 pi mopidy[18919]: INFO     Starting Mopidy frontends: Queue...nd
Mar 19 14:06:08 pi mopidy[18919]: INFO     MPD server running at [::ffff:12...00
Mar 19 14:06:08 pi mopidy[18919]: INFO     HTTP server running at [::ffff:1...80
Mar 19 14:06:08 pi mopidy[18919]: INFO     Starting GLib mainloop
Hint: Some lines were ellipsized, use -l to show in full.

When checking the active config I get:

root@pi:/etc/mopidy# sudo mopidyctl config
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
[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]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
debug_file = mopidy.log
config_file =

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

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

[mopify]
enabled = true
debug = false

[spotify]
enabled = false  ; Extension disabled due to config errors.
username =   ; Must be set.
password =   ; 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 =

[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

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

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

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

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs =
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions =
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = false  ; Extension disabled due to config errors.
library = json
media_dir =  ; Must be set.
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

However when I nano to /etc/mopidy/mopidy.conf I only get this:

root@pi:/etc/mopidy# nano mopidy.conf
  GNU nano 2.2.6             File: mopidy.conf

# For further information about options in this file see:
#   http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 2.1.0
#   Mopidy-File 2.1.0
#   Mopidy-HTTP 2.1.0
#   Mopidy-Local 2.1.0
#   Mopidy-M3U 2.1.0
#   Mopidy-MPD 2.1.0
#   Mopidy-SoftwareMixer 2.1.0
#   Mopidy-Stream 2.1.0
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[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]
#color = true
#console_format = %(levelname)-8s %(message)s
#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name$
#debug_file = mopidy.log
#config_file =

[audio]
#mixer = software
#mixer_volume =
#output = autoaudiosink
#buffer_time =

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

How come this is the case? Why is Mopidy telling me he has that file loaded but the content is totally different? Where can I edit the correct file? Thanks so muc in advance!

You are looking at the correct file.

All the config settings have a default value that’s defined elsewhere. Anything you put in /etc/mopidy/mopidy.conf will override the default value. This is the way many (all?) Linux service programs work. If you are happy with the defaults then there is no need to change /etc/mopidy/mopidy.conf at all.

‘mopidyctl config’ shows you the effective configuration. This is the default configuration plus any overrides that you’ve put in
/etc/mopidy/mopidy.conf (or similar) . It’s the configuration Mopidy will use.

Note that lines starting with a ‘#’ are comments and are ignored. If everything in /etc/mopidy/mopidy.conf is commented out then its the same as the file being empty and you’ll be using the default values for everything.

Wow thanks, that did it!

I also was able to start up http://192.168.178.27:6680/mopify/ and http://192.168.178.27:6680/iris/ however sound from Spotify remains sketchy. Songs start to play via HDMI to my Marantz NR1604, however begin to stutter at some point. When playing some other songs no sound is output at all. Any quick fix?

Quick edit:

After starting Mopidy I see:

Mar 19 16:36:32 pi mopidy[1658]: INFO     Loading config from command line options
Mar 19 16:36:32 pi mopidy[1658]: INFO     Enabled extensions: mopify, iris, mpd, http, stream, spotify, m3u, spotify_tunigo, youtube, softwaremixer, file, local-images, tunein, soundcloud
Mar 19 16:36:32 pi mopidy[1658]: INFO     Disabled extensions: local
Mar 19 16:36:32 pi mopidy[1658]: WARNING  Found local configuration errors, the extension has been automatically disabled:
Mar 19 16:36:32 pi mopidy[1658]: WARNING    local/media_dir must be set.
Mar 19 16:36:32 pi mopidy[1658]: WARNING  Please fix the extension configuration errors or disable the extensions to silence these messages.
Mar 19 16:36:34 pi mopidy[1658]: INFO     Starting Mopidy mixer: SoftwareMixer
Mar 19 16:36:34 pi mopidy[1658]: INFO     Starting Mopidy audio
Mar 19 16:36:34 pi mopidy[1658]: INFO     Starting Mopidy backends: TuneInBackend, SpotifyBackend, YoutubeBackend, StreamBackend, M3UBackend, FileBackend, SoundCloudBackend, SpotifyTunigoBackend
Mar 19 16:36:34 pi mopidy[1658]: INFO     Audio output set to "autoaudiosink"

Playing something in Spotify works, then when switching Playlist and pressing Play nothing plays anymore. The status now is:

Mar 19 16:37:15 pi mopidy[1658]: INFO     Starting Mopidy frontends: IrisFrontend, QueueManagerFrontend, MpdFrontend, HttpFrontend
Mar 19 16:37:15 pi mopidy[1658]: INFO     Starting Iris 2.13.3
Mar 19 16:37:15 pi mopidy[1658]: INFO     MPD server running at [::ffff:0.0.0.0]:6600
Mar 19 16:37:15 pi mopidy[1658]: INFO     HTTP server running at [::ffff:0.0.0.0]:6680
Mar 19 16:37:15 pi mopidy[1658]: INFO     Starting GLib mainloop
Mar 19 16:37:15 pi mopidy[1658]: INFO     Creating dir /var/lib/mopidy/.local/share/mopidy/local-images
Mar 19 16:39:04 pi pulseaudio[1744]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Mar 19 16:39:04 pi pulseaudio[1744]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Mar 19 16:39:04 pi pulseaudio[1744]: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with sign...doesn't exist
Mar 19 16:39:05 pi mopidy[1658]: WARNING  GStreamer warning: gst-stream-error-quark: No volume control found (3)
Hint: Some lines were ellipsized, use -l to show in full.