Sonos, Alexa and local NAS stored music

  • 5 October 2017
  • 77 replies
  • 19545 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

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....
Userlevel 5
Badge +3
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.
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 +3
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.
Any number of points to make in this conversation.

1. Alexa skills are not installed on any Alexa device (Echo, Amazon phone app, Amazon Music phone app, Eufy, Sonos 1), they live in the Alexa (Amazon) cloud and are attached to Alexa accounts, so updates will happen without any user intervention or opinion.
1a. This means the skills can get better as fast as the dev/qa/release process for the skill writer works.
1b. Stodgy old users like me need to get over the idea of staying on a specific version with specific functionality.

2. How to enable local library playback is not a hard problem, but there are interesting error paths that are more complicated. If the Sonos privacy policy allows replication of one's music library index to their cloud systems, then local library playback is easier to implement -- the alexa cloud just turns names into text and throws it at the sonos cloud which either plays the track or throws back an error. A little easier said than done, but @controlav's skill does that if one has a Win10 box up all the time on one's local network to interact with the local library via the Sonos SOAP API. Sonos's policy of not talking about roadmap and work-in-progress with any detail means we really don't know how close they are.

3. I suspect the Sonos point of view is that with modern streaming services have so much content that many *not all* local library users don't realize how much they have access to via those services. I've surprised myself this evening about how much of my local library is available, even if it doesn't play from my local source. There have been enough misses that I still really need/want local library playback, but I can see enough of a different point of view.

