2.7 KiB
2.7 KiB
Squeezelite
Installation
Install OS: Raspberry Pi OS Lite (Debian GNU/Linux 12: bookworm)
Setup SSH Authentication
# On Raspberry Pi
ssh-keygen -t ed25519 -f ~/.ssh/lms_tunnel -N ""
cat ~/.ssh/lms_tunnel.pub
Copy the public key on homelab
Change .ssh/config
Host homelab
hostname 82.66.44.13
Port 22
user thomas
IdentityFile ~/.ssh/lms_tunnel
Test the SSH connection:
ssh homelab
Install packages:
sudo apt update
sudo apt install autossh avahi-daemon
Create service: /etc/systemd/system/lms-tunnel.service
[Unit]
Description=LMS SSH Tunnel
After=network.target
[Service]
User=pi
ExecStart=/usr/bin/autossh -M 0 -N \
-o "ServerAliveInterval 30" \
-o "ServerAliveCountMax 3" \
-o "ExitOnForwardFailure yes" \
-o "IdentitiesOnly yes" \
-o "TCPKeepAlive yes" \
-o "Compression yes" \
-i /home/pi/.ssh/lms_tunnel \
-L 0.0.0.0:9000:localhost:9000 \
-L 0.0.0.0:3483:localhost:3483 \
-L 0.0.0.0:9090:localhost:9090 \
thomas@82.66.44.13
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable the service: sudo systemctl enable --now lms-tunnel.service
Set Up Avahi for LMS Service Discovery: /etc/avahi/services/squeezebox.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name>Logitech Media Server</name>
<service>
<type>_slimdevices._tcp</type>
<port>3483</port>
</service>
</service-group>
Restart Avahi: sudo systemctl restart avahi-daemon.
# Check tunnel status
sudo systemctl status lms-tunnel.service
# Check if ports are being forwarded
sudo netstat -tulpn | grep -E '9000|3483|9090'
Troubleshooting: sudo systemctl status lms-tunnel.service
Create the service for Holo Player service: /etc/systemd/system/holo-audio-player.service
[Unit]
Description=Holo Audio DAC Squeezebox Player
After=network-online.target sound.target lms-tunnel.service
Wants=network-online.target
Requires=lms-tunnel.service
[Service]
Type=simple
User=root
ExecStart=/usr/bin/squeezelite \
-o plughw:CARD=Enhanc,DEV=0 \
-s localhost \
-n HoloAudioDAC \
-a 2000:4:24:1 \
-b 4096:8192 \
-r 44100,48000,96000,192000 \
-p 55 \
-C 5 \
-d all=info \
-f /var/log/squeezelite.log
Restart=always
RestartSec=10
Nice=-10
LimitRTPRIO=99
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target
sudo systemctl enable --now holo-audio-player.service
To see the logs in real time: tail -f /var/log/squeezelite.log