[Deprecated] Ask Alexa 2.2.1

ok. I have played and cached some lists from spotify. (standard today’s top hits )
now how can I start playing of this list via Ask Alexa ?

thx

I’ve just updated to code 2.2.1 with all amazon, lambda codes etc.
but I still get “next” in the response.
where can I find the updated code ?

I am away for the computer but there should be a latest version header in this document: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa

There is a new version coming tomorrow so it will update then.

it is not updated…
but I have found the line in the code and changed myself to “previous”

now these don’t work for me :

Alexa, tell SmartThings {Speaker} Increase Volume
Alexa, tell SmartThings {Speaker} decrease Volume

response is:

“I could not process your requestfor the living room sonos. are you sure you are using the correct commands for the device ?”

this is something I’ve just tried so I am not sure if I call correct. but I tried the exact phrease you wrote.

Did you update your developer slots? You may want to try “tell SmartThings increase speaker”

New version is out now:

1 Like

well, I updated to 2.2.1 not 2.2.2
so now which one is the correct one ?
increase volume or increase speaker ?

also, I have played and cached some lists from spotify. (standard today’s top hits )
now how can I start playing of this list via Ask Alexa ?

Correct…2.2.2 is the correct version. Please upgrade to that.

Regarding the commands…each of these should work to increase the volume:

Alexa, tell SmartThings {Speaker} Increase Volume
Alexa, tell SmartThings to increase {Speaker} Volume
Alexa, tell SmartThings to set {Speaker} to 20%
etc...

Please note that for the first two commands that when you DON’T give a number it will increase or decrease by the amount in the Settings>>Default Command Values section. If you are getting an error when attempting to increase the volume it probably means you have not set these values up. I just tested these commands myself and they do work, so give them a try.(http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Default_Command_Values_.28Dimmers.2C_Volume.2C_etc..29)

It is a misconception that you need to memorize a specific list of commands…as long as you have the verb and nouns correct the system WILL attempt to figure out what you are attempting to do…if you come across something that SHOULD work and doesn’t, I can certain look at the code or the utterances to get it working. And there is no harm in testing new commands…the worst that can happen is the system says it can’t understand you :slight_smile:

To play your songs, you will need to add them to the memory slots of the speakers. Here are the high level instructions:
On the main menu, go to Connected Speakers
Choose a speaker
At the bottom a Memory Slot section will show up (This will ONLY work if you have a SONOS and have the SONOS options set up under Setting>>Device Specific Commands)
Select a memory slot, then the songs that have been cached will show up.

In looking at the instructions I probably could expand on this a bit more. Let me know if this works for you and I will document a bit better the speaker setup (I need to do this anyway as I will be expanding the capabilities of the speaker soon!).

1 Like

thanks. with 2.2.2 I can increase/decrease volume as you recommended.

I’ve also setup 2 sonos memory slots but I could not play them.
For example for the first slot I defined name Moana and set up soundtrack song from movie Moana from my spotify account.
But when I say “bedroom sonos play moana” it says “I could not play the song you requested”.
what is it that I am doing wrong ?

also, I would really love to be able to play a whole list from my sonos favourites instead of just a song. wouldn’t that be possible ?

So the problem is that you are not playing the song directly…you are playing (or activating) the memory slot within Ask Alexa. As such, the memory slot needs to be a ‘noun’ in the developer slots…If you set up your memory slot and then run Settings>>Setup Variables and copy the contents to the Amazon developer site, it should work.

If you did all of that, I would change the name a bit and maybe send me copies of what your live logging says…the error you are getting means it couldn’t find the song, which means it MAY have changed on the SmartThings side. Most people assume I am controlling the Sonos directly with this app. Unfortunately, I am controlling the DTH of the Sonos, which controls the Sonos player. So, there is always a chance the DTH is out of sync with the actual Sonos player…the best way to refresh that is to play a song through SmartThings (press play) and then stop/pause a few times…then try.

Let me know if that helps.

hi,

I just tried all of that. changed the name of the memory slot, added it to skill interaction parameters LIST_OF_PARAMS
but it still does not work.

tried 2 different songs, here are the logs from api:

0572530b-43e9-4104-8e08-bec52e44ea32 12:15:18 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug I could not play the song you requested. Check your Sonos memory slots in the SmartApp.
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug Param: 50 shades
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug Num: undefined
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug Op: play
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug Dev: living room sonos
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug -Device command received-
0572530b-43e9-4104-8e08-bec52e44ea32 12:15:05 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:14:58 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:36 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug I could not play the song you requested. Check your Sonos memory slots in the SmartApp.
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug Param: moana
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug Num: undefined
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug Op: play
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug Dev: living room sonos
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug -Device command received-
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:23 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:13:16 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:37 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug I could not play the song you requested. Check your Sonos memory slots in the SmartApp.
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug Param: 50 shades
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug Num: undefined
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug Op: play
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug Dev: living room sonos
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug -Device command received-
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:24 AM: debug --Begin commands received–
0572530b-43e9-4104-8e08-bec52e44ea32 12:12:17 AM: debug --Begin commands received–

I would hesitate using numbers in your slot names…Amazon has a habit of converting these to text and vis-versa. I have one called ‘Rock’…which plays a station on the Sonos. That being said, let’s take this from another direction…instead of changing the name of “Moana”, keep that (it is recognizing it), but instead change WHAT is played. I have heard that some specialized channels will NOT play through SmartThings DTH…Change it to a standard Sonos station and see if that works. If it does, it means Spotify may not provide the SmartThing DTH with the proper ‘address’ to replay it.

what do you mean by “standard sonos station” ?
so far I have tested with my music library (local disk) and spotify.

If you go to the Sonos app, then choose stations, choose, for example, “181.1FM Awesome 80’s”…play/pause it multiple times using the SmartThings app…when the control shows the name it has been ‘cached’…then go to Ask Alexa and add that to your memory slot.

From there you should be able to play that…if that works it means some of the ‘links’ provided from Sonos may not be presented to the SmartThings DTH properly.

I tried a station from Tunein radio. I stopped/started playing through smartthings several times. but it never appeared on memory slots of Ask Alexa.
what is missing ?

Again…don’t use any subscription services…just the standard item such as the one I recommended…I KNOW that one works.

And you did encounter one of the more frustrating aspects of the Sonos integration…it is NOT smooth and is (and shall probably always be) considered Beta. That means it may not always work. That being said, the recommendation I gave should work.

I dont have any standard services on my sonos app. if I dont add spotify, tunein or my music library, there’s nothing to play in sonos.
I don’t understand what you refer to as standard item.

You should have access to just regular streaming radio stations…I can’t send a screenshot right now, but it may be something you need to add…it is free. I will send one later, but see if you can find that.

maybe I am so dumb to see it. I really can’t find on my sonos app.
I just have “add music services” menu option and from there I can add many services. if I don’t add anything there’s nothing to play.
please send me screenshot and I can check further…

It might be the add music service…see if it says radio stations

And you aren’t dumb…computers are dumb :slight_smile: