This guide will help you set up the SimplicityPlayer on your Raspberry Pi. The installation process is divided into several steps, each of which is detailed below.
Before you start, make sure you have the following components ready:
- Raspberry Pi 3A+ (other models may work, but the software was tested on this model)
- InnoMaker HiFi DAC HAT (RPI-HIFI-DAC-PCM5122)
- RFID Reader (RC522)
- LCD1602 + LCD I2C Interface (PCF8574)
- Cherry MX Button with a 4k7 Ohm Resistor
- Install Raspberry Pi OS Lite on your Raspberry Pi. You can find the official installation guide here.
- Set up your Raspberry Pi, connect it to the network and connect to it via SSH.
- Update the system by running the following commands:
sudo apt update sudo apt upgrade
- Enable the I2C & SPI interface by running:
sudo raspi-config
- Select
3 Interfacing Options
. - Select
I4 SPI
. Would you like the SPI interface to be enabled?
->Yes
- The SPI interface is now enabled.
- Select
3 Interfacing Options
. - Select
I5 I2C
. Would you like the ARM I2C interface to be enabled?
->Yes
- The ARM I2C interface is now enabled.
- Select
Finish
.
- Select
- Connect the InnoMaker HiFi DAC HAT to your Raspberry Pi (only when the Raspberry Pi is powered off!)
- Edit the
/boot/firmware/config.txt
file by running:sudo nano /boot/firmware/config.txt
- Add the following lines to the end of the file:
dtoverlay=allo-boss-dac-pcm512x-audio
- Save the file by pressing
Ctrl + X
, thenY
, and finallyEnter
. - Reboot your Raspberry Pi by running:
sudo reboot
- Check the audio output devices by running:
aplay -l
- Find the device that corresponds to the InnoMaker HiFi DAC HAT. It should
look similar to this:
card 2: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm512x-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
- Edit the
/etc/asound.conf
file by running:sudo nano /etc/asound.conf
- Insert the following lines to the file:
change the
pcm.!default { type hw card 2 } ctl.!default { type hw card 2 }
card 2
to the card number you found in step 2. - Save the file by pressing
Ctrl + X
, thenY
, and finallyEnter
. - Reboot your Raspberry Pi by running:
sudo reboot
- Test the audio output by running:
You should hear a voice saying "Front Left" and "Front Right" from your speakers.
speaker-test -c2 -t wav
- Install MPD by running:
sudo apt install alsa-utils mpd
- Edit the
/etc/mpd.conf
file by running:sudo nano /etc/mpd.conf
- Add the following lines to the end of the file:
change the
audio_output { type "alsa" name "RPI-HIFI-DAC-PCM5122" device "hw:2,0" mixer_control "Analogue" }
device "hw:2,0"
to the device number you found in step 2. - Save the file by pressing
Ctrl + X
, thenY
, and finallyEnter
. - Enable and restart MPD service by running:
sudo systemctl enable mpd sudo systemctl restart mpd
- Install the required packages by running:
sudo apt install udevil
- Create a new file by running:
sudo nano /etc/systemd/system/devmon.servic
- Insert the following lines to the file:
[Unit] Description=Automount USB drives After=network.target [Service] Type=simple User=pi Restart=on-abort ExecStart=/usr/bin/devmon [Install] WantedBy=multi-user.target
- Save the file by pressing
Ctrl + X
, thenY
, and finallyEnter
. - Enable and start the service by running:
sudo systemctl enable devmon sudo systemctl start devmon
- Install the required packages by running:
sudo apt install python3-virtualenv git
- Clone the repository by running:
cd ~ git clone https://github.com/meteyou/SimplicityPlayer.git
- Create a new virtual environment by running:
cd ~ virtualenv -p python3 ./SimplicityPlayer-env ./SimplicityPlayer-env/bin/pip install -r ./SimplicityPlayer/requirements.txt
- Copy config.ini.example to config.ini by running:
cp ~/SimplicityPlayer/config.ini.example ~/SimplicityPlayer/config.ini
- Copy the systemd service file by running:
sudo cp ~/SimplicityPlayer/SimplicityPlayer.service /etc/systemd/system/
- Enable and start the service by running:
sudo systemctl enable SimplicityPlayer sudo systemctl start SimplicityPlayer