[DEPRECATED] Ask Alexa 2.2.9

Version 2.2.9 of Ask Alexa

I am pleased to announce the 2.2.9 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.

PLEASE NOTE: Now that this app is rather stable (It is now over 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.

This is a big upgrade with changes in EVERY area (intents, utterances, Lambda code, and IDE code for the main app and extensions). Ensure you update ALL of them…some strange things happen when you do only a portion of the updates. In addition, you MUST update your slots, including the creation of a new slot (LIST_OF_WCP). For most of you, this will be a single entry with ‘none’…this is for the WebCore enhancements listed below.

Other additions to this new version include:

  • Bug Fixes - The normal things…silly misspellings, logic errors, bug reports. If you had an issues with inconsistent results when using the simulator and your voice, I have found Amazon changed some outputs. The app now convers that
  • Code Optimization - Always finding better ways to do things in a shorter about of code.
  • WebCoRE enhancements - working with the uber-skilled @dham, I have added some advanced features to the WebCoRE interface. You can add a custom skill slot and allow a single macro to activate multiple functions within a WebCoRE. Just look what @dham did here: http://thingsthataresmart.wiki/index.php?title=Using_Parameters_with_Ask_Alexa_and_webCoRE
    This isn’t for the faint of heart, but opens up whole new functionality for voice operations of WebCoRE. Only Ask Alexa has this functionality.
  • Device Group Enhancements For those users of device groups, until now you could only control these groups, not query them….now you can! Just ask about the group and it will either summarize the status or give you a readout of what the states of the devices is. This is great for room setups and could eliminate some voice reports from you setup.
  • External sources send messages to message queues Another Advanced feature: I added the ability for the message queues to receive message (not delete yet) from external sources that can send a REST API. So, in theory, ANY programming interface can now send messages to the message queue directly instead of having to be a SmartApp. This is HUGE as this opens up to things like IFTTT or other apps (or even other smart home applications…even Google Home with a bit of programming) to send messages to your Ask Alexa message queue. Right now I have locked it down so none of the advanced options are available (notify only, suppress time/date, etc). For those that have this necessity, let me know and we can work together to get this operational (will literally be 3 lines of code).
  • On demand whisper and emphasis A few revisions ago I introduced the whisper, speed and pitch adjustments. While some of you thought these were rather cool, they were ALL global. This means ALL output of Ask Alexa inherited these settings. Thanks to a suggestion from @Matthew_Freestone I added variable switches to all text fields so you can use HTML like encapsulation to tag speech to be whispered (<w>< /w >), highly emphasized (<eH></e>) or low emphasis <eL></e>. The ONLY work with the Global Whisper mode off, but the other speed or pitch adjustments can be used with these tags to create some VERY interesting results. Also, thanks to @jls for pointing out that the random 2 and random 3 text field variables were not operational…I have fixed these as well….
  • Brief Reply Enhancement Based on a suggestion from @Tvot84 I enhanced the device brief reply…You can now create your own response instead of using the standard ones. I also changed the logic to have this override the continuation commands prompt. You can STILL continue to give commands in the context of the skill (not having to say “Alexa, Ask SmartThings)…you will just no longer be prompted for this when you have brief replies turned on. In addition, I have updated the macro/extension continuation message by adding the ability to mute the prompt, but still allow you to give continued commands to the device after the execution of a macro/extension.

Partner Announcements
While I don’t have any new partners to announce, I will in the coming weeks as there is a new integration in the works.

Installation
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

Support
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
Enjoy.

7 Likes

Great work Mike!

Just noticed the link to the node.js code still links to ver 1.2.8

Cheers

Yep…did things out of order and was uploading the files…everything should be updated…make sure you have the latest intent and utterance as well, and be sure to add the new slot whether you need it or not (LIST_OF_WCP)

Will I need to update all my devices and everything also? Or just the new intent and utterances supplied by you?
Also, thanks for the shout out in the update! :slight_smile:

I always recommend you review your slots after a new version. In this case, you have to create the new slot LIST_OF_WCP, so it would be a good idea to see if there other slots need updating.

1 Like

In the Lambda function, do I use a blank function again or overwrite the “alexa-skill-kit-sdk-factskill”?

Just overwrite what you have…be sure to keep the lines you entered before (AppID, etc) or you will need to get those again from the setup variables.

the name and description are different. (Well, the name is gone) should I worry about that? Or change them to match what’s in the wiki?

I think you are confusing yourself. If you had this running before you only need to overwrite the code that was in your Lambda area. No reason to start from scratch unless you never had it working…in which case you should follow the wiki closely…but with regard to your question the text field can be different.

I was in the US East Ohio instead of N.Virginia. That’s where I was getting messed up. It makes sense now. lol

Ok. Virginia is the only valid US site. Wish Amazon would allow more, but either way let me know how it goes since you facilitated some of the changes.:wink:

Sorry, Hopefully I won’t be such a pain next update. lol
Not sure what’s going on with this…

You line 44 has // in front of it. That remarks it out keeping it from being recognized.

Also FYI…the shot includes you token and app I’d…this is enough now fir someone to control the items you have in Ask Alexa…I recommend when you get this running to reset your token and repaste the info.

1 Like

still getting the same thing.
and thanks. already done. this is a screen shot from before I updated the token.

I am not sure what would cause that…I would recommend copying your three lines from 44,45 and 46, putting them into a notepad, then copying this code again from here (CTL+A, CTL+C). This appears the copy/paste process missed something in your code.

https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/Node.js

If this doesn’t work, PM me…

I just updated and it went great, no issues! Already implemented some emphasis and whisper mode inline on text responses and it’s exactly what I wanted! Freaking awesome dude, well done! Now I can make her sound pissed and creepy! :slight_smile:

1 Like

Glad it is working…this suggestion was ALL YOU! Glad you can use it :slight_smile:

I’m totally setting this up to have Alexa change channels on my TV. My quest for absolute laziness is getting stronger!

2 Likes

For those early adopters today that went to 2.2.9, I found a stray character in the code and have removed it. This is NOT a full install with the Amazon stuff…if you have the IDE to GitHub integration simply update to 2.2.9a. For manual users, just update your IDE code to this: https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/ask-alexa.groovy

Unless you are running into an issue when you have embedded weather report in your custom acknowledgements, it isn’t as important to upgrade.

Thanks!

2 Likes

Thanks for the heads up, updated!

1 Like