4. As i've said before in another thread, don't underestimate what's required in standing up the Sonos cloud resources involved in all of this. lechmere-v1.ws.sonos.com, the Sonos CA for Oath secure logins, the Akamai configs, the auto-scaling to provide a "presence" of every HHID that has v8 installed in the Sonos AWS accounts, and making that reliable at the uptime requirements for such a large user population. There's a huge amount of work involved. (And from what I can see, it's been done using the right pieces.)
Userlevel 2
Likewise, I'm a little disappointed with the capabilities of the current Alexa integration. I have a comprehensive local music library, and don't have subscriptions to other music services. Its nice to see Sonos have released an Alexa skill , but for me its of limited use.
Userlevel 5
Badge +3
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 2
Yes, I can indeed both add to a queue from my NAS collection or select a playlist by using the desktop or phone/tablet app and then control playback using Alexa. However, listening to such a list often sparks a reminder of a song not currently in the list which I wish to add. At the moment I can't add a song 'on-the-fly' from either my collection or Spotify by using Alexa.
This is not a deal breaker, I can still use the app, but I'd been looking forward to not having to clean the bike grease from my hands (or dry my hands if I happen to be washing up) in order to do so....
(Sigh) I shouldn't complain of course, this is all a far cry from the fragile 78rpm records which formed part of my early listening experience or the ever-pulsing and fading reception of Radio Luxembourg....
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 7
Badge +15
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 4
Badge +3


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 5
Badge +3

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.
Userlevel 1
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....


You have described my situation to a "T". I have yet to order a Dot, although I have one teed up on amazon. Can you not add music to the Sonos Queue from your music collection, and play that queue with control by Alexa? I tend to play long playlists, often shuffled. Having the ability to control volume and turn off and on gets me pretty far along, although being able to select an obscure Sea Level or Johnny Winter track would be where I would like to wind up. I hope it is or becomes a development priority for all involved.
Badge +3
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.


Agreed. It's a lame implementation. Sonos have dropped the ball big time in last few years and this is too little to late
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.
Userlevel 4
Badge +3


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
Userlevel 4
Badge +3
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
I get all the frustration, and it certainly is a downer if you don't want to use the services available to be controlled through Alexa. It's not bothering me really as I happen to primarily use Amazon, Pandora, and XM as my sources (other then tv line in), so I'm good. However, I get the frustration.

The way I see it, it's pretty clear that Sonos probably could have opted to design the interface the same was as the 'homebrew' skill. They probably didn't need to work with Amazon's developers hardly at all. If they did that then they probably would have had a lot fewer restrictions.

So what are some possible reasons why they didn't do that?
- Sonos wanted to have a device with Alexa built in. They obviously needed to work with Amazon on that. For design of the mics as well as using the service. I have to believe that that deal was tied to doing the speaker integration more along the way Amazon wanted it done. I doubt scraping their own Alexa enabled speaker was much of an option for Sonos, since their competitors were certainly going to go that route. Sonos can't afford to be behind on this.
- As has been pointed out in other threads, the vast majority of users use streaming services. I would also bet that the majority of people who have bought echo's primarily use the services Amazon provides. It does make sense that those services would receive the first treatment.
- There are some advantages to this design as opposed to Sonos 'going it alone'. Those being that you don't have to say 'tell sonos to' and eventually...hopefully...you won't have to specify the zone every time.
- Another advantage is the error handling. For example, If I were to say playing 'Play Tom Petty on Pandora in the Living Room', but I don't have a Tom Petty Station, Alexa will ask me if I want to create it. Other types of things. You can't do that sort of interaction with a homebrew skill.
- Then there is the visual and audio feedback. I the homebrew skill can reply (or could be programmed to) reply back that it's playing such and such in the living room, but it could give you the same visual feedback in your Alexa app, echo show and spots, or the fire tvs that are Alexa enabled.

To me, I can see how the homebrew design would have been easier to implement, and provide more for the customers initially. However, I can definitely see where doing the design this way provides for greater features in the future. Since the market is competitive and about to get even more competitive, I can see why they went this route.

Again, probably not much consolidation for those who can't use Alexa the way they want to now.
Userlevel 6
Badge +14
I can't see any motivation for Amazon to implement NAS, Spotify or Deezer "skills" with their Alexa integration, seems a conflict of interest. Since Sonos have teamed up and joint developed the One with Amazon I think we're out of luck with any none Amazon source.

Not a problem for me personally (I was weighing up buying my daughter a Sonos One for Christmas but the Alexa integration would be next to useless for us).
Actually, the One is going to be platform agnostic. You will be able to select the voice assistant you wish to use, with Google being next on the slate.
Yeah, because hanging out down the street to watch you get in the car and leave is so much harder than hacking Amazon to figure out when someone isn't playing music. Jebus Christmas, do you people think about what you write? :8
Yeah, because hanging out down the street to watch you get in the car and leave is so much harder than hacking Amazon to figure out when someone isn't playing music. Jebus Christmas, do you people think about what you write? :8

Why would a thief waste time staking out a house when they can use data mining to get the info they need? Thieves are very sensitive to time management and return on investment.


Dear Lord, please tell me you are not being serious. :8
OK thanks for the clarification - I’m afraid it’s pretty useless IMO, oh well put the Echo Dot on eBay......
Where the NAS play is concerned you can do all the subsequent things via voice for managing what is playing - volume/pause/stop/restart. So that is a plus over what you had before, so that is some use that wasn't there before surely? All you have to still do is initiate music play and if you use long playlists that remain in use over multiple listening sessions, that is a small task.

From what I have read elsewhere, given the architecture of Alexa+Sonos, it will be a long time before voice controlled local NAS play beyond that will happen - if ever it does. Pity, but local NAS users are also getting to be a minority in the user base so giving just them more than what they get today - which is a lot when one thinks about it - seems to be a remote possibility.
Badge
If you have a catalogue of historic recordings, or are looking for specific recordings or artists and your genre is classical and opera etc, the streaming services are poor. Also having added one or two recordings to my Sonos playlist, sometimes when I return to them say 6 months later they have disappeared from the streaming service.
Kumasi, I hope you are wrong about NAS support being unlikely. If you play classical or opera you don’t generally mess about with the sequencing, although you do pause, adjust volume maybe.

There has been so much hype about it all, so I guess disappointment is almost inevitable...

Thanks for your answers.
OK - i have no idea what Plex is, and having struggled with something called Groove after loading some music onto my OneDrive and i cant make it appear on my iphone app, this all seems like a bit of a mess? My files are encoded in ALAC, dont know whether OneDrive/Groove doesnt like this? (Steve Jobs would turn in his grave with all this complexity!)

All i want to do is store my ALAC files in the Cloud (prefer OneDrive as there is 1Tb for me) and play them on Sonos...and hence get rid of my NAS. I dont want any Match or any other service ....Can it be done simply?

Thanks for your help btw, its not a comment on the folks here who are trying to help and i do appreciate it!!


The only Cloud services currently supported by Sonos are Amazon, Google Play Music, and Apple. Amazon is free for 250 tracks and ~$25/year for 250k tracks. Google is free for 50k tracks, Apple requires a full Apple Music subscription. The only one fully compatible with Alexa at this time is Amazon. The others require initiating play on the Sonos app, then you can control playback via Alexa.

None of these accept ALAC files. Instead, they will match/convert your files to a high bitrate MP3 or Apple AAC codec.