There are a few implementations here of using voice to control playing of LMS stuff on Squeezeboxes but I don't think I have seen one that makes the Alexa device a Squeezebox player, except via Bluetooth.
There is some 3rd party software that you can point at the same audio collection and have it play it through the Alexa device (e.g. Plex and My Media for Alexa so perhaps there is no need for anything else ... but I though I would have a go anyway.
Result ... it works but is somewhat clunky.
If one of the developers of the existing LMS/Alexa tools would like to include the capability in their stuff then I am more than happy to share the code (the guts of it is only a few lines) but it is very easy to explain.
Since the device does not support AirPlay or UPnP-AV (or whatever) then it is not possible to push content to it using existing LMS plugins - afaik.
However, when it plays audio from a streaming server it does it directly from the device (and even asks for ICY metadata, I think to help the server identify that this is a media request rather than to do anything with that returned data itself).
So the trick it to get it to request that content.
I wrote a very simple Alexa skill that responds to an Open/Play request and returns the URL of a .pls file that can be reached via https. When the device requests the .pls file I generate one containing the local LAN IP address of LMS in the form ...
http://lmsip:9000/stream.mp3?player=Echo
The device then starts playing the stream (it requires the .pls to be reached via https but does not require the stream itself to be delivered that way) ... of course the problem then is to deliver some content to the stream but you can do that from any of the LMS control points and you choose "AlexaMediaPlayer - Alexa" or similar as the player.
While it works, it is not elegant.
Making it work for multiple people from the same service would require the end-use to register (something I have not done) because each LMS installation would be at a different local IP address.
Also registration would make it possible to support multiple Alexa devices at the same installation and give them different player names (not sure how LMS will handle multiple devices all claiming to be the same player name ... but from memory it sort of works).
A small LMS plugin could make it easier to register and pass to the remote server (where the Alexa skill resides) the local LAN address & port of LMS.
This does not require any port forwarding tricks or opening up the LAN to the outside world any more than any use of Alexa.
Playing using the LMS /stream.mp3 route does have some issues - for example because of the various bits of buffering going on it is unlikely to work well in a sync group (if you can hear multiple devices at the same time).
Changing a playlist and adding a new song to "play now" takes longer than you would expect because of that buffering ... took over 30 seconds for the current song to stop.
But it works ...
![]()
There is some 3rd party software that you can point at the same audio collection and have it play it through the Alexa device (e.g. Plex and My Media for Alexa so perhaps there is no need for anything else ... but I though I would have a go anyway.
Result ... it works but is somewhat clunky.
If one of the developers of the existing LMS/Alexa tools would like to include the capability in their stuff then I am more than happy to share the code (the guts of it is only a few lines) but it is very easy to explain.
Since the device does not support AirPlay or UPnP-AV (or whatever) then it is not possible to push content to it using existing LMS plugins - afaik.
However, when it plays audio from a streaming server it does it directly from the device (and even asks for ICY metadata, I think to help the server identify that this is a media request rather than to do anything with that returned data itself).
So the trick it to get it to request that content.
I wrote a very simple Alexa skill that responds to an Open/Play request and returns the URL of a .pls file that can be reached via https. When the device requests the .pls file I generate one containing the local LAN IP address of LMS in the form ...
http://lmsip:9000/stream.mp3?player=Echo
The device then starts playing the stream (it requires the .pls to be reached via https but does not require the stream itself to be delivered that way) ... of course the problem then is to deliver some content to the stream but you can do that from any of the LMS control points and you choose "AlexaMediaPlayer - Alexa" or similar as the player.
While it works, it is not elegant.
Making it work for multiple people from the same service would require the end-use to register (something I have not done) because each LMS installation would be at a different local IP address.
Also registration would make it possible to support multiple Alexa devices at the same installation and give them different player names (not sure how LMS will handle multiple devices all claiming to be the same player name ... but from memory it sort of works).
A small LMS plugin could make it easier to register and pass to the remote server (where the Alexa skill resides) the local LAN address & port of LMS.
This does not require any port forwarding tricks or opening up the LAN to the outside world any more than any use of Alexa.
Playing using the LMS /stream.mp3 route does have some issues - for example because of the various bits of buffering going on it is unlikely to work well in a sync group (if you can hear multiple devices at the same time).
Changing a playlist and adding a new song to "play now" takes longer than you would expect because of that buffering ... took over 30 seconds for the current song to stop.
But it works ...
