[{ALLOW view All}]
[{ALLOW edit Markus}]
11.01.2025
!Logitech Squeezebox Radio plus Media/Musik Server

[{TableOfContents }]

The public media server at www.mysqueezebox.com was retired early 2024, see anouncement [1|https://forums.slimdevices.com/forum/user-forums/deutsch/1668931-mysqueezebox-com-und-uesmartradio-com-infrastruktur] and [2|https://forums.slimdevices.com/forum/user-forums/general-discussion/1668327-uesmartradio-com-and-mysqueezebox-com-servers].\\
You need to have your own Media Sever for the Radio now.

Disable swap file
{{{
sudo service dphys-swapfile stop
sudo systemctl disable dphys-swapfile
sudo apt-get purge dphys-swapfile
sudo apt autoremove

sudo vi /boot/firmware/cmdline.txt
ADD at the end of line >noswap<
console=[...] noswap

sudo vi /etc/fstab
ADD:
# Log to RAM
tmpfs   /tmp            tmpfs   defaults,noatime,nosuid,mode=1777,size=256m 0 0
tmpfs   /var/log        tmpfs   defaults,noatime,nosuid,mode=0755,size=128m 0 0
tmpfs   /var/tmp        tmpfs   defaults,noatime,nosuid,mode=0755,size=128m 0 0
}}}

! Install LMS for music (only)
It is pretty easy to install the [Logitech Media Server||https://lms-community.github.io/lms-server-repository/] / [Lyrion Musik Server|https://lyrion.org/lms-server-repository/]\\
[LMS Getting Started|https://lms-community.github.io/getting-started/]\\
see Lyrion below !!
{{{
sudo apt-get install libsox-fmt-all libflac-dev libfaad2 
sudo apt-get install libio-socket-ssl-perl 
sudo apt-get install libcrypt-openssl-bignum-perl 
sudo apt-get install libcrypt-openssl-random-perl 
sudo apt-get install libcrypt-openssl-rsa-perl 
# download ARM version Debian !
OLD: wget https://downloads.slimdevices.com/LogitechMediaServer_v8.5.0/logitechmediaserver_8.5.0_arm.deb
(note: NOT the ARM tgz = .tar.gz => tar xvf *.tgz)
OLD: sudo dpkg -i logitechmediaserver_8.5.0_arm.deb
# to test at window you need lame too
sudo apt-get -y install lame
}}}

[LMS Commands|https://mystupidnotes.com/common-logitech-media-server-lms-commands/]

WebGUI: [http://raspberrypi5:9000/]
You can listen to selected stream with [http://raspberrypi5:9000/stream.mp3]

! Install/Upgrade [Lyrion Music Server|https://lyrion.org/lms-server-repository/]
Note: former Logitech Media Server will be removed automatically!
{{{
> wget https://downloads.lms-community.org/LyrionMusicServer_v9.0.1/lyrionmusicserver_9.0.1_arm.deb
> sudo dpkg -i lyrionmusicserver_9.0.1_arm.deb
Vormals nicht ausgewähltes Paket lyrionmusicserver wird gewählt.
dpkg: Entfernen von logitechmediaserver zugunsten von lyrionmusicserver wird in Betracht gezogen ...
dpkg: Ja, logitechmediaserver wird zugunsten von lyrionmusicserver entfernt
[...]
=> uses new /etc/squeezeboxserver/types.conf
> sudo service lyrionmusicserver start
> sudo service lyrionmusicserver stop
> sudo service lyrionmusicserver restart
}}}

Logs
{{{
vi /var/log/squeezeboxserver/server.log   // server log
vi /var/log/squeezeboxserver/scanner.log  // server scanner log
vi /var/log/messages                      // log at radio (see below)
}}}

! Squeezbox Radio 
Initially I added the remote LMS in the radio settings and it worked, see [https://lms-community.github.io/getting-started/migrate-from-uesr-de/].\\
But starting Oct 2024 the radio lost connection to LMS frequently, e.g. not when running but when re-activated after a day or so. A restart and/or factory reset made it work again. But next day it was disconnected again.\\
Example error: 
* Es konnte keine DHCP-Adresse für dieses Netzwerk ermittelt werden
* Ping LMS nicht ok
BTW: Deactivating following did NOT help: FritzBox > Hilfe und Info > FRITZ!Box Support > Paketbeschleunigung inaktiv\\
\\
Check listening ports at PI5 (server), make sure 9000,9090 and 3483 are ok 
{{{
> sudo ss -tunlp|grep squeeze
Netid State  Recv-Q Send-Q            Local Address:Port  Peer Address:Port    Process
udp   UNCONN 0      0                          0.0.0.0:3483       0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=8))
udp   UNCONN 0      0                          0.0.0.0:1900       0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=24))
udp   UNCONN 0      0                   192.168.188.63:1900       0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=23))
udp   UNCONN 0      0                          0.0.0.0:56339      0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=27))
tcp   LISTEN 0      4096                       0.0.0.0:9000       0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=26))
tcp   LISTEN 0      4096                       0.0.0.0:9090       0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=20))
tcp   LISTEN 0      4096                       0.0.0.0:43373      0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=25))
tcp   LISTEN 0      4096                       0.0.0.0:3483       0.0.0.0:*    users:(("squeezeboxserve",pid=704210,fd=9))
}}}

