[Deprecated] Ask Alexa Version 2.1.1

Announcing version 2.1.1 of Ask Alexa

Lambda code updated to 1.2.1
Both the Intent and Sample Utterance files have changed as well.

PLEASE NOTE: Going forward I will be looking at incremental increases to optimize the code, fix bugs, and increase response speed…No need to weekly updates to do that…Other personalities will be released as they are created, and those will be in the incremental releases when they are posted.

This is a larger change with the SmartApp, Lambda code, intent and utterances changing. It is always recommended that you update your slots to ensure you are capturing all of the available variables used within Ask Alexa.

YOU MUST install all areas of Ask Alexa, including the intent file and the utterances, along the smartapp code and the Lambda code for this upgrade to be successful!

Please note that this is a single SmartApp; it no longer has a parent/child code base.

The only issue encountered so far with this unified code is on Android mobile apps. If you are editing a macro, clicking “Done” will take you back to the mobile app and NOT the main Ask Alexa menu. This is NOT Ask Alexa related, but the mobile app itself; iOS does NOT appear to be affected by this. Either way, a ticket has been opened with SmartThing to address this. If you find this issue annoying, please open a ticket with SmartThings as well to increase visibility.

Other additions to this new version include:

  • Bug Fixes/Optimizations-The normal things…silly misspellings, logic errors, bug reports.
  • PIN/Password Usage Expanded the PIN usage to granular control in macros. Now you can choose to have a control or CoRE macro (Basically, any macro that could change your security or open/close/lock/unlock) able to be protected with a PIN. Simply enable this option and append your command with ‘password xxxx’ Suggested by @Matthew_Freestone
  • Snarky Responses - Based on the recent survey many of you completed, you can now choose how Alexa addresses you during the continued responses. This DOES NOT change the underlying action responses, however, any continuing commands now change based on your settings. Snarky presents more ‘off the cuff’ responses than the normal response. This includes changing your name to other random silly names you designate.
  • Lambda Code-Added the “Snarky” personality responses. These are randomized and can include your name in the response. Other small bug/syntax fixes.
  • Sonos Speaker Memory Slots- Suggested by numerous folks, most recently by @joecwong. By enabling the Sonos option within the Device Specific Commands under Settings, you can replay specific songs or internet channels that have recently played. This is an expanded implementation from other SmartApp solutions as it polls ALL speakers you have set up in your SmartApp and presents every song recently played (up to 20). You can then play a song on any of the speakers you have set up within your account and SmartApp. To play one of the memory slots, simply say “Alexa, tell SmartThings to Play MemorySlotName on SonosSpeakerName”. This ONLY has been tested on Sonos speakers. Until SmartThings published a better API for all speakers this may be the only system this works on.
  • Utterances/Intents - These files changed based on addition passwords to macros and the new Sonos Speaker Memory Slots. Be sure to update these in the developer website to use these functions. Remember when adding new intents, slots or utterances, the order in which you should install them. First do the slot updates (save), the the intents (don’t save) then the utterances (save). If you find this order doesn’t work for you, try changing the order and report to the community the proper order that works for you.

If you are using 2.0.0+, you simply need to update the SmartApp. Again, because of the changes it is advised to run through the entire setup to capture everything.
For those wishing to re-install, the instructions on the wiki have been updated:

The wiki for this app is here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa

As always, you should also update your custom slots on the Amazon developer site when you have the app running. Nothing SHOULD change but it never hurts to refresh these every once in awhile.

All of you have been great in asking very relevant questions and making suggestions that I end up using. Here are some helpful tips on usage and support:

  • Sometimes it works best if I can work real time with you. To facilitate this, I have created a Slack channel: https://askalexa.slack.com. Using this tool is easy and will allow for real-time collaboration to solve the problems faster. To use this feature, I must invite you to the Slack channel. This will not be for normal questions; please use this forum for that function.

  • The Echo, as it is designed currently, cannot react to switches opening or other actions within SmartThings. She will do things for you, but only at your direction and at the time of the request. The delay timer mentioned in the control macro happens at the SmartThings hub, not within the Amazon Alexa control.

  • When evaluating new features I will typically ask for a valid use case. If it can be used by others to bring them value I will put it on my list of future revisions. Not all suggestions will be used and many times I add aspects of the request.

  • There are no dumb questions, but many of the questions you may have were probably answered in the past few months since the initial release. Please take some time to go through the forum and the wiki if you have issues. And don’t be offended if I give you the specific area of the manual that answers your question. I have spent almost as much time on the documentation as I have on the app. Finally, there are some big fans of Ask Alexa that know almost as much as I do. They can also help.

  • Feel free to send me forks of utterances or even code revisions. As mentioned above, if it adds value to the overall program I will try to include it. This also goes for the wiki documentation…while I have spent about 80+ hours creating that document, I am open to it being improved; I know there are grammatical errors or syntax issues…If you find them, fix them…I will include your name (if I can) in any fixes submitted.

  • If you find a bug or a consistent crash please help me track it down by giving me repeatable steps to reproduce it. A non-reproducible bug, many times, indicates other areas that may be at fault besides the app. If you watch the live logging and see a red error with a line number, that is very helpful to me! However, I will need a full screenshot and not a copy/paste of the text. But be careful about revealing your OAuth and AppToken in your public posts. People can control you house with that information. May want to blur that out.

As mentioned above, revisions will be less and less as I mature this product. And with the code base now unified, I expect less and less additions…especially as we integrate CoRE more to do some of the heavy lifting of larger condition-base automations… Any and all suggestions are still on the table for addition.

As always, I appreciate any public accolades or even donation to my PayPal account: https://www.paypal.me/mstruck . And, if you are so inclined, I also will accept bitcoins (or fractions thereof) if you have any laying around. My wallet ID is: 1CMgaiKgBfojTBCLpHLfa9KvcrW3cNxVpm



Ok, I could not wait to test the Sonos slot feature when I saw you released this and I have to say to out-did yourself, Michael!

I’ve been standing in front of my Echo telling it to play each of the stations on each of my Sonos speakers around the house. I am sure I am driving my wife nuts right now.

Found 1 quirk. Songs that have special characters (abbreviations in titles/classical type titles) cannot play. I somewhat understand why when I looked at the lambda request/response. Not a big deal but thought I would put it out there.

My one additional request. Can you put additional slots in next release? Maybe up to 10 (or more)? Not sure how easy that is (line 168?). I realized that I play different songs/stations in different parts of the house so although I did not exceed 5 per Sonos speaker before I actually use about 8 different stations throughout the house. With this, it will probably grow.

Again, great work on this! Thanks!


I knew someone would ask for more than 4 slots…Fortunately, I built it so I could scale it…I will put an option in the next release to have you be able to define the number of slots…maybe up to 10 or 15…

Regarding the “quirk”, are you saying the name of the slot as that is user defined…I didn’t put in the option to have it referred to by the channel name because of this very issue. I have a channel I called “80’s Rock” and in the developer slot it removes the apostrophe, but still does allow me to say “eighties rock”. Or are you saying the reference in the slot is fine and recognized but the music won’t play no matter what you name the slot because of the way the music is named?

Thanks for the feedback and compliment…you should thank yourself, however…you are the one who suggested it :slight_smile:

1 Like

Yes, it’s the latter, the music name. Slot name is “Suzuki book 3” but the song it is trying to play is “Sonata in C Major, Op. 36, No 3”. Going to look back at how the Alexa Helper was able to play it. Now I am curious as I think I was able to. Not critical.

Confirm my slot names are fine with special characters. I see the apostrophes and symbols get removed but still recognized by lambda code as it matches the slot name in params.

Definitely, no issues playing my most used station on the Sonos…Pandora “Erasure Station”

I honestly think I can finally cut the cord on Alexa Helper this weekend…:smiley:

Thanks for another great update. I hadn’t really been following the requests for the Sonos slots. Took me a few minutes to track down how to get that working but I have it now. Can you elaborate on how the app polls for the recently played stations or songs? I tried loading an Apple Music station on a Sonos then going to the Ask Alexa app to add it to a memory slot, but it wasn’t there.

Hmmm…I have a theory that it might be a ‘description’ issue…I actually eliminated some legacy Sonos code as couldn’t find a use case where it would come into play…this might be it…

I would be interested in what the live logging says when you attempt to play it…and if you would be open to it, I might have you put in some logging commands to see if I can replicate it on my end.

The Sonos implementation is ‘tricky’…the best way I have found to get a song to show up in the recent played list is as follows:

  • Use the Sonos app to play a song
  • Go to SmartThings and find the integrated speaker control for that Sonos (the device handler).
  • Pause and play a few times until you see the description change to the song Sonos is playing. Or click the refresh button a few times.
  • The song should then show up in the recently played list.

Basically, SmartThings has to have ‘seen’ the music that is being played. On its own, it could take up to 10 minutes to ‘repoll’ the speaker for SmartThings to see the status…

Let me know if that works for you…

Hey Michael, great update.

Can you explain how I set up the %people% feature?

Edit: Nevermind… I figured it out.

Michael - I am probably missing something basic, however how do you view / alter the “slots”?

You must first have Sonos speakers…if you don’t, none of this will work.

First, you go into Settings. Find the area called Device Specific Commands (almost at the bottom)
Turn on Sonos Memory Slots
On the main menu find the speakers, add your Sonos, and then edit the memory slots.

Let me know if that works for you…

If you can verify that Alexa Helper DID work with that troublesome song I am 95% sure I know what the issue is…let me know and may send you a special version to test my theory.

Yes, just tested and confirmed that it works with Alexa Helper. Let me know if you need any other tests/validation.


It appears that what I thought was the issue probably isn’t…can you do this…go into the settings and then the device specifc command, reset the song database, the open up live logging and filter on Ask Alexa. Go into your memory slots and confirm the songs show up, then exit the program. You should see a line like “I added xxxx song to the database”…see if that song actually shows up…

Let me know what you see (maybe send me a PM with a screen shot)…I actually am rather perplexed it plays in Alexa Helper, but Ask Alexa does gather the information differently…

@MichaelS another great update! Fiance is loving the snarky mode responses lol great job!!

Thanks…I pacing of her speech is something to be desired, but I like the “want to try again, this time without an error”…or the simple “FINE!” when you tell her you need nothings else :slight_smile:


yea you have to find the right phrases to say otherwise it doesn’t make sense lol. But the responses you built in are great, we will be leaving her on this lol

Excellent…I will need to plan out my next one…and will probably keep it a surprise…


as I have said… I am somewhat lost in all of this…but I follow directions very well.
One place I get lost is updating. I just don’t understand exactly what I am supposed to do. I read this:
If you are using 2.0.0+, you simply need to update the SmartApp. Again, because of the changes it is advised to run through the entire setup to capture everything.
For those wishing to re-install, the instructions on the wiki have been updated:

But then I read this:
YOU MUST install all areas of Ask Alexa, including the intent file and the utterances, along the smartapp code and the Lambda code for this upgrade to be successful!

So I get confused… as to what to do… You did the BEST INSTALL INSTRUCTIONS I have ever seen, can you help me with the update instructions?


  1. One update app
  2. Get info for slots
  3. update xyz
  4. update abc


This is what I do…

I go through the entire install process.

I go in this order…

Step one - update lambda code. I copy the the new info from github, AFTER clicking on RAW. I then highlight and DELETE the old lambda code before patting the new code in place.

Step two - I update the Amazon developer code. I start with the intent file, then I do the utterances. I copy, delete, add, just like above in step one.

Step three - I update the smart app via github integration.

Step four - I update the oAuth code in the lambda

Step five - I update all if the slots in the Amazon developer site. I do this just in case I changed something and forgot to update it prior.

Step six - I ask Alexa what the version is to update the code to I guess the cloud.

All done. I’ve never had a glitch doing it this way. I do not believe the order matters that much.

What has mattered is the highlight and DELETE of the old code first, then pasting the new.

Every glitch I’ve had had occurred when I did not follow this step.

Edit - This takes me about 10-15 minutes tops.

1 Like

Thanks @bamarayne
when the Grandson takes his nap I will follow your steps… and I copied it to a Word doc and saved for future use.

1 Like