Sonos, Alexa and local NAS stored music

  • 5 October 2017
  • 77 replies
  • 18123 views

I am impressed with the Alexa / Sonos release yesterday and am pleased to see that it will develop. I know two other people with SONOS systems, and we all play music from a local NAS. Is this possible using Alexa voice control?

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

77 replies

As far as I can see from what's been said in previous threads the Alexa App can't access your local files only stream online content. This may change but for me right now Sonos APP is disabled, useless as I don't stream anything.
You cannot initialize play from the Alexa interface, but if you start playing from the Sonos app, you can use Alexa commands to stop/start/play/pause/skip/control volume and ask "Alexa, what's playing (on xxxxx)?"
Userlevel 1
Is this a limitation that we can expect to be overcome at some point, or is it more or less how things will be for the foreseeable future?
Userlevel 6
Badge +14
There is a thread elsewhere ( https://en.community.sonos.com/amazon-alexa-and-sonos-229102/playing-local-music-library-on-sonos-through-alexa-6791360/index1.html#post16150671 ) where the question was explicitly asked "Will alexa skill be able to play from my music library?" and, although Ryan (from Sonos) at no point answers this (instead essentially talking about what it can currently do), it is marked as 'Answered'.
I don't know why the question wasn't actually addressed but find it interesting why it can't play music from a local source but appears to be able to identify what is actually playing.
I think its all a bit if a disaster tbh.
Userlevel 7
Badge +21
I'm just guessing, kind of trying to reverse engineer the process, but I think it's going to be rather difficult. There are several different hints to suggest that Amazon/Alexa is completely in charge of determine what music will play when you make a voice command. I think it goes something like this.

1 - echo hears you
2- echo sends voice to Alexa servers
3 - Alexa servers translate voice to text
4 - Alexa servers process the request, determining what music to play on what speakers
5 - Alexa sends request to Sonos cloud.
6 - Sonos cloud sends request to your speakers.

I think step 4 is the key. Alexa has to know what music you want to play BEFORE it sends the request to the sonos cloud. It never sends an 'unknown' music request to the sonos cloud. So you may have a favorites playlist on Sonos, that Sonos knows what to do with, but since Alexa doesn't know what that is, it won't process it.

So for this to change, either Alexa needs to change to send unknown request to sonos, Alexa needs to know more about your sonos setup, or the two need to have a deeper back and forth exchange/communication so that Sonos can tell Alexa that it knows what that is.

Personally, I think changing this is a long way off. It requires Amazon/Alexa to change, and I don't think they are too motivated to do so.

BTW, some of the hints I see...
- You can't request any music on Sonos that you couldn't do on Amazon speakers.
- You can't give any commands (play, pause, volume control) on Sonos speakers that you couldn't do on Echos (like group, ungroup, line in source, etc)
- Alexa tracks what music you requested on it's 'cards' and in the history for that speaker. It could not do that if it didn't understand exactly what you requested.
- There are features from Sonos existing API that are not present with the interface with Alexa.

I would hazard to guess that Sonos is doing just about everything that it can do on it's side of the fence, and Amazon is the bottleneck. I wouldn't expect to see too many new features come across unless Amazon wants to do add the features. That could be because it benefits them, or because competition forces them to do something they don't exactly want to do.

So I think we will see echo's linked to specific sonos zones soon, because Amazon would want to build that feature, they would do the same for lights so users don't have to say the specific name of a light when they are in the same room. I think we will see playing form NAS or something like that if Sonos builds an interface with Google that allows that. Amazon may be pushed to do the same to stay competitive.
Can't argue with anything you've stated melvimbe. Good analysis.
Userlevel 4
Badge +1
As there have already been homebrew apps that can do all of the above (address local libraries, group/ungroup etc), that have been running using amazon alexa, then I would say it absolutely is technically possible without too much involvement from either side.

https://github.com/rgraciano/echo-sonos
https://github.com/jishi/node-sonos-http-api

The setup above uses a personal amazon app (not published), and works using a pc in the home which just gives http get commands to the sonos cloud. It really wouldnt take much at all for that to run on amazon or sonos backend, so there must be some other reason these features were not made available. Either Amazon wants to try and force people down the Amazon prime music route, or they got so hung up on what they wanted to produce, that they never bothered to ask or look what the consumer actually wanted.
^^^^ And there it is!!!
Userlevel 4
Badge +1
As there have already been homebrew apps that can do all of the above (address local libraries, group/ungroup etc), that have been running using amazon alexa, then I would say it absolutely is technically possible without too much involvement from either side.

https://github.com/rgraciano/echo-sonos
https://github.com/jishi/node-sonos-http-api

The setup above uses a personal amazon app (not published), and works using a pc in the home which just gives http get commands to the sonos cloud. It really wouldnt take much at all for that to run on amazon or sonos backend, so there must be some other reason these features were not made available. Either Amazon wants to try and force people down the Amazon prime music route, or they got so hung up on what they wanted to produce, that they never bothered to ask or look what the consumer actually wanted.


Really is pathetic that sonos released a version that in now way matches the amatuer code. I do not want to be forced into renting music.

Really is pathetic that sonos released a version that in now way matches the amatuer code. I do not want to be forced into renting music.


The "amatuer" (sic) code requires a server running full time on your PC or some other computer on your network. It also requires you to state "tell Sonos" in every command. I'm quite glad Sonos decided not to "match" that particular implementation, as well as it works for some.
Userlevel 7
Badge +21
I'd say the amateur code isn't exactly an integration either. In that setup Alexa has absolutely no idea what just happened. Alexa doesn't know what speakers you have, what they are doing, or what they can do. That can be a limiting factor on future functionality. This setup, though somewhat wanting in many areas, allows for much better enhancements in the future.

That said though, anyone who has homebrew skills, direct line in's, or third party hubs to make an 'integration' happen...I completely see why you aren't giving them up yet. I'm sure I'll still using my 3rd party hub (Lutron) to setup some common routines.
Userlevel 7
Badge +26
There is a thread elsewhere ( https://en.community.sonos.com/amazon-alexa-and-sonos-229102/playing-local-music-library-on-sonos-through-alexa-6791360/index1.html#post16150671 ) where the question was explicitly asked "Will alexa skill be able to play from my music library?" and, although Ryan (from Sonos) at no point answers this (instead essentially talking about what it can currently do), it is marked as 'Answered'.
My apologies, it was a busy day and I marked it answered because it answered the second question asked, I must not have noticed that the original one was "will" not "what". I've since edited the post a bit.

In short, melvimbe's analysis is pretty darn good, and on point. There would be work needing to be done on both sides of things for local libraries. There needs to be a cloud listing of your local tracks available when you'd want to listen to music, also with the knowledge of where or when to tell Sonos where to go. You can expect this Alexa integration to get better over time, we're constantly working on it. But I don't have any specifics on if or when we might get local libraries included. For those new to the thread, you can still use Alexa to control what's currently playing from any source, you just can't add something to the queue or start playing from certain sources with Alexa.
Userlevel 4
Badge +1
There is a thread elsewhere ( https://en.community.sonos.com/amazon-alexa-and-sonos-229102/playing-local-music-library-on-sonos-through-alexa-6791360/index1.html#post16150671 ) where the question was explicitly asked "Will alexa skill be able to play from my music library?" and, although Ryan (from Sonos) at no point answers this (instead essentially talking about what it can currently do), it is marked as 'Answered'.
My apologies, it was a busy day and I marked it answered because it answered the second question asked, I must not have noticed that the original one was "will" not "what". I've since edited the post a bit.

In short, melvimbe's analysis is pretty darn good, and on point. There would be work needing to be done on both sides of things for local libraries. There needs to be a cloud listing of your local tracks available when you'd want to listen to music, also with the knowledge of where or when to tell Sonos where to go. You can expect this Alexa integration to get better over time, we're constantly working on it. But I don't have any specifics on if or when we might get local libraries included. For those new to the thread, you can still use Alexa to control what's currently playing from any source, you just can't add something to the queue or start playing from certain sources with Alexa.


I am running Plex on my nas and on the sonos app. Is Plex then supported by Alexa as this will allow me to use my own library and not force me to use a streaming service


I am running Plex on my nas and on the sonos app. Is Plex then supported by Alexa as this will allow me to use my own library and not force me to use a streaming service


Alexa does not support Plex, but it supports Amazon uploads of your own tracks. I believe the cost per year is ~$25.

See here:

https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1001432841

After you upload/match your tracks, they will play over Alexa.
Userlevel 4
Badge +1


I am running Plex on my nas and on the sonos app. Is Plex then supported by Alexa as this will allow me to use my own library and not force me to use a streaming service


Alexa does not support Plex, but it supports Amazon uploads of your own tracks. I believe the cost per year is ~$25.

See here:

https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1001432841

After you upload/match your tracks, they will play over Alexa.


I do not want to use amazon. Plex is a far superior system. So frustrating.
Userlevel 4
Badge +1


I am running Plex on my nas and on the sonos app. Is Plex then supported by Alexa as this will allow me to use my own library and not force me to use a streaming service


Alexa does not support Plex, but it supports Amazon uploads of your own tracks. I believe the cost per year is ~$25.

See here:

https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1001432841

After you upload/match your tracks, they will play over Alexa.


According to Plex it does support Alexa. Sonos also supports Plex. However that does not mean sonos implementation of Alexa will work with it. They should as this will allow users to access their music and. It have to rent music

According to Plex it does support Alexa. Sonos also supports Plex. However that does not mean sonos implementation of Alexa will work with it. They should as this will allow users to access their music and. It have to rent music


Sorry meant to say "Alexa on Sonos does not support Plex". Just trying to help.
Userlevel 4
Badge +1

Really is pathetic that sonos released a version that in now way matches the amatuer code. I do not want to be forced into renting music.


The "amatuer" (sic) code requires a server running full time on your PC or some other computer on your network. It also requires you to state "tell Sonos" in every command. I'm quite glad Sonos decided not to "match" that particular implementation, as well as it works for some.


I think the point being made is not the utterances needed to invoke the skill, or the processing being done client side, but that the functionality of grouping, local library and spotify is possible using code thats been in the public domain for a year, but developers from multi billion dollar companies take a year to release less functionality.

The invocation not needing "ask sonos", and the processing being done back end rather than on a users own server/pc are trivial matters for amazon.


I think the point being made is not the utterances needed to invoke the skill, or the processing being done client side, but that the functionality of grouping, local library and spotify is possible using code thats been in the public domain for a year, but developers from multi billion dollar companies take a year to release less functionality.

The invocation not needing "ask sonos", and the processing being done back end rather than on a users own server/pc are trivial matters for amazon.


But the whole point is "the utterances needed to invoke the skill, or the processing being done client side". If Sonos actually required you to run a server, or process on your own PC, or say more words than is convenient or necessary, you'd be here screaming about that (Admit it, you would!). Now combine that with the requirement to take all that functionality, streamline it and get it into the cloud, and you see where the problem lies, and it is by no means "trivial". melvimbe's analysis above is conveniently ignored by those who bleat on how "amateurs did it, why can't Sonos???" You would be well served to read it before posting again.
Userlevel 4
Badge +1
And you would be well served to realise that the only difference between that amateur code being run client side and server side is publishing the app on amazon and having their servers talk to the sonos cloud instead of your own home server (and then duly paying for the processing time).

The invocation name, or lack thereof with amazon native interaction is down to amazon. With third party published apps the invocation name needs to meet criterea. Amazon can pick and choose their own, or indeed with third party offerings they can opt for direct control without an invocation name (i.e. smartthings smart devices).

Have you installed and tried the home brew solution? Have you seen first hand the differences between this and an officially published app?

You would be well served to gain an understanding of how minimal the changes would be to take this code and streamline it into a native amazon environment before dismissing the posts made by those who have. Amazon will have development teams capable of doing this within a week and have almost unlimited resources to do so. The reason for these functionalities not being available almost certainly lies with a commercial decision to drive consumers toward purchasing more hardware (playones with alexa) or AmazonMusic streaming or upload space.
Userlevel 4
Badge +5
Plex and Sonos work already. from reading Ryan's answer regarding Alexa and Sonos and a local library - the issue is how will Alexa know what is on YOUR local library?

So there needs to be some place (on a Sonos account in the cloud? on your Plex cloud server? ) with a file listing your local library listings - with at least the library name, the album and maybe the title
and
that 'file' would have to be accessible and readable by both Alexa and Sonos - so that Alexa can see what you have and tell Sonos and Sonos knows what and where to get it.

I imagine the Plex / Sonos part would not be hard to program... however whether Amazon wants to do the programming for the Alexa / Sonos part would be the question.

however it certainly seems feasible.
Userlevel 4
Badge +1
And you would be well served to realise that the only difference between that amateur code being run client side and server side is publishing the app on amazon and having their servers talk to the sonos cloud instead of your own home server (and then duly paying for the processing time).

The invocation name, or lack thereof with amazon native interaction is down to amazon. With third party published apps the invocation name needs to meet criterea. Amazon can pick and choose their own, or indeed with third party offerings they can opt for direct control without an invocation name (i.e. smartthings smart devices).

Have you installed and tried the home brew solution? Have you seen first hand the differences between this and an officially published app?

You would be well served to gain an understanding of how minimal the changes would be to take this code and streamline it into a native amazon environment before dismissing the posts made by those who have. Amazon will have development teams capable of doing this within a week and have almost unlimited resources to do so. The reason for these functionalities not being available almost certainly lies with a commercial decision to drive consumers toward purchasing more hardware (playones with alexa) or AmazonMusic streaming or upload space.


Exactly my point for which I was accused of being a conspiracy theorist. I want to play my library and not be forced to subscribe to renting music. Plex is there and works, it is already set up to use Alexa. I thougtt sonos was supposed to be agnostic and instead I have to subscribe to amazon music google music or Apple Music
Userlevel 4
Badge +1
Plex and Sonos work already. from reading Ryan's answer regarding Alexa and Sonos and a local library - the issue is how will Alexa know what is on YOUR local library?

So there needs to be some place (on a Sonos account in the cloud? on your Plex cloud server? ) with a file listing your local library listings - with at least the library name, the album and maybe the title
and
that 'file' would have to be accessible and readable by both Alexa and Sonos - so that Alexa can see what you have and tell Sonos and Sonos knows what and where to get it.

I imagine the Plex / Sonos part would not be hard to program... however whether Amazon wants to do the programming for the Alexa / Sonos part would be the question.

however it certainly seems feasible.


Plex stores the library in the cloud via an external connection to my nas. I can use my library on any machine and browser. I have in fact been using it this evening remotely in the U.K. While my nas is running in LA. Plex has an app for sonos which requires the Plex library to be accessible externally and not locally. This works flawlessly. So there should have been no reason not to implement this unless amazon wants the user to be forced to rent music through an amazon subscription. As is, Alexa on sonos only works fully if you are subscribed to an amazon rental prOgram. You cannot use full functionality otherwise
Userlevel 5
Badge +3
I thougtt sonos was supposed to be agnostic and instead I have to subscribe to amazon music google music or Apple Music

Yeah, how un-agnostic of them to offer you all three of the major players in the space...

So there should have been no reason not to implement this unless amazon wants the user to be forced to rent music through an amazon subscription.

You forgot the equally logical reason that Sonos is doing this intentionally to offend you and you alone.

I, and others, have actually provided solid answers why this is the situation at beta launch. You've elected to ignore them.
Userlevel 2
I too have a vast library stored on a NAS drive, the vast bulk of it ripped from my CD collection. The NAS also contains some digital music purchased from Amazon, which is also (of course) held in Amazon's cloud storage. I do not subscribe to Amazon's Prime Music. In addition, I have a Premium Spotify account linked to my Sonos. I currently have one Echo Dot in the most-used room and an array of Sonos speakers in most rooms of the house. I'm enjoying being able to play some of my music (the stuff stored on Amazon's cloud storage) on any of my Sonos speakers using voice control. I'll look forward to having Spotify integrated so that I can also control that using my voice.
I accept that this implementation is beta and has limitations.
I had already worked out that room-grouping isn't yet available by voice-control but that if I pre-group in the Sonos app I can use Alexa to play music on that group by sending it to any of the rooms in the group.
I had also discovered that, while I can't yet select music from Spotify using Alexa, if I add music from Spotify to a queue by using the Sonos app, I can control playback using Alexa
So far, so good BUT...
I am disappionted to learn that using Alexa to play from my local library is not considered a development priority; I have fairly eclectic musical tastes and while I find much to enjoy on Spotify, many of the albums stored on my NAS are not available there and although a fair number of them ARE available on Amazon, I don't feel inclined to repurchase as a digital download music that I already own.
I may be past MY prime but I am far from being a luddite and have embraced both digital downloads and streaming as enthusiastically as my grandaughters.
I am both a music fan and a musician who has been lucky enough to play music from most genres from the early rock era of the fifties right through to today's music and my listening enjoyment covers everything from classical, through early blues and jazz, 40's big bands (Ellington, Miller, etc), jazz combos such as Artie Shaw and Miles Davis, the 'crooners' - Crosby, Sinatra, Nat Cole and so on, plus all the big names that have come and some sadly gone (Elvis, Lennon, Bowie, Hendrix, Joplin) through the rock and pop era. There are not many notable names in any genre that are not represented somewhere in my collection.
While this Alexa integration does not prevent me playing anything in my collection via my beloved Sonos app, I'm sure that I'm far from being alone in hoping that Alexa voice-control will at some point be extended to include my hard-earned locally-stored collection.
I come from a generation that doesn't expect instant gratification, so I'm prepared to wait but PLEASE Sonos/Amazon don't relegate my personal collection to the back-burner. I'm sure I'm not alone....