LogitechMediaServer (LMS) on FreeNAS

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
LMS on FreeBSD is a real pain in the neck. The application is written in Perl and could be portable but they just don't care beyond "works on my machine", which happens to be some Linux.

For production use - which means friend in the private home, but family doesn't like it when "Music" won't work - I ended up creating a Ubuntu VM and installing their .deb package. Music library is on TrueNAS mounted via NFS into VM. Problem solved.

If you really want to run it on FreeBSD I'd stick with the package, whatever version that is. Usually laggs a bit behind.
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
LMS on FreeBSD is a real pain in the neck. The application is written in Perl and could be portable but they just don't care beyond "works on my machine", which happens to be some Linux.

For production use - which means friend in the private home, but family doesn't like it when "Music" won't work - I ended up creating a Ubuntu VM and installing their .deb package. Music library is on TrueNAS mounted via NFS into VM. Problem solved.

If you really want to run it on FreeBSD I'd stick with the package, whatever version that is. Usually laggs a bit behind.

Well the installer I made solves all this kind of problems. 100% portable, easy installation, easy and recent updates
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Well the installer I made solves all this kind of problems. 100% portable, easy installation, easy and recent updates
Can't you let your knowledge and experience contribute to the official FreeBSD port? Which would enable to a simple pkg install?
 

DD4711

Contributor
Joined
Nov 19, 2018
Messages
102
Thanks for the installation script. I'm currently testing it for my new TrueNAS installation. Installation was easy and without errors. I started to configure the LMS but it can't find any players. I configured it similar to my old installation in my Ubuntu VM. I use UPNP/DLNA and Airplay brigde plugins to control my player. But they do not find my player.

So quick question: does someone use SimoneF's script for installation and the two plugins? So I know if it should work?

Edit: I tested it on a new installtion on Ubuntu to check If it workes in general or I made mistake in the installation / configuration. Seems that some plugins have problems with BSD. I have no other explanation.
 
Last edited:

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
@SimoneF , are you interested in creating a Scale app for LMS, maybe as part of TrueChart?
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
New update released

@SimoneF , are you interested in creating a Scale app for LMS, maybe as part of TrueChart?

Scale is based on Debian and "Scale app" are just docker containers (which already exists for LMS). IS this what you intended?

Sorry for the late reply, I didn't get any notification. For contacting me there's always my mail in the signature.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Scale is based on Debian and "Scale app" are just docker containers (which already exists for LMS). IS this what you intended?


A scale app is, as I understand it, a Docker image plus a helm chart for it plus some configuration to allow for UI input by the user during creation of the “app”. Scale uses k3s, a smaller version of k8s. There is a Docker underneath, but apps deploy themselves on k3s.

so it’s “helm chart plus whatever UI “stuff” is needed to make a Docker container into a scale app”
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
A scale app is, as I understand it, a Docker image plus a helm chart for it plus some configuration to allow for UI input by the user during creation of the “app”. Scale uses k3s, a smaller version of k8s. There is a Docker underneath, but apps deploy themselves on k3s.

so it’s “helm chart plus whatever UI “stuff” is needed to make a Docker container into a scale app”
Mm I’ll download Scale to try it in a VM. I’ll report back in a few days
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
A scale app is, as I understand it, a Docker image plus a helm chart for it plus some configuration to allow for UI input by the user during creation of the “app”. Scale uses k3s, a smaller version of k8s. There is a Docker underneath, but apps deploy themselves on k3s.

so it’s “helm chart plus whatever UI “stuff” is needed to make a Docker container into a scale app”

The official docker image of lms can be installed with just a few clicks in the webui. The only important thing is to check the "host networking" flag because k3s does not allow port forwarding with ports below 9000 (for some weird reason).
Sincerly I don't see the point to maintain a "scale app" since you can install the docker image with a few clicks in less then 5 minutes.

