Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Support for MPD satellite mode
#7
(09-23-2021, 06:22 AM)cprogrammer Wrote: I use satellite mode for all my players around 8 of them. I have enabled NFSv4 on a RPI4 which uses the database plugin "simple". On the satellite mode I use the proxy database plugin. When I add songs to the NFS server, the same database gets available to all satellite players. The advantage of this setup is that you need to update only one server when you add/delete songs and this can be automatic if you have auto_update to yes in mpd.conf. Also when you save a playlist on any of the satellite mpd player, the same playlist gets available on all mpd players.

Quote:auto_update                      "yes"


Code:
# mpd.conf database configuration entry for PI4
music_directory     "/var/lib/mpd/MDrive/Music"
playlist_directory  "/var/lib/mpd/MDrive/playlists"
database {
 plugin          "simple"
 path            "/var/lib/mpd/MDrive/data/tag_cache.PI4"
 cache_directory "/var/lib/mpd/MDrive/cache"
}

# mpd.conf database configuration entry for client
# pi4 is an entry in /etc/hosts for the device
# providing the database
music_directory     "/var/lib/mpd/MDrive/Music"
playlist_directory  "/var/lib/mpd/MDrive/playlists"
database {
   plugin          "proxy"
   host            "pi4"
   port            "6600"
}

There are few issues when you use this kind of setup

1) The satellite mpd will hang / not work when your central mpd server is down or if there is any network issue
2) You need a good network. But I would like to mention that this has never been an issue for me when using wireless n and above
3) Makes configuration complicated for end users. They need to configure a network share using NFS or Samba on the server that will have the mpd database
4) You need to configure all satellite clients to mount the share on the same directory mentioned for music_directory in /etc/mpd.conf. So the end user will have to edit /etc/fstab or have the mount command somewhere or configure autofs which will automount the directory whenever it gets accessed.

I know two clients that support this
Desktop Client Cantata has the option 'Server detects changes automatically'
[img]blob:http://moodeaudio.org/d6ba9a9d-44d5-4586-9598-91f87f164193[/img]
The other player that I know supports this is rompr. For satellite players one has to check the 'Remote' radiobutton and it shows 'Update MPD database' only when you connect to the main mpd server
[img]blob:http://moodeaudio.org/bc671624-39d6-4c74-9298-ec6ae0337ea5[/img]

Added to TODO list for post 7.4.0 release.

It's prolly more of an expert-mode configuration but I think a UI for it is doable. It will just take some thought.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
Support for MPD satellite mode - by apastuszak - 07-07-2021, 02:29 PM
RE: Support for MPD satellite mode - by Tim Curtis - 09-23-2021, 11:12 AM
RE: Support for MPD satellite mode - by hahn500 - 04-24-2024, 06:15 PM
RE: Support for MPD satellite mode - by EdwinKM - 05-06-2024, 06:22 PM

Forum Jump: