[DEPRECATED] Ask Alexa 2.2.5

Announcing version 2.2.5 of Ask Alexa

Happy Cinco de Mayo (for those in North America!).

I am pleased to announce the 2.2.5 version of Ask Alexa. In this version I continue (along with help from the community) to evolve the application to allow more conversational syntax, along with adding more functionality for existing and new devices. This is JUST an IDE update and another couple extensions (Also in the IDE). NO Lambda updates, however, you WILL need to go through Settings>>Setup Variables for the new functionality to operate. This is very important and about 50% of the problems I see are people not updating their slots after an upgrade. And while not required specifically, it is always a good idea to ensure you have the latest utterances.

Please note that I updated the Lambda and Message queue code a couple weeks ago. You should have already upgraded. If you haven’t the newest version will ‘remind’ you that you need to upgrade.

I recommend you read the forum post here before upgrading: [RELEASE] Ask Alexa . YOU WILL LOSE your voice and weather reports if you do not follow these steps. If you inadvertently don’t do this, load in the old 2.2.4a code back into your IDE and do the steps outlined in the post.

The next update will probably be 3 -4 weeks (or more) away. However, I will push bug fixes out if you report them to me! And I will always be on the forum to harass :smiley:

PLEASE NOTE: Now that this app is rather stable (It is now almost 1 ½ years old!) now I will be updating it less frequently except for bugs and new features. I am waiting for Amazon to release their ‘push’ notifications where some amazing stuff will happen with this app. Until then, if you do have a great feature idea for this app, just let me know.

Other additions to this new version include:

  • Bug Fixes - The normal things…silly misspellings, logic errors, bug reports.
  • Code Optimization - Always finding better ways to do things in a shorter about of code. I reduced the code about 1000 lines by moving the the voice and weather reports to extensions. This speed up the execution of Ask Alexa by about 10%-20%!
  • Expanded thermostat reporting Allows for the voice reports to include more detail about the thermostats. Suggested by @twodaend
  • Updated SmartThings Icons SmartThings has adopted a new solid blue icon for it’s logo. Ask Alexa now reflects this logo in the Control Macros area (and in the documentation).
  • Default white (Kelvin) controls Allow for the 4 defined whites for Kelvin lights to be configured by the user. Suggested by @M3Rocket
  • Nest Manager Name Change Per the author of NST manager, changed the name of the app internally to comply with the new name. Also fixed a small report issue when Ask Alexa is in brief response mode. Thanks @tonesto7
  • Ask Alexa Extensions - To allow for even more options in the future, the architecture of Ask Alexa is evolving to allow what I am calling ‘extensions’ to be accessible via the main app. Just like child apps in other applications, these can be added to Ask Alexa to give even more functionality to the main program.
  • Weather Reports Weather reports are now their own extension. This is not really a change from the old versions except it separates the weather reports from the voice reports, and adds the ability to just have advisory reports without any other parameters. This WILL be important as I develop the next extension, schedules. This will allow you to do things like have inclement weather alerts come through to the message queue (which you can be notified via lights or even a playback on a SmartThings connected speaker.). When push notification comes out, these alerts can be sent directly to your Alexa Connected Devices. I want to thank @storageanarchy again or the weather reporting code he developed for Ask Alexa last year!
    While I have separated the weather reports from the voice reports, you can still use them in the voice report macros. Simply use the Weather Report name as a variable in the output.
  • Voice Reporting Voice reporting as also been moved out of the macros section and put in it’s own extension. Weather reports can STILL be included with the voice reports through a variable or the ‘include other reports’ area. Thanks also to @fireheadman for suggested putting message queues into the voice report (other reports) section (and thanks for beta testing this).
  • Flash Briefing With the additions of new Weather Reports you can use any of them as the output of the flash briefing. In addition, you have always been able run group macros (now called Extension groups) from the flash briefing. This allows you to create groups of macros and extensions to run at the same time. Weather reports can be part of these extension groups.

For those with IDE integration with GitHub, simply update the repository and you will have the latest code for the SmartApp itself. However, for ALL aspects of the application follow the original instructions for installation to ensure you get everything updated properly:
The wiki for this app is here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa

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. See the new Message Queue functions for similar functionality with Big Talker!
  • 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 year 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 over a year creating this document, I am open to it being improved; I know there are probably still 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. You may want to blur that out.

As mentioned above, revisions will be less and less now. And with the code base now unified, I expect less and less additions…especially as I partner with other application developers to ensure their strengths can be brought into the notification model of Ask Alexa . Any and all suggestions are still on the table for addition.

To prep for the next version, be sure to take some good notes about any weather voice reports you have set up…I will be moving the weather piece to it own extension app. However, it will still be able to work in any voice report you have set up. Then, the fun begins with addition another extension after the next one!

As always, I appreciate any public accolades or even donations 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


Imagine my disappointment at not finding a margarita machine in the office breakroom this morning. This company has no respect for cultural traditions.

As for the rest of your announcement…I’m intrigued and will definitely be playing with it some this weekend. Nice work.


Quick “bug” report: You have named one of the white settings “Daytime White” Value but it should be “Daylight White” Value. :slight_smile:

Opps… :slight_smile: I am sending out a revision now :slight_smile: Thanks for the heads up.

New version is 2.2.5a

I messed up big time and upgraded with out doing this.:cry:
also I did not save a copy of the the old code either…

Should I just delete all my voice reports and then create new ones are will this just cause more damage?
as of now I get an error if I try to create a new one.


The good news is that you MAY not be too bad off. First, don’t try to delete anything…

Second, here is the old code: https://github.com/MichaelStruck/SmartThingsPublic/blob/bc5ade862daebcd6c4e400586709e6d1434a9f26/smartapps/michaelstruck/ask-alexa.src/ask-alexa.groovy

Put this back in your IDE…everything SHOULD be back to where it was…then follow those direction to back up (either on paper or screenshots) your settings. THEN delete all of your voice reports, then upgrade back to 2.2.5. That should set up up correctly…you can then create your new voice reports.

OK that seems to have worked!:grinning:
I have successfully downgraded
backed up (per your instructions this time)
and upgraded to 2.2.5

now I just need to rebuild my reports.

Thank you for your help!!!

That is excellent! Glad you were able to upgrade. I know it can get scary but the data was still there so it was just a matter of accessing it using the old code.

For those interesting in what is happening this week with Ask Alexa and the new Show…

For those that have been waiting for push notification, we are almost there:

Can restrictions be added back to Voice and Weather reports? I created a Flash Briefing Macro that has three Voice Reports: Morning, Afternoon and Evening. Based on the time of day, I will get a different weather report. For example, the Morning report will give weather for that day whereas the Evening report will give the weather for the next day. This allowed me to just listen to the Flash Briefing and it would give different reports depending on when I asked for it. Since 2.2.5 none of the reports have time of day/week restrictions so I lost that functionality. Just wanted to request that this could be re-added in a future version?


I couldn’t think of a use case to have restrictions in voice reports but you gave one!

I started the process of adding that back in…sorry I took it out but I appreciate you giving a clear use case.

1 Like

For those that look forward to my Friday updates…here is a good one:

Really strange bug that I accidentally discovered.

All these work properly:

  1. Set nook to warm white and set the level to one hundred percent
  2. Set nook to blue and set the level to seventy percent
  3. Set nook to red and set the level to eighty one percent

Any phrase that sets the color AND the level to exactly “eighty” percent, only sets the color and the level is IGNORED.

  1. Set nook to warm white and set the level to eighty percent
  2. Set nook to blue and set the level to eighty percent
  3. Set nook to red and set the level to eighty percent

But just setting the level without setting the color also works properly.

  1. Set nook to eighty percent

So basically a compound command setting the color and level of exactly eighty percent is mysteriously broken.

What if you left off the percent word? What does live logging or the Alexa App show you are saying ( or more correctly what is it hearing)

I’m actually using the Service Simulator. I basically spell out eighty there.

So I tried the same command without the “percent” at the end and that works! A very strange bug–adding percent at the end breaks it again, but only for “eighty percent” specifically.

Hmm…The ironic part is that there is no code that prevents that specific command…the percent and other ancillary words are in the sample utterances which are stripped out when Alexa processes the data. Very weird.

Figured it out–there was not an explicit utterance match with the phrase I was using. So I went and added again to the Sample Utterances and created a pull request. That solved the problem! :slight_smile:

Excellent…I got your pull request. I will add these immediately so others can take advantage of them! One note…you asked if the order makes a difference…While hypothetically is probably does, we would have to get into the tens of thousands (50k is the limit) to see it make much of a difference. That being said, I actually have them in an order that makes sense by category. I am open to ideas, however, if there is a better way. We should talk offline to ensure you don’t waste your time, however.

For those that are interested…