firefox_gcd3pcG5iQ.png
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@SimoneF et al, what about the need for TCP/UDP port 3483?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
So how does a squeezelite client connect to a LMS server if port 3483 TCP/UPD is not open?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Surely squeezelite/slimproto requires port 3483 to be open, e.g:
Code:
./squeezelite-x86-64 -o plughw:CARD=AV710,DEV=1 -n vmplayer -a :::0 -d all=info -f vm4log -s 192.168.0.30
[17:55:46.005332] stream_init:290 init stream
[17:55:46.006490] output_init_alsa:643 init output
[17:55:46.006517] output_init_alsa:666 requested alsa_buffer: 40 alsa_period: 4 format: any mmap: 0
[17:55:46.011917] output_init_common:402 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
[17:55:46.014452] output_init_alsa:678 memory locked
[17:55:46.014620] decode_init:129 init decode, include codecs:  exclude codecs:
[17:55:46.014631] output_thread:467 open output device: plughw:CARD=AV710,DEV=1
[17:55:46.014673] register_dsd:624 using dsd to decode dsf,dff
[17:55:46.015187] alsa_open:185 opening device at: 44100
[17:55:46.015494] load_faad:610 loaded libfaad.so.2
[17:55:46.015573] register_faad:640 using faad to decode aac
[17:55:46.015869] load_vorbis:300 loaded libvorbisfile.so.3
[17:55:46.015941] register_vorbis:329 using vorbis to decode ogg
[17:55:46.016000] load_flac:258 loaded libFLAC.so.8
[17:55:46.016036] register_flac:286 using flac to decode flc
[17:55:46.016065] register_pcm:384 using pcm to decode aif,pcm
[17:55:46.016065] alsa_open:236 opened device plughw:CARD=AV710,DEV=1 using format: S32_LE sample rate: 44100 mmap: 0
[17:55:46.016227] alsa_open:315 buffer: 40 period: 4 -> buffer size: 1760 period size: 440
[17:55:46.016264] load_mad:383 loaded libmad.so.0
[17:55:46.016278] register_mad:412 using mad to decode mp3
[17:55:46.016377] slimproto:794 connecting to 192.168.0.30:3483
[17:55:46.016691] slimproto:827 connected
[17:55:46.016725] sendHELO:117 mac: ca:98:79:ec:00:83
[17:55:46.016741] sendHELO:119 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,ModelName=SqueezeLite,MaxSampleRate=384000,dsf,dff,aac,ogg,flc,aif,pcm,mp3
[17:55:46.018174] decode_flush:190 decode flush
[17:55:46.018216] output_flush:415 flush output buffer
[17:55:46.018315] decode_flush:190 decode flush
[17:55:46.018345] output_flush:415 flush output buffer
[17:55:54.225446] decode_flush:190 decode flush
[17:55:54.225515] output_flush:415 flush output buffer
[17:56:08.793561] slimproto_stop:865 slimproto stop
[17:56:08.893803] decode_close:175 close decode
[17:56:08.933700] stream_close:322 close stream
[17:56:09.024722] output_close_alsa:706 close output
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
Surely squeezelite/slimproto requires port 3483 to be open, e.g:
Code:
./squeezelite-x86-64 -o plughw:CARD=AV710,DEV=1 -n vmplayer -a :::0 -d all=info -f vm4log -s 192.168.0.30
[17:55:46.005332] stream_init:290 init stream
[17:55:46.006490] output_init_alsa:643 init output
[17:55:46.006517] output_init_alsa:666 requested alsa_buffer: 40 alsa_period: 4 format: any mmap: 0
[17:55:46.011917] output_init_common:402 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
[17:55:46.014452] output_init_alsa:678 memory locked
[17:55:46.014620] decode_init:129 init decode, include codecs:  exclude codecs:
[17:55:46.014631] output_thread:467 open output device: plughw:CARD=AV710,DEV=1
[17:55:46.014673] register_dsd:624 using dsd to decode dsf,dff
[17:55:46.015187] alsa_open:185 opening device at: 44100
[17:55:46.015494] load_faad:610 loaded libfaad.so.2
[17:55:46.015573] register_faad:640 using faad to decode aac
[17:55:46.015869] load_vorbis:300 loaded libvorbisfile.so.3
[17:55:46.015941] register_vorbis:329 using vorbis to decode ogg
[17:55:46.016000] load_flac:258 loaded libFLAC.so.8
[17:55:46.016036] register_flac:286 using flac to decode flc
[17:55:46.016065] register_pcm:384 using pcm to decode aif,pcm
[17:55:46.016065] alsa_open:236 opened device plughw:CARD=AV710,DEV=1 using format: S32_LE sample rate: 44100 mmap: 0
[17:55:46.016227] alsa_open:315 buffer: 40 period: 4 -> buffer size: 1760 period size: 440
[17:55:46.016264] load_mad:383 loaded libmad.so.0
[17:55:46.016278] register_mad:412 using mad to decode mp3
[17:55:46.016377] slimproto:794 connecting to 192.168.0.30:3483
[17:55:46.016691] slimproto:827 connected
[17:55:46.016725] sendHELO:117 mac: ca:98:79:ec:00:83
[17:55:46.016741] sendHELO:119 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,ModelName=SqueezeLite,MaxSampleRate=384000,dsf,dff,aac,ogg,flc,aif,pcm,mp3
[17:55:46.018174] decode_flush:190 decode flush
[17:55:46.018216] output_flush:415 flush output buffer
[17:55:46.018315] decode_flush:190 decode flush
[17:55:46.018345] output_flush:415 flush output buffer
[17:55:54.225446] decode_flush:190 decode flush
[17:55:54.225515] output_flush:415 flush output buffer
[17:56:08.793561] slimproto_stop:865 slimproto stop
[17:56:08.893803] decode_close:175 close decode
[17:56:08.933700] stream_close:322 close stream
[17:56:09.024722] output_close_alsa:706 close output
I know but again. If the 3483 is closed is because you have closed it. The solution in simple: open it.
by default 3483 is open and everything works without additional configuration.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
OK, I mis-understood what you meant. Howerver, last time I looked at using the LMS community docker image on SCALE (21.04) as you have shown using the LMS community docker image with "host networking", port 3483 TCP/UDP was defintiely not opened by default and ports below 9000 could not be configured.
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
OK, I mis-understood what you meant. Howerver, last time I looked at using the LMS community docker image on SCALE (21.04) as you have shown using the LMS community docker image with "host networking", port 3483 TCP/UDP was defintiely not opened by default and ports below 9000 could not be configured.
If you are using host networking then the container is not anymore under NAT, and so you don’t have to configure the port forwarding.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
True. And I perhaps should have said "published" ports, rather than the lazy "open". Maybe the latest version of Scale 21.06 has ironed out bugs that existed in 21.04. At least I have a small incentive to create a SCALE VM again.
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
True. And I perhaps should have said "published" ports, rather than the lazy "open". Maybe the latest version of Scale 21.06 has ironed out bugs that existed in 21.04. At least I have a small incentive to create a SCALE VM again.

I don’t know... I’ve tried the 21.06 just for the lms installation and it is still full of bugs... I’ll wait for the stable release
 
Top