[Deprecated] Ask Alexa 2.2.1

Did you manage to confirm the incorrect/invalid colors in your setup?

When you say ‘invalid’ what do you mean? All of the colors come from SmartThings where they provide the RGB, Hue and Saturation. Unfortunately, some of the color names are subjective (what exactly is 'fire brick?). However, in some testing I did last night they aren’t too bad, and the primary colors that most people will use (red, blue, green, etc) are correct. Are you seeing a color that is just way off? (i.e. A description of ‘red’ that is clearly ‘blue’, for example).

Let me know and I can look at the settings. At the end of the day this is SmartThings’ descriptions that are wrong. In the sampling I have done when I translate the RGB to HSL the numbers (mathematically) check out…which is the word description that is actually wrong for that color. And again, all bulbs are different, which adds to the fun :frowning:

I am using Ask Alexa for a long time but I am not sure if I am using it efficiently.
I don’t know the capabilities.

for example, I have Sonos speakers.
Today I realized that I can switch to the next song on the list with command "sonos device next"
but I couldn’t find the reverse command “previous” did not work.
I could not figure out the volume up/down commands either.

also I don’t know if playing anything is possible with a command , when the sonos device is stopped.

how can I find out what is possible with Sonos speakers ? ( I am sure that grouping/ungrouping is not possible though)

First, thank you for using the app…I recall working with you and I am pleased to hear people are using it after the initial install!

You SHOULD be able to do previous…the syntax should be “Alexa, tell SmartThings {speaker} previous track”. There is a syntax error in the code that I just fixed today that even if you do this it will respond with ‘next track’ even if it plays the previous track…the error was in the response code.

To be clear, you should have ‘previous track’ in your List of Operators in the developer’s area.

1 Like

ok. I will update the app (and all lambda code etc.) and try again.
what about volume up/down ?
or starting a play operation from stopped state ?

Yep…each of those should work:

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

ok. but “play” just plays if it (the speaker) already has something in the queue.
does not work if I want to make it play something new ?

Yes an no…You can set up memory slots and play different items but they have to have been played and cached by SmartThings before you can set up the song in a slot.

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.