You can control many setting at the radio from the LMS.\\
For example WebUI > Settings > Advanced > Logging > set "network.upnp" to "Info" > Apply > "Save logging settings for use at next
application restart" > Restart

Connect via SSH
see [joe's|https://joes-tech-blog.blogspot.com/2021/03/ssh-login-to-squeezebox-radio-touch.html]
# Enable SSH at radio at Settings > Advanced > Remote Login > Enable SSH
# Login credentials are shown there, default is root/1234
# Connect via SSH client to <LMS-IP>:22, I used putty
# validate log
{{{
> tail -f /var/log/messages 	
Oct 25 13:33:43 squeezeplay: WARN   applet.AlarmSnooze - AlarmSnoozeApplet.lua:392 notify_serverDisconnected: SlimServer {mysqueezebox.com} - disconnected, but no server alarm in progress : nil
You would need the “Community Firmware” (via a plugin) to stop that error.
}}}
Here you see that we have still issues with the old server and this is why you should upgrade your radio to the "community 

!Community Firmware on Squeezebox Radio
I summarized the instructions from [Lyrion Community and memeber rojikewl|https://forums.slimdevices.com/forum/user-forums/3rd-party-software/1699666-how-and-why-to-install-the-community-firmware-step-by-step] (I am afraid to loose this):

# Applicable for LMS version 8.5.1 or higher
# Use power cable and ethernet connection to avoid issues!
# Connect Squeezebox Radio via Ethernet at Settings > Advanced > Networking > Choose Network > Ethernet
# Factory reset your radio to clean up patches at Settings > Advanced > Restore Factory Settings
# Open LMS web interface > Settings > Manage plugins > 3rd party plugins > Tick "Community Firmware for Touch/Radio/Controller" > Restart
# Refresh the LMS Settings browser page after restart finished. Check > Manage plugins > __Active plugins__ > Community Firmware for Touch/Radio/Controller
# Activate the community firmware plugin, e.g. send to player >
## On the far right of the line where you see "Community Firmware for Touch/Radio/Controller", click on the "Settings" hyperlink
## Tick the box where you see "Community Firmware for SqueezeBox Touch/Radio/Controller. This firmware (...). Use at your own risk!" > Apply
## Confirm at the radio to install it
# You now have the latest firmware on your radio (8.5.0 r16xxx) and it will inform you about updates now, at least after restart
# You can also check for updates yourself at Radio > Settings > Advanced > Software Update
# Set timezone at Settings > Advanced > Timezone.
# On issues restart first LMS and then your player, then try factory reset (this does not affect firmware)
NOTE: to restore the factory firmware untick the box in the settings for the Community Firmware plugin to and Settings > Advanced > Software update.

After that I had no issues any longer with connection loss!

! UPNP/DLNA ?
UPNP/DLNA => Settings > Plugins verwalten > enable "UPnP/DLNA Media Interface (v1.0)

!Custom URL 
Note: WebGUI > Radio > URL laden - does not save the URL
# Create m3u file like
format:
{{{
#EXTM3U  <= must be first line 
#EXTINF:<seconds>,<track title>
}}}

examples:
{{{
#EXTM3U
#EXTINF:295,Starlight Express - AC/DC
MyCDs\Starlight Express - Starlight Express, Bochum 1991\Starlight Express - 05 ACDC.mp3
}}}
{{{
#EXTM3U
#EXTINF:0,Radio BOB
http://streams.radiobob.de/bob-national/mp3-192/mediaplayer
}}}
2. copy in the folder which is configured in settings > Grundeinstellungen > Wiedergabenlisten-Ordner\\
3. After changes: Settings > "Durchsuchen starten" (auch für Wiedergabelisten)\\
4. At radio you can choose Eigene Musik > Wiedergabelisten; you can even save that as favorite\\