Hey, thanks for the support. In the meantime i get all up and running. I reinstalled the lms plugin again and finally it worked. Then moved all my Players to the server. The lms was still notbvisible in HA, just blank screen. After reading through this thread, i added the skin: material and there it is. Thanks a lot have a good time
I may have missed a much easier way to do this, but for what itās worth: I tried to make a telnet_switch
out of the play/pause mechanism (to use on non-LMS server pages, automations, etc) and it didnāt fully work, so I scripted it to the CLI along with a sensor to know if something is playing. This is handy to, like, start playing when you come home. The LMS CLI commands seem pretty robust so Iām sure you could pick playlists, radio stations etc like this- maybe outputs?
Replace my server ID with yours.
Sensor that yields a long string of info:
#!/usr/bin/expect
set timeout 5
spawn telnet 127.0.0.1 9090
expect "'^]'."
send "27%3A21%3A47%3A21%3A76%3Aa2 status\r"
sleep 2
send -- "\x1d"
expect "telnet>"
send -- "quit\r"
expect eof
wait
Evaluates the string:
command_line:
- sensor:
name: lms_status_pre
command: >
ssh -o UserKnownHostsFile=/config/.ssh/known_hosts -i /config/.ssh/keyfile [email protected] "expect /usr/share/hassio/homeassistant/vm_scripts/lms_status.exp"
value_template: >
{% for word in value.split() if "mode%3Aplay" in word %}play
{%- endfor %}
{% for word in value.split() if "mode%3Apause" in word %}pause
{% else %}error
{%- endfor %}
toggle play/pause:
#!/usr/bin/expect -f
set timeout 5
spawn telnet localhost 9090
expect "'^]'."
send "27%3A21%3A47%3A21%3A76%3Aa2 pause\r"
expect "27%3A21%3A47%3A21%3A76%3Aa2"
send -- "\x1d"
expect ātelnet>ā
send -- "quit\r"
expect eof
wait
A template sensor so you can make a button with a dynamically changing icon:
- sensor:
name: lms_status
state: >
{% if states("sensor.lms_status_pre") == "play" %}playing
{% elif states("sensor.lms_status_pre") == "pause"%}paused
{% else %}error
{% endif %}
icon: >
{% if states("sensor.lms_status_pre") == "play" %}mdi:pause-circle-outline
{% elif states("sensor.lms_status_pre") == "pause"%}mdi:play-circle-outline
{% else %}mdi:alert-circle-outline
{% endif %}
Why would you use that when you have the squeezebox integration?
I have the squeezelite add-onā¦ and had looked in HACS but now I see thereās an official integration. Thanks Nick.
@pssc I started using this addon with quiet some joy and i am finally able to route audio to the ledfx addon using an additional queezelite addon made available in lms and grouping all players/clients necessary.
After poking around i discovered the Local Player plugin in lms. But I absolutely fail to get it working and showing up as an alternative to the squeezelite addonā¦
I am running HassOS on pi4 8gb ram. Ive tried it with protected mode of and direct hardware access enabled in the settings related to local player.
Also the other way around. setting any debug options does not help either. It only logs the launch parameter from when it is called.
And related to binaries. i do not even know which one to choose.
According to an old github issue (Expose 'local player' to home assistant audio Ā· Issue #3 Ā· pssc/ha-addon-lms Ā· GitHub) it should work?
Any help would be greatly appreciated.
Greetings from Germany
@Dunkelschunkel No local player will not work, well it might but I donāt support it. Hence the squeezelite HA addon, its the same software packed specifically to run as a first class HA addon and also give the flexibility to add a player to HA without running LMS on the same box. As well as supporting multi instance to different output devices etc.
Good morning from my part of the world. Thank you for taking the time to answer. That makes sense. Even if we are sacrificing a tiny bit performance for flexibility I assume.
I am using your addon just for a couple of days by now and I am so impressed by Lms. Pi 4 with 3 Sonos speakers. Connected via airplay. 2 lms clients on Android and one squeezelite player addon of yours without problems. I even ordered 2 squeezebox Radio and they sync with the sonos players perfectly. The kids will be getting for Christmas.
Thank you for maintaining this addon
Dunkelschunkel
Hello,
I using LMS and squeezelite addons running on Raspberrypi 4 with homeassistant.
I have added my music folder to lms. The songs plays fine.
Please guide how to play a particular folder/album using automation.
Kindly reply
Thank you for the integration link. I had already added that.
I have gone thru the CLI documentation. But i am not understanding how to make an automation eg to play a music folder lets say āEnigmaā
Can you please give an example?
Best try out changing some of the examples found here:-
Was already trying thatā¦
Tried many combinations like the one belowā¦
service: squeezebox.call_method
target:
entity_id:
- media_player.squeezelite_ha_addon_2_2
device_id: []
area_id: []
data:
command: playlist
parameters:
- musicfolder
- Enigma
But the folder is not getting added to playlist/queue.
Dont know what am i doing wrong
Best posted on the other thread given this conterates on the player and server addons.
The link was to the service call_method
, which I didnāt know if you were aware of.
The best examples I have seen are in the thread Phil pointed to, and I endorse following up there. Cheers.
Hello, help need! I install lms on haos, acces my music in /media by add network storage in home assistant. I turn the protection mode off and set_permision on, otherwise i didnt alter any settings of the addon. Everything works exept in plugins i canāt change the location of the parent folder and get invalid argument. Also if i try to make dynamic playlist creator or custom skip filters i get 404 not found error. What i missing?
@steamboy23 , I suspect the plugins need specific support for ingress and I am not sure what you men by changing the location of the parent folder where for what? Please feel free to lodge an issue for the plugins in github some screen shots on what generates the 404ās would be usefulā¦
thank you for your quick answer. here is the screenshot of the invalid argument. doesnāt matter what location I put there always get invalid argument.
and when I click create new dynamic playlist or create new custom skip filter i get 404 not found
I will open an issue on GitHub too
@durkimat Iām running into the same problem with the ffmpeg package. Were you ever able to get it to install?
Mine is stuck here with no way to respond to the promptā¦
Setting up libavc1394-0:amd64 (0.5.4-5) ...
Setting up libxcb-dri3-0:amd64 (1.15-1) ...
Setting up libzvbi0:amd64 (0.2.41-1) ...
Setting up libx11-xcb1:amd64 (2:1.8.4-2+deb12u2) ...
Setting up liblapack3:amd64 (3.11.0-2) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode
Setting up libplacebo208:amd64 (4.208.0-3) ...
Setting up libzmq5:amd64 (4.3.4-6) ...
Setting up libcaca0:amd64 (0.99.beta20-3) ...
Setting up libxrender1:amd64 (1:0.9.10-1.1) ...
Setting up libpulse0:amd64 (16.1+dfsg1-2+b1) ...
Configuration file '/etc/pulse/client.conf'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
What exactly are you doing to create this log?
I am attempting to add the ffmpeg package to the LMS add-on. I added ffmpeg to the āPackagesā field in the LSM add-on configuration tab. When attempting to start LMS, it hangs during the install of the package and shows this in the log file. Itās looking for some type of user interaction and of course, there isnāt any way to provide that. the LMS add-on canāt be stopped or restarted due to this pause for user interaction. A restart of HA is needed.