UPDATED TO REFLECT THE NEW FEATURES OF ECHO-SONOS:
I have noticed that many people with Amazon’s Echo and Sonos devices have been wishing that they could do more than just play/pause the music that was already in the Sonos queue.
Luckily, someone wrote a really great set of Echo-Sonosinstructions on how to integrate Alexa and Sonos. Basically uses jishi’s node-sonos-http-api and merges those commands into a new Alexa skill.
Using Echo-Sonos, Echo can:
Global commands (no rooms required):
Presets: “Alexa, tell Sonos to play Rock”
Pause all: “Alexa, tell Sonos to pause all”
Resume all: “Alexa, tell Sonos to resume all”
Room-specific commands, where “ROOM” could be any of your Sonos room names (eg Kitchen, Master Bedroom, and so on):
Playlists: “Alexa, tell Sonos to start playlist MY PLAYLIST in the ROOM”
Favorites: “Alexa, tell Sonos to play favorite MY FAVORITE in the ROOM”
Next: “Alexa, tell Sonos go to the next track in the ROOM”
Previous: “Alexa, tell Sonos to go back in the ROOM”
What’s playing: “Alexa, ask Sonos what’s playing in the ROOM”
Pause: “Alexa, tell Sonos to pause in the ROOM”
Resume: “Alexa, tell Sonos to resume in the ROOM”
Mute: “Alexa, tell Sonos to mute in the ROOM”
Unmute: “Alexa, tell Sonos to unmute in the ROOM”
Repeat: “Alexa, tell Sonos to turn repeat [on,off] in the ROOM”
Shuffle: “Alexa, tell Sonos to turn shuffle [on,off] in the ROOM”
Crossfade: “Alexa, tell Sonos to turn crossfade [on,off] in the ROOM”
Clear queue: “Alexa, tell Sonos to clear the queue in the ROOM”
Volume up or down (single room): “Alexa, tell Sonos to turn it [up,down] in the ROOM”
Volume up or down (all in group): “Alexa, tell Sonos to turn it [up,down] in the ROOM group”
Set volume (single room): “Alexa, tell Sonos to change the volume to 22 in the ROOM”
Set volume (all in group): “Alexa, tell Sonos to change the volume to 22 in the ROOM group”
Many other natural phrasings are supported for each command. The file “echo/utterances.txt” has all of the examples.
In light of the advancements that Echo-Sonos has made, there is no need for my “Enhanced Echo-Sonos” fork.
You can find all the the instructions you need in the Readme. But let me know if you have any weird problems / questions. It worked for me (almost) right away, and has been consistently working really, really well for me.
Not to control Sonos playlists, next / previous songs, change volume, etc. as I am able to do now. To have that functionality, you need a server to handle those commands.
Hi guys, for a long time now I’ve been having major issues with the ST-Sonos integration. Basically, it does not work! That said, I wonder if there’s a way to substitute the Echo for the Sonos speakers for things like “Say the weather when [user specified trigger, like motion] happens”, or “Say [user specified phrase] when [user specified trigger] happens”, etc. Seems like you guys might know the answer to this. I’ve asked ST support but all they said was that Amazon is not treated as a speaker by ST so no it cannot. Thoughts?
@mhatrey - perhaps you might know considering you work at Amazon?
@triggertact - Unfortunately Echo does not support this feature. I know, I would like this feature very much. At this point Echo’s forum would be right platform to bark at, so the echo product team knows your feedback and based on the weight they might prioritize the feature, if this is something in their roadmap.
So I am following along in your instructions but in Amazon when I click Save I am getting errors such as:
Error: There was a problem with your request: Error in sample on line 134 - ‘LevelIntent set level {ten|Level}’. The given intent doesn’t declare the slot ‘Level’.
Updated the description above to reflect the many new features of the Echo-Sonos. Deleted the link to my “Enhanced Echo-Sonos” fork as it was no longer relevant.
@infofiend I’m in the process of having the github post you referenced carried out on my network to integrate Alexa with Sonos. (I’m having a developer do it as it’s over my head."
Spotify is my only source of music. All others pale in comparison IMO. That said, I love the freedom of Alexa in that I can say “Play [artist] on Spotify”. Is there any solution that you know of that allows all the Spotify / Alexa commands to work but play through Sonos? Thanks in advance!
I am trying to run sonos http api on my Ubuntu 12.04 server.
When I run the server.js I get this error:
node --harmony server.js
/root/node-sonos-http-api/server.js:109
process.on(“unhandledRejection”, (err) => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:945:3
I can’t tell what the problem is from that error, sorry. I think your best bet is to see if you followed each and every step in the Github Readme. If you think you have, try asking ask jishi.
meanwhile , I am trying to create the Lambda AWS and Alexa side configurations.
I created both.
Should I use the same Amazon user ID for AWS and Alexa logins ?
when I try the test code after I create the lambda function I get this error:
ok. I fixed the lambda and alexa side.
now my commands from Alexa come to my router.
However, as I can’t start the nodejs server, it does nothing.
How can I fix the problem when starting nodejs ?
node --harmony server.js
/root/node-sonos-http-api/server.js:109
process.on(“unhandledRejection”, (err) => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:945:3
I really wish I could tell you what the issue is, but to be honest, I am not that familiar with setting up node.js servers. I had never even set one up prior to using the instructions on jishi’s Github page. And I set mine up a looooong time ago - a couple years I think. All I can say it that if it’s not working, it’s likely that you missed a step or perhaps are missing one of the required libraries. Check your history to see if some library didn’t load or if there are packages that need updates (if so, run sudo apt-get upgrade). Other than that, Jishi is your best bet.
OK. I understood that. But I don’t know how to contact Jishi.
Any way I found an email address on github ; I’ll try that.
Other than that , my Echo has not arrived yet. So I wanted to try this setup to see if the added skill is usable through a device. And I’ve found 2 options:
But both of these responded : Amazon music is not supported on these devices.
What does that mean ? I am not trying to use any Amazon music service in this skill. Am I wrong ?
You should check out Ask Alexa smartapp by @MichaelS. It has the ability to set up and store multiple radio stations so you can Trigger them via voice (also need CoRE). With those two smartapps, you can pretty much do anything via voice.