Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 39
  1. #11
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,715
    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 Radio France (FIP etc) plugin

  2. #12
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    3,999
    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 & SB3 -> Onkyo TS606 -> Celestion F20s
    Office - Pi3+Sreen -> Sony TAFE320 -> Celestion F10s / Pi2+DAC & SB3 -> Onkyo CRN755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom
    Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - Pi2+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) - SB Touch ->Sherwood AVR ->Mordaunt Short M10s
    Everything controlled by iPeng

  3. #13
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    4,981
    I propose to continue the discussion of feasability here https://forums.slimdevices.com/showt...-as-LMS-player
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  4. #14
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,715
    How about a forum admin person moves this thread to Developer section?
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  5. #15
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    4,981
    Following-up on the developers area. I have never built an Alexa skills, I tried to have a quick look at how it works, but as this is really not my domain of knwoledge, one thing is not clear for me: is it possible to activate a skill without requiring a voice command?

    I would potentially prefer to do that to include Alexa as a SB player:

    - LMS sends a play command to the AlexaBridge
    - The bridge activate the skill and make its point to its webserver where the audio, received from LMS, is available
    - LMS sends pause/stop/volume commands to the bridge that relay them to the skill using the same method
    - The skill would have to inform the bridge ideally of progress, at minimum of end of track

    I think that would be a maximum re-use of the way the UPnP/CC bridges are working, so a minimum pain.

    As a variant, a Perl part could invoke the skill, but that would complicate things as the bridge needs to indicate to that Perl part on which socket the webserver runs for each playback (I don't want to keep webserver opened all the time, even when the player is idle, this consumes ports). For subsequent commands, the Perl part would also have to capture play/pause/stop/volume ... and forward them to the skill. That means we need to create a new player type in LMS and overload all methods, that's not the end of the world, I've done that in the Group Plugin but I feel it's an un-necessary complication.

    Of course, I would have to add, in each player's config, some ID to match the LMS virtual player with its Alexa twin so that when LMS plays on it, the skill is capable of sending the command to the right Alexa. I assume this will be a static configuration as opposed to my other bridges.

    I understand skill are intended to be voice activated and that might sound counter-intuitive, but I feel it's better to separate 1/ "Alexa as a SB player" from 2/ "Alexa as a command for LMS". You could still have an Alexa playing LMS-stored audio using voice command by combining the two, but they both ignore each other
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  6. #16
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,715

    Using Amazon Alexa device as LMS player

    They way that the Alexa devices work today makes that quite hard I think.
    The Skill responds to requests that come in from Amazon cloud ... although there is nothing stopping them offering other end-points for other things to call.
    But the Skill does not communicate directly with the Alexa device.
    The Amazon Alexa cloud is the intermediary and the Skill cannot simply cause an Alexa device to spring into life.

    There is a way to invoke operations on a device ... via the alexa.amazon.com/.fr/.co.uk web functions.
    That is the approach that HomeAssistant has taken. But there are very few actions that can be undertaken that way.
    For example ... can make it play Spotify stuff and even TuneIn ... but it uses secret calls that, afaik, no-one has been able to copy/by-pass/replicate for an unblessed system (including other Skills in general).
    Last edited by Paul Webster; 2019-02-16 at 11:38.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  7. #17
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,715
    FYI - the Skill does know when the Alexa device issues a pause/next/stop but telling LMS would require the Skill to reach back inside the local network etc - challenges solved by the Alexa LMS skills ... do combining them makes sense (to me at least).
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  8. #18
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    4,981
    Quote Originally Posted by Paul Webster View Post
    FYI - the Skill does know when the Alexa device issues a pause/next/stop but telling LMS would require the Skill to reach back inside the local network etc - challenges solved by the Alexa LMS skills ... do combining them makes sense (to me at least).
    But can’t I open an HTTPS link with the skill st play start, keep it open as long as play runs and poll it regularly or can’t the skill do long polling?
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  9. #19
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,715
    You can't communicate directly with the skill - however, a web server function that is running at the same location as the skill (or similar) could hold a session open and pass data.
    However, the skill cannot (I think) tell the Alexa device to pause/stop/start. However, the undocumented interface at alexa.amazon.com/.fr/.co.uk (etc) provides some control in some special circumstances.

    For example ... if you start playing a radio station from TuneIn (via Alexa not via LMS) then you will see some media player controls appear at alexa.amazon.com/.fr/.co.uk and you can then change the volume or pause/play ... the HomeAssistant people (I think) have made a callable API of that Alexa web functionality.
    But ... it only works for special skills that Amazon enables it for and the documentation is not public.

    I think that the first step to determine if there is way to achieve something better than the existing LMS stream.mp3 route (which is not great because of the large buffer in Alexa media player).
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  10. #20
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,715
    If anyone else would like to experience the default behaviour of using Alexa as a player with the LMS stream.mp3 as the source then PM me the email address that you use with your Amazon Alexa profile (I think that you do not need to have an Amazon Developer account any more) and I'll add you to the list and send you some instructions.
    Please do not share the instructions as it is very hacky and could easily be broken by people being silly with it.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

Posting Permissions

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