Home assistant community addons : LMS the Lyrion Music Server Formerly the Logitech Media Server or SqueezeBox Server. Squeezelite Player

I tried that, in server settings, basic settings, media folders
If I ad a path and then press in the bottom right corner apply it dissappears.

I think I first need to add a path to the music folder somewhere in the base linux but in this HA setup have no idea how…

So you need to mount the NAS in the addon via the settings. So for nfs and cifs example:-

mounts:
  - 'thepi4.lan:/srv/store/music/ /data/mnt/nfs'
  - '-t cifs -o user=ha,pass=xxxx //testpi.lan/share /data/mnt/cifs'
dirs:
 - /data/mnt/cifs
 - /data/mnt/nfs

This make sure the mount point exists in an unbacked up area and the mount options. You could then use links to give more friendly paths,

inks:
  - dest: /data/mnt/music/collection
    link: /var/music
  - link: /srv/storage/incomming/new-music
    dest: /data/mnt/music/new-music
  - link: /srv/storage/music/playlists
    dest: /data/mnt/music/playlists

mounts:
  - '--bind /media/music /data/mnt/music'

So in my setup I have mounted media in the underlying OS and then substituted a bind mount for the raw nfs and also used links to make it look like my previous Linux install remain the same so all the paths for trackstat remain the same as I migrated that database.

Phill.

2 Likes

Thanks Phill for your explanation,

I was reading in the forums and saw so many people having this issue that I went on a different route,
I installed LMS directly on the nas itself in d
ocker. I can also install homeassistant on the nas in docker.

LMS I got running now so that is a good start, I will now look at Home assistant.

@jp73 which forums do I need to plug the plugin into :wink:

Phill thanks a lot for the LMS addon :pray:

I have installed Material Skin from the Plugins page inside of LMS (3rd party section) but then I was not able to open the web interface via HA sidebar. Is this something known and I need to use only the Default skin?
EDIT: When the Default skin selected and Material skin is installed, I’m able to access LMS via HA Sidebar and LMS with the Material skin using http://homeassistant.local:9000/material/.
I would like to use the Material skin as a popup for media-player entity via iFrame, but when I add address /fc57b866_lms/material/ nothing loads - the iFrame is empty, but that’s probably becuase of some Ingress error, right? I’ve read something about that in Grafana thread…

And second question: is there some custom lovelace card for LMS?

Thanks!

@palito have you looked at the skin option?

I am not of a aware of a custom card but that doesn’t mean there is not, you get a bunch of sensors from this that’s it :wink:

1 Like

No, but each player is a media entity (eg media_player.kitchen)

:man_facepalming:I’m blind! Thanks a lot :pray: It works! :tada:

@nickrout Thanks, I’m aware of the media_player entity.

I was able to make my custom popup for the media player, I’m pretty happy with it :slight_smile:

Once again thanks a lot for he addon :slight_smile:

But it doesn’t work on phone after HA reboot :pensive:


That’s why I was asking if there is some custom lovelace card, to have see a playlist…

I have lms (on another server) via a iframe panel. The server is currently set to default. I get a dialog dsying

Your browser does not accept cookies. This can lead to unexpected behaviour controlling your Logitech Media Server. Please enable cookies in your browser before you continue.

Perhaps a clue?

The other possibility is lms hasn’t finished starting after the reboot, what happens when you rretry

That error message is normal for LMS through HA.

Will this play https streams? I would like to stream audio from the youtube music integration to the LMS players exposed in HA, however it doesn’t want to play the link to the youtube music stream which is an https link. I can paste the same link into my browser and it works fine.

You forgot to post your logs.

@Ryan_Grandy Yes this should play SSL streams SSL libs and Perl modules are in the Docker container.

Using the Squeezelite add-on on Odroid (Home Assistant OS) does not seem to work. Installing has no issue, but starting the add-on throws out error. Keeps going in an error loop:

Error: command line argument error
Squeezelite v1.9.9-1391, Copyright 2012-2015 Adrian Smith, 2015-2021 Ralph Irving. See -t for license terms
Usage: squeezelite [options]
  -s <server>[:<port>]	Connect to specified server, otherwise uses autodiscovery to find server
  -o <output device>	Specify output device, default "default", - = output to stdout
  -l 			List output devices
  -a <f>		Specify sample format (16|24|32) of output file when using -o - to output samples to stdout (interleaved little endian only)
  -b <stream>:<output>	Specify internal Stream and Output buffer sizes in Kbytes
  -c <codec1>,<codec2>	Restrict codecs to those specified, otherwise load all available codecs; known codecs: flac,pcm,mp3,ogg,aac (mad,mpg for specific mp3 codec)
  			Codecs reported to LMS in order listed, allowing codec priority refinement.
  -C <timeout>		Close output device when idle after timeout seconds, default is to keep it open while player is 'on'
  -d <log>=<level>	Set logging level, logs: all|slimproto|stream|decode|output, level: info|debug|sdebug
  -e <codec1>,<codec2>	Explicitly exclude native support of one or more codecs; known codecs: flac,pcm,mp3,ogg,aac (mad,mpg for specific mp3 codec)
  -f <logfile>		Write debug to logfile
  -m <mac addr>		Set mac address, format: ab:cd:ef:12:34:56
  -M <modelname>	Set the squeezelite player model name sent to the server (default: SqueezeLite)
  -n <name>		Set the player name
  -N <filename>		Store player name in filename to allow server defined name changes to be shared between servers (not supported with -n)
  -W			Read wave and aiff format from header, ignore server parameters
  -P <filename>		Store the process id (PID) in filename
  -r <rates>[:<delay>]	Sample rates supported, allows output to be off when squeezelite is started; rates = <maxrate>|<minrate>-<maxrate>|<rate1>,<rate2>,<rate3>; delay = optional delay switching rates in ms
  -v 			Visualizer support
  -z 			Daemonize
  -Z <rate>		Report rate to server in helo as the maximum sample rate we can support
  -t 			License terms
  -? 			Display this help text
Build options: LINUX PULSEAUDIO EVENTFD VISEXPORT
[14:07:14] INFO: Starting the Squeezelite options processing...
[14:07:14] INFO: Using Squeezelite pulse audio version on aarch64
[14:07:14] INFO: Squeezelite possible outputs(alsa)...
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  jack                           - JACK Audio Connection Kit
  pulse                          - PulseAudio Sound Server
  default                        - Default ALSA Output (Home Assistant PulseAudio Sound Server)
[14:07:14] INFO: Squeezelite possible outputs(pulse)...
Output devices:
  alsa_output.platform-sound.analog-stereo           Built-in Audio Analog Stereo
[14:07:14] INFO: nice -n -5 squeezelite -M SqueezeLite-HA-Addon -n 'Woonkamer Odroid' -m 00:1E:06:42:8F:0C -d all=debug -s Jukebox

I don’t have the option to choose HDMI as audio out. Only default or Built-In Audio Stereo. Could it be this isn’t supported on Odroid using HDMI out as audio?

Edit: to clarify, the HDMI signal is working (I can see the default HA commandline on my TV (through soundbar). I use a Raspberry Pi Zero currently with PiCorePlayer and HDMI to my soundbar. Works great. But if I can hook up my Odroid (which is in the same cabinet) instead, I can save a power cable and use the Pi0 for something else :slight_smile:

Have you tried -o pulse?

I cleared all entries, then it did work (perhaps you can’t use spaces in the name field). The add-on now succesfully runs and I can see the player, however there is no audio coming out of my Odroid. I also tried -o pulse as option (which is the same as using pulse in output field). No luck, no audio coming out.

what is the output of aplay -l

And have checked the volume?

From the Docs name - Override name for the player (only English Ascii chars are supported)

There be a none English Ascii Char in that name. You should be able to set from server,

Phill.

If you have multiple outputs you need to select the right output in the configuration audio section for pulse to work with the right output.

-o pulse will use an alsa based pulse device plugin selecting the pulse build will select the native implementation in squeezelite.

This is tested on a Pi3 running aarch64 with HassOS a usb output and this all works ok.

I am not convied that the onboard HA pulse implementation is seeing the HDMI device, some pocking around with pactrl in in the Web cli might help, Does Built-In Audio Stereo show twice in the dropdown?

1 Like