Advanced Sonos Commands for Alexa/Echo (choose playlists/radio, control volume, skip songs, etc.)

My understanding is that this isn’t possible because the echo cannot be used as an external speaker.

See Will Amazon Echo Ever Announce Alerts via Smartthings?

1 Like

@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.

1 Like

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’.

Ideas? Did I miss something?

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!

One way would be to make your selection one of your Sonos favorites. Then you can just use the echo / Sonos integration in normal manner.

Another option would be Michael Struck’s Alexa Helper smartapp - [quote=“MichaelS, post:1, topic:46786”]

[/quote]

Hi,

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

~/node-sonos-http-api# npm -v
node -2.15.1
~/node-sonos-http-api# nodejs -v
v0.10.47

What can I do ?

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.

hi,

I followed the steps. How can I 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:

{
“errorMessage”: “Unexpected token <”,
“errorType”: “SyntaxError”,
“stackTrace”: [
“Module.load (module.js:343:32)”,
“Function.Module._load (module.js:300:12)”,
“Module.require (module.js:353:17)”,
“require (internal/module.js:12:17)”
]
}

What is the reason for this error ? How can I fix it ?

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

~/node-sonos-http-api# npm -v
node -2.15.1
~/node-sonos-http-api# nodejs -v
v0.10.47

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:

  1. Android app called Alexa Listens
  2. http://echoism.io we app

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.

The issue is that I want to use Echo-Sonos because I want to use an Echo (already ordered)
“Ask Alexa” might be a good alternative from phone.

So, is there any way to simulate Echo and test Echo-Sonos ?

Echosim.io

Ask Alexa is a SmartThings app used to control an Amazon Echo.

Im starting to see why developers and coders need customer facing teams to get their products out. While this may be a great app, the chances of a relative newbie getting this workig from these instructions is almost zero.

Im not a complete novice to IT, but Ive been trying to get this working for a couple of hours now and I don’t think Im even close to getting node.js installed.

The first instruction is: “Install node.js on a server on the same network as your Sonos.”

Thats a rather large first step. No instructions what so ever, so its off to google to see whether I can run this on a windows box. When I think Ive got it running according to these instructions:
http://blog.teamtreehouse.com/install-node-js-npm-windows

The next step is: "Grab https://github.com/jishi/node-sonos-http-api and run it on that server. On Mac, it’s “npm install https://github.com/jishi/node-sonos-http-api”, then go to the directory created and “npm start”.

Wow. Talk about in at the deep end. Just “grab” that and run it on the server. Its at this point a newbie to node.js is now completely lost, and thats step 2 of about 30.

Having managed to setup and tweak AskAlexa, Im capable of doing stuff like this, but the instructions for this are just so high level there isn’t a prayer of it being taken up by lots of people without a much more comprehensive set of instructions.

So far, Ive followed the steps to get node.js installed and can get it to say “node is installed” from a simple .js file. After that, its all just fallen apart. Shame, as Ive got quite a few sonos around the house and I would have liked to try this.

this is exactly what I’m feeling.

There are instructions but they are so large. I am an IT professional. Well actually I am working on network side but I do even write codes of my own.
I’ve installed hundreds of Linux/Unix systems myself. But with these instructions I am not able to install the correct version of nodeJS.
On the api instructions it says :

This application requires node 4.0.0 or higher!

This does NOT work on Node 6+ at the moment

but my Ubuntu server is installing a total different version (10.47)
So I’m not even sure if this is suported or not.
And if it’s not supported, I don’t know how to solve the problem. Because I don’t know a source to download the correct version of nodeJS.

I’m stuck…

I got node.js installed on a windows box.

From a command prompt if I type “node -v”, I get v4.6.0

So it appears node is installed. I can call a simple script (console.log(‘Node is installed!’);) in a file called hello.js

It outputs “node is installed”. So it looks like node is installed and should be working.

Its at the next steps, where there is no clarity at all - “Grab jishis code and run it on that server”. For anyone who hasnt even seen node.js before, it may as well be written in arabic.