Last active
December 8, 2022 22:23
-
-
Save EndingCredits/fbe43f74c2ef477357f2603ebb6046b0 to your computer and use it in GitHub Desktop.
Setting up mopidy and MPD/http clients
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install mopidy: ##N.B: You might need to do this as per instructions on `https://docs.mopidy.com/en/latest/installation/debian/` | |
`sudo apt-get update && sudo apt-get install mopidy` | |
Set the mopidy to run automatically via `sudo systemctl enable mopidy` | |
Now we need to set up configuration files. | |
Since we're going to be running mopidy as a service, we need to edit `/etc/mopidy/mopidy.conf`(see https://docs.mopidy.com/en/latest/service/#service) | |
Add the following to to configuration file: | |
``` | |
[mpd] | |
enabled = true | |
hostname = :: | |
``` | |
This sets the MPD server of mopidy to listen on all ipv4/6 interfaces. | |
Now we'll set up a web-client. | |
Install mopidy-moped with `sudo pip install Mopidy-Moped` (`pip` is a client to automatically handle python packages, since mopidy is python based, most extensions are wrappped up as normal python packages) | |
We also need to enable HTTP server by adding the following to the configuration file: | |
``` | |
[http] | |
enabled = true | |
hostname = :: | |
``` | |
and | |
``` | |
[moped] | |
enabled = true | |
``` | |
To use bluetooth we need to upgrade raspbian: | |
``` | |
sudo apt-get dist-upgrade | |
sudo rpi-update | |
``` | |
Also: | |
connect to device with bluetoothctl | |
Configure pulseaudio to run as daemon ? | |
edit /etc/bluetooth/audio.conf ? | |
add mopidy to audio usergroup ? | |
Configure pulseaudio to allow socket access ? | |
Test sound with mplayer, aplay, gstreamer | |
Set up start script to automatically pair with speakers | |
Python script to automatically reconnect speakers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment