Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 62

Hybrid View

  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,928

    Using Amazon Alexa device as LMS player

    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 ...
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  2. #2
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,738
    Not related to the subject of this thread (have no Alexa devices)... but, what's happened to the volume control in your screen shot? You have the volume percentage under the 'i' icon, but no speaker icon. Have you been editing the Material files, or is this a bug with Material?

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,928
    Not edited the skin.
    That was Safari on iPad - iOS 12.
    Does not do that for other LMS players ... so perhaps it is related to it playing http://lmsip:9000/stream.mp3
    Does LMS know that it cannot change the volume so perhaps something Material is looking for is not present.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  4. #4
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,738
    Quote Originally Posted by Paul Webster View Post
    Not edited the skin.
    That was Safari on iPad - iOS 12.
    Does not do that for other LMS players ... so perhaps it is related to it playing http://lmsip:9000/stream.mp3
    Does LMS know that it cannot change the volume so perhaps something Material is looking for is not present.
    This happens when the player is off. When a player is off, I hide the volume button - but forgot to also hide the label! Fixed for next release.

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,928
    I didn't turn it off but it had stopped at that point so perhaps LMS turned it off by itself.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  6. #6
    Senior Member meep's Avatar
    Join Date
    Aug 2007
    Location
    Ireland
    Posts
    230
    Hi Paul

    Looks good.

    I tried this as part of the Hab Tunes plugin by streaming the LMS mp3 stream to the Echo. It worked OK sometimes but often exhibited such a significant dayl (>60 seconds) as to make it unusable.

    I'll have a deeper look when I get more time. Might indeed be something worth working on together.

    Peter


    ALEXA LMS SKILL: http://www.hab-tunes.com | Twitter: #habtunes
    Personal HA BLOG: http://mediaserver8.blogspot.com

    Squeezebox x2 | Squeezebox Radio x 2 | Squeezebox Duet x2

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,928
    Philippe ... do you have any devices with built-in Alexa?
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  8. #8
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,926
    Quote Originally Posted by Paul Webster View Post
    Philippe ... do you have any devices with built-in Alexa?
    I have an Alexa
    LMS 8.1.x on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  9. #9
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,928
    If you PM me your email address and you get an Alexa developer account then I think I will be able to add you to my simple player skill as a collaborator and then you will be able to invoke stream by voice and can experiment.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  10. #10
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,711
    I’m interested and will be following this.

    I have thought about putting an Alexa into my SB ecosystem for two reasons
    1) to get voice control of SB players
    And
    2) as a means of integrating Amazon Music

    There are various projects looking at 1) but few if any looking at 2)

    You combined ideas seems to present a hybrid approach which combines 1) uniquely with converting Alexa to be an SB player. If that can be achieved how big a step would it be to achieve 2) ?

    I know 2) could be achieved via wavinput or on streaming but without metadata
    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Boom
    Kitchen UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
    Everything controlled by iPeng & Material on iOS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •