Current standard and tested setup is:
-
Raspberry Pi 4 Model B Raspberry Pi OS Bookworm
-
Official 7" touchscreen
-
HiFiBerry MiniAmp
-
ICY BOX Dual Raspberry Pi GPIO Header
-
Visaton FRS 8M speakers
-
ATX Power On Off Switch with Power LED for ATX mainboards (4 cables)
-
User & group name
raspifm
If not mentioned otherwise, setup instructions refer to this setup.
NO WARRANTIES AT ALL, BUT ESPECIALLY NOT ON ANY HARDWARE SETUP/CONNECTION/MODIFCATION!
Do a sudo apt update first.
-
- Mount the MiniAmp on the GPIO header and the header to the Raspberry board, so that that unused GPIO Pins still can be used
-
- Make a backup of config.txt file to your current directory:
cp /boot/config.txt ./
- Make a backup of config.txt file to your current directory:
-
- Edit config.txt:
sudo nano /boot/config.txt
- Edit config.txt:
-
- Disable the line
dtparam=audio=onto# dtparam=audio=on
- Disable the line
-
- Edit the line
dtoverlay=vc4-kms-v3dtodtoverlay=vc4-kms-v3d,noaudio
- Edit the line
-
- Add lines
dtoverlay=hifiberry-dacandforce_eeprom_read=0before the first filter section (cm4)
- Add lines
-
- Connect DSI and power cables (to the GPIO header), official documentation on www.raspberrypi.com
-
- I connected 5V to Pin 2/5V and Ground to Pin 14/Ground as I took Pin 6/Ground for the Power Switch (see next section)
-
- Connect Power LED + to Pin 7/GPIO 4, Power LED - to Pin 9/Ground and the Power Switch cables over Pin 5/GPIO 3 and Pin 6/Ground
-
- Edit config.txt:
sudo nano /boot/config.txt(backup done in MiniAmp setup, if not do it now!)
- Edit config.txt:
-
- Add lines
dtoverlay=gpio-shutdown,gpio_pin=3andgpio=4=op,dhbefore the first filter section (cm4)
- Add lines
-
- Create a new directory for the repository:
mkdir ~/raspifm_repoand switch to the directory:cd ~/raspifm_repo.
- Create a new directory for the repository:
-
- Clone the repository:
git clone https://github.com/Drexel2k/raspiFM .
- Clone the repository:
-
- If you do not want to use the latest commit, but the latest release, look up the latest release tag: https://github.com/Drexel2k/raspiFM/releases or https://github.com/Drexel2k/raspiFM/tags and do:
git checkout tags/v1.0e.g.
- If you do not want to use the latest commit, but the latest release, look up the latest release tag: https://github.com/Drexel2k/raspiFM/releases or https://github.com/Drexel2k/raspiFM/tags and do:
-
- Copy spotifyd binary to /usr/bin:
sudo cp ~/raspifm_repo/libs/spotifyd-0.4.2-dbus-pulse_aarch64 /usr/bin/spotifyd
- Copy spotifyd binary to /usr/bin:
-
- Copy the spotifyd config file from configs to /etc:
sudo cp ~/raspifm_repo/configs/spotifyd.conf /etc
- Copy the spotifyd config file from configs to /etc:
-
- Allow the spotifyd to register services on the system DBus: Copy the file from configs to /usr/share/dbus-1/system.d:
sudo cp ~/raspifm_repo/configs/spotifyd-dbus.conf /usr/share/dbus-1/system.d
- Allow the spotifyd to register services on the system DBus: Copy the file from configs to /usr/share/dbus-1/system.d:
-
- Reboot
-
- Install gui libraries for touch ui and nginx for web ui:
sudo apt install qt6-base-dev libqt6svg6-dev qt6-wayland nginx
- Install gui libraries for touch ui and nginx for web ui:
-
- Create directory for raspiFM files and set permissions:
sudo mkdir -p /usr/bin/local/raspifmand set permissions:sudo chown raspifm:raspifm /usr/bin/local/raspifm
- Create directory for raspiFM files and set permissions:
-
- Add www-data user to raspifm group:
sudo usermod -a -G raspifm www-data
- Add www-data user to raspifm group:
-
- Copy the raspiFM files to the directory:
cp -r ~/raspifm_repo/src/. /usr/bin/local/raspifm
- Copy the raspiFM files to the directory:
-
- Setup python environment/dependencies:
python3 -m venv /usr/bin/local/raspifm/.venv/usr/bin/local/raspifm/.venv/bin/python3 -m pip install -r ~/raspifm_repo/piprequirements.txt/usr/bin/local/raspifm/.venv/bin/python3 -m pip install ~/raspifm_repo/libs/PyQt6-6.8.1-cp39-abi3-manylinux_2_28_aarch64.whl
-
- Setup nginx:
sudo cp ~/raspifm_repo/configs/raspifm.nginx /etc/nginx/sites-available/raspifmsudo ln -s /etc/nginx/sites-available/raspifm /etc/nginx/sites-enabled/
-
- To password protect the web interface see the comment in
/etc/nginx/sites-available/raspifm, edit it withsudo nano /etc/nginx/sites-available/raspifm
- To password protect the web interface see the comment in
-
- Setup autostart for raspiFM:
- Create the autostart directory:
mkdir -p ~/.config/autostart - Copy the desktop file to the autostart directory:
cp ~/raspifm_repo/configs/raspifm.desktop ~/.config/autostart
Reboot.
-
- Update apt libraries,
sudo apt update,sudo apt full-upgrade, this will update everything installed on the Raspberry via apt incl. the Raspberry firmware/OS.
- Update apt libraries,
-
- Update raspiFM:
- Remove existing files:
find ~/raspifm_repo/ -mindepth 1 -delete,find /usr/bin/local/raspifm/ -mindepth 1 -delete - Switch to repo directory
cd ~/raspifm_repo, clone the repositorygit clone https://github.com/Drexel2k/raspiFM .. If you do not want to use the latest commit, but the latest release, look up the latest release tag: https://github.com/Drexel2k/raspiFM/releases or https://github.com/Drexel2k/raspiFM/tags and do:git checkout tags/v1.0e.g. - Copy the raspiFM files to the directory:
cp -r ~/raspifm_repo/src/. /usr/bin/local/raspifm - Setup python environment/dependencies:
python3 -m venv /usr/bin/local/raspifm/.venv/usr/bin/local/raspifm/.venv/bin/python3 -m pip install -r ~/raspifm_repo/piprequirements.txt/usr/bin/local/raspifm/.venv/bin/python3 -m pip install ~/raspifm_repo/libs/PyQt6-6.8.1-cp39-abi3-manylinux_2_28_aarch64.whl
- Copy/overwrite spotifyd binary to /usr/bin:
sudo cp ~/raspifm_repo/libs/spotifyd-0.4.2-dbus-pulse_aarch64 /usr/bin/spotifyd - If there are config changes, also refresh the config files:
sudo cp ~/raspifm_repo/configs/spotifyd.conf /etc,sudo cp ~/raspifm_repo/configs/spotifyd-dbus.conf /usr/share/dbus-1/system.d,sudo cp ~/raspifm_repo/configs/raspifm.nginx /etc/nginx/sites-available/raspifm,cp ~/raspifm_repo/configs/raspifm.desktop ~/.config/autostart