raspberry-pi:music_player
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry-pi:music_player [2020/10/18 15:32] – Wulf Rajek | raspberry-pi:music_player [2023/05/29 11:55] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| https:// | https:// | ||
| + | ===== Hardware ===== | ||
| Pimoroni Pirate Audio Headphone AMP: | Pimoroni Pirate Audio Headphone AMP: | ||
| Line 14: | Line 15: | ||
| https:// | https:// | ||
| - | Pimoroni Pirate Audio Case: | + | Pimoroni Pirate Audio Case with buttons: |
| + | https:// | ||
| + | |||
| + | Pimoroni Pirate Audio Case (link dead): | ||
| https:// | https:// | ||
| Alternative case ideas: | Alternative case ideas: | ||
| https:// | https:// | ||
| + | |||
| + | Angled case: | ||
| + | https:// | ||
| + | |||
| + | ===== System installation ===== | ||
| + | |||
| + | Download Raspberry OS lite (Buster) | ||
| + | https:// | ||
| + | Then flash using Balena Etcher or similar | ||
| + | https:// | ||
| + | |||
| + | Note: / | ||
| + | |||
| + | WIFI config: | ||
| + | create wpa_supplicant.conf in /boot | ||
| + | <code - / | ||
| + | ctrl_interface=DIR=/ | ||
| + | update_config=1 | ||
| + | country=< | ||
| + | |||
| + | network={ | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Enable SSH Server: | ||
| + | create empty file ssh in boot folder | ||
| + | |||
| + | / | ||
| + | <code - / | ||
| + | #Set GPU memory to lowest value | ||
| + | gpu_mem=16 | ||
| + | |||
| + | #Disable boot splash screen | ||
| + | disable_splash=1 | ||
| + | |||
| + | #Configure Pimoroni Pirate audio DAC | ||
| + | dtoverlay=hifiberry-dac | ||
| + | gpio=25=op, | ||
| + | |||
| + | #Enable SPI for display of Pimoroni Pirate Audio | ||
| + | dtparam=spi=on | ||
| + | |||
| + | #Switch off onboard audio | ||
| + | dtparam=audio=off | ||
| + | |||
| + | # Turn off HDMI? | ||
| + | # | ||
| + | # | ||
| + | hdmi_blanking=2 # HDMI Output will be disabled on boot and can be enabled using the above listed commands. | ||
| + | |||
| + | [pi0] | ||
| + | # Disable the ACT LED on the Pi Zero only | ||
| + | dtparam=act_led_trigger=none | ||
| + | dtparam=act_led_activelow=on | ||
| + | </ | ||
| + | |||
| + | Disable HDMI port on boot (power saving during headless operation) | ||
| + | / | ||
| + | Add the line to / | ||
| + | |||
| + | Now insert the SD-Card into the Pi and power it up. Then connect to it via SSH. | ||
| + | |||
| + | Security. Default user pi with password raspberry | ||
| + | https:// | ||
| + | |||
| + | |||
| + | ===== Mopidy Installation ===== | ||
| + | |||
| + | Install git if not already installed: | ||
| + | < | ||
| + | sudo apt-get install git | ||
| + | </ | ||
| + | |||
| + | # https:// | ||
| + | |||
| + | #This will install python3 pip,wheel and pirate audio modules | ||
| + | #Then add mopidy apt sources and install mopidy including mopidy-spotify | ||
| + | #Then install mopidy-iris web interface and Pirate Audio plugins | ||
| + | #And create system service to autostart mopidy | ||
| + | < | ||
| + | cd /usr/src | ||
| + | sudo git clone https:// | ||
| + | cd pirate-audio/ | ||
| + | sudo ./ | ||
| + | </ | ||
| + | |||
| + | Additional web interfaces can be installed: | ||
| + | https:// | ||
| + | < | ||
| + | sudo python3 -m pip install Mopidy-MusicBox-Webclient | ||
| + | </ | ||
| + | |||
| + | https:// | ||
| + | < | ||
| + | sudo python3 -m pip install Mopidy-Mobile | ||
| + | </ | ||
| + | |||
| + | #Removing mopidy spotify plugin and bluetooth support | ||
| + | < | ||
| + | sudo apt-get purge mopidy-spotify | ||
| + | sudo apt-get purge bluez bluez-firmware | ||
| + | sudo apt autoremove | ||
| + | </ | ||
| + | |||
| + | Install mopidy-local extension backend (local+sqlite combined) to build local index for search and increased performance. | ||
| + | https:// | ||
| + | < | ||
| + | sudo python3 -m pip install Mopidy-Local | ||
| + | </ | ||
| + | |||
| + | #Display will show ip and default mopidy port :6680 for web interface. Iris web client needs to be selected | ||
| + | |||
| + | |||
| + | #Edit Mopidy config | ||
| + | sudo vi / | ||
| + | < | ||
| + | #disable file extension | ||
| + | [file] | ||
| + | enabled = false | ||
| + | |||
| + | #enable local with sqlite extension | ||
| + | [local] | ||
| + | enabled = true | ||
| + | media_dir = / | ||
| + | scan_timeout = 5000 | ||
| + | scan_flush_threshold = 50 | ||
| + | album_art_files = | ||
| + | cover.* | ||
| + | folder.* | ||
| + | directories = | ||
| + | Albums | ||
| + | Artists | ||
| + | Composers | ||
| + | Genres | ||
| + | Performers | ||
| + | Release Years | ||
| + | Tracks | ||
| + | Last Week's Updates | ||
| + | Last Month' | ||
| + | timeout = 10 | ||
| + | |||
| + | |||
| + | #add to http section to enable web server for web front-ends | ||
| + | enabled = true | ||
| + | #port = 80 #issue with mopidy user and ports <1024 | ||
| + | zeroconf = Mopidy HTTP server on $hostname: | ||
| + | # Set to iris, mobile or musicbox_webclient, | ||
| + | default_app = iris | ||
| + | |||
| + | #change in audio section | ||
| + | mixer_volume = 20 | ||
| + | </ | ||
| + | |||
| + | When using Iris webclient: | ||
| + | < | ||
| + | #add iris section: | ||
| + | [iris] | ||
| + | enabled = true | ||
| + | country = GB | ||
| + | locale = en_GB | ||
| + | </ | ||
| + | |||
| + | When using MusicBox Webclient: | ||
| + | < | ||
| + | [musicbox_webclient] | ||
| + | enabled = true | ||
| + | musicbox = false #when on Pi MusicBox, adds system control/ | ||
| + | websocket_host = | ||
| + | websocket_port = | ||
| + | on_track_click = PLAY_ALL | ||
| + | # on_track_click: | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | sudo mkdir / | ||
| + | sudo mkdir / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | sudo apt-get upgrade | ||
| + | </ | ||
| + | |||
| + | SMB mount the manual way (/ | ||
| + | #Note experiment with rsize=61440 option and/or use nounix mount option | ||
| + | < | ||
| + | sudo mount -t cifs -o ro, | ||
| + | </ | ||
| + | |||
| + | sudo vi /etc/fstab | ||
| + | #add | ||
| + | < | ||
| + | // | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | mount / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | sudo reboot | ||
| + | </ | ||
| + | |||
| + | |||
| + | Trigger scan of media directories (when mopidy runs as service): | ||
| + | < | ||
| + | sudo mopidyctl local scan | ||
| + | </ | ||
| + | or when running from terminal as logged in user: | ||
| + | < | ||
| + | mopidy local scan | ||
| + | </ | ||
| + | |||
| + | Note the default configuration files mopidy is looking for are in ~/ | ||
| + | The service file using the mopidy user is: | ||
| + | / | ||
| + | |||
| + | ===== Mopidy MPD ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | < | ||
| + | < | ||
| + | [mpd] | ||
| + | hostname = 0.0.0.0 | ||
| + | </ | ||
| + | |||
| + | ===== Edit the volume button' | ||
| + | |||
| + | Default volume button step is 5%. Adding < | ||
| + | |||
| + | |||
| + | ===== Other music player projects ===== | ||
| + | |||
| + | Volumio (headless music player) | ||
| + | https:// | ||
| + | |||
| + | Pi MusicBox (appears to be dead) | ||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | |||
| + | ===== Various Links ===== | ||
| + | |||
| + | Mopidy Extensions: https:// | ||
| + | Mopidy Config: https:// | ||
| + | Mopidy Iris: https:// | ||
| + | Install guide: https:// | ||
| + | Mopidy Beets: https:// | ||
| + | Mopidy Beets2: https:// | ||
| + | Mopidy Beets3: https:// | ||
| + | Mopidy Beets ext: https:// | ||
| + | Github Mopidy repos: https:// | ||
| + | Mopidy-Pidi https:// | ||
| + | Mopidy-Pidi 2 https:// | ||
| + | Pirate Audio Mopidy https:// | ||
| + | Jivelite on a Pirate Audio screen: https:// | ||
| + | |||
| + | Pimoroni Pirate Audio Case: https:// | ||
raspberry-pi/music_player.1603031541.txt.gz · Last modified: (external edit)