[DEPRECATED] Ask Alexa 2.2.4

Announcing version 2.2.4 of Ask Alexa

I am pleased to announce the 2.2.4 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 a big update with every aspect of the code changing; however, you DO NOT need to wipe away your old installation and re-install. Here are the high-level steps for upgrading (please refer to the documentation for locations of these files: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Latest_Version)

  • Go into your IDE and make a copy of your Ask Alexa (2.2.3) code.

  • If you have your IDE linked to GitHub you should be able to just click and update the Ask Alexa code. If not, copy the code (2.2.4) from GitHub and overwrite your original code. SAVE and PUBLISH

  • Due to some variable changes in 2.2.4 you need to test the app first. Go into your SmartThings app and open Ask Alexa. If it open and there are no errors, proceed with the installation.

If you DO get an error, DO NOT proceed with the installation and roll back (use the copy of 2.2.3) to overwrite the 2.2.4 code. Contact me via PM and I will give you instructions on what I need to squash this bug. I saw it once in beta and wasn’t able to fix it before the user did a re-install and fixed it (a re-install is almost NEVER necessary–FIXED).

  • There is a new module, Ask Alexa Message Queue code. Copy this and create a new smart app. This will be a ‘child’ of the main app. You CAN SAVE and PUBLISH if you want, but SAVE only is also acceptable.

  • Go the Lambda, copy your STtoken, STappID and url to a Notepad

  • Get the new Lambda code, and overwrite your current code.

  • Re-copy the STtoken, STappID and url back to the proper location in the Lambda code

  • In the Amazon developer section, copy and paste the intent file. DO NOT SAVE YET

  • Since you are here, create a couple new slots. Call them LIST_OF_MQ and LIST_OF_MQCMD.

  • For the LIST_OF_MQ, simply put these two entries:
    primary message queue

  • For the LIST_OF_MQCMD enter these:

  • Copy the new utterance files and paste them into the section at the bottom of the page.

  • Now SAVE at the bottom of the screen

  • Begin using your app. I recommend creating some new message queues and then going to Settings>>Setup Variables to populate the developer slots you created above. Be sure to open each of the Global Message Queue Options, add an item, click done, then return to this area to clear out the back-end variables.

The next update will probably be a few 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: I will also publish a roadmap of where some of the major changes are going to be made in the future so you can prepare (i.e. moving weather to its own extension, along with voice reports after that).

PLEASE NOTE: Now that this app is rather stable (It is now 1 year + 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.
  • Virtual Presence Sensor Commands Expanded Even more ways to ‘check in’ with additions like on, off and gone.
  • Additional Utterances Thanks to many community members, new utterances that were added that allow for more question/answer type of status reports. For example “Is the front door open” will respond properly (“The front door is currently closed”) instead of saying “You attempted to take action of a device that can only give a status report”. The nice thing? No additional coding was necessary to accomplish this…I will be expanding the utterances in the future to give even more natural responses.
  • Custom Color Page - Added an icon to the custom color and setting page when this option is available.
  • 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.
  • Updated Setup Variables Page - There are new links to the Lambda, Intent, and Utterance Github sites for one-stop click when upgrading code.
  • GUI changes With the additions of new extensions within Ask Alexa (and more are coming), the GUI has been changed to reduce the number of items in the Settings area, and put more context specific items where they belong. For example, anything that is voice macro related is now in the Macro Extension area. And, anything specific to the new message queue extensions will be in that area.
  • Message Queue Extensions You can now add additional message queues to Ask Alexa. This is in preparation for the ‘push’ function from Amazon, but can function now with SmartThings connected speakers or Synth devices.
  • Flash Briefing With the additions of new Message Queues you can use any of them as the output of the flash briefing.

Let’s say you have Big Talker installed, and you want certain events to go to the kitchen speaker, and other events to go to the bedroom speaker. With the new message queues, there will be a mechanism to allow Big Talker to choose which message queue certain messages go to. By default, the primary message queue is always active and present, and it will be where legacy applications send all of their message. However, I have expanded the interface capabilities available to developers so they can specify which message queues messages go to. When Amazon releases their push notification, all of the partner apps will immediately be Alexa output compatible without any additional coding on their part. (To be clear, Big Talker 2.0 will support the message queues)

  • Expanded the primary message queue - Added additional notification options to the message queues including SMS, push and visual notifications (lights/colored lights) that can be configured to alert you when there is a message in the queue.

For those with IDE integration with GitHub, simply update the repository and you will have the latest code for the SmartApp itself. You will need to load the extension code (See here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Extensions) 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


Can’t wait. Love the app!

1 Like

As always, super clear instructions and an easy upgrade. Went really smoothly for me. Thanks, looking forward to giving the message queue stuff a go. Thanks as always - have an awesome weekend!

That was quick! Thanks for the feedback and enjoy!

1 Like

Thanks! Upgrade was very easy and went quickly. Question regarding the message queue, is it possible to verbally leave a message?

Very intuitive…not yet. I had to build the structure first to receive messages, but sending verbal messages is on the roadmap. I expect with this structure in place it will be within the next 30 to 45 days. If you are wanting to be a beta tester, let me know and I can ensure I get you on the list.

I’d gladly beta test for this awesome app :slight_smile:

1 Like

You are on the list…especially for this feature.

For those that are curious, CoRE (@ady624) and Big Talker (@rayzurbock) are both compatible with 2.2.4, however, in ‘compatibility mode’. This means they do not have knowledge of the additional message queues you have set up, in which case, all messages will go to the Primary Message queue. To help with this, there is the option of forwarding messages from the primary message queue to one that you designate.

With regard to CoRE, Adrian has reached the limit of the code side, so the old version will be ‘classic’ and will not have this function. I recommend following his thread on webCore, the ‘next generation’, of his fantastic app. Brian is in the middle of designing Big Talker 2.0, and we are working together to ensure it supports the message queue functions.

Be sure to support the partners of Ask Alexa!


Sounds like the installations are going ok, but I finally figured out where that pesky installation bug came from. I have fixed it (with a couple others) and pushed out 2.2.4a. If you are running fine you can take your time upgrading…if you run into an error certainly give this a try before PMing me.

Thanks to @rhoffer for assisting with troubleshooting!

To be clear, this is ONLY the IDE code for the main app…that is the only thing that changed.


1 Like

Can someone please explain exactly what message queues are used for? I love the app as far as inquiring about the statuses of contact sensors and arming/disarming my SHM, but I’ve been reading up on message queues and I’m not quite getting it. I’m just trying to wrap my mind around this particular feature. I’ve also researched Echosistant, but I don’t think I need such a robust app at the moment.



No problem…I would start here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Message_Queues

From a high level, it is a ‘mail box’ that can be set up for different rooms/people within the house hold. While in of itself, that isn’t too valuable; however, when connected to speakers you can get real time alerts. And, when Amazon enables their push mechanism this will allow you get realtime messages to our Alexa device. This becomes powerful for our partner apps as they won’t need to build a skill to get their output to the Alexa speaker.

I see you withdrew your question (What is the advantage of the message queue), but I think it was a valid one so I wanted to put this out here…

Thanks for the reply. I actually just read the wiki and your OP again and a light bulb went off in my head. Makes sense now.

1 Like

That’s going to be great for the users of askAlexa. If you want some help with the verbal messaging let us know… We’ve got that down over in EchoSistant. I’ll be glad to help with the beta test too. Just let me know.

No problem…it is a valid question, and as you saw above, this will soon lead to allowing you to leave a ‘voice’ mail for someone. Let’s say you leave the house and want to have everyone know where you are or when you will be back. Simple tell Ask Alexa (syntax not defined yet) “I am going to be back by 6pm” and when people see/hear a notification is available they can ask Alexa to play that notification.

1 Like

Unfortunately after upgrading Ask Alexa is no longer working. When I speak to her, the ring spins and then stops without action being taken or reply from her.

When I check LAMBA, I see the following errors showing when I “test”

START RequestId: XXXXXXXXXXXXXXX-1c56-11e7-b8d7-85bd015dc068 Version: $LATEST
2017-04-08T12:28:14.322Z XXXXXXXXXXX-1c56-11e7-b8d7-85bd015dc068 TypeError: Cannot read property ‘type’ of undefined
at IncomingMessage. (/var/task/index.js:62:30)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at IncomingMessage.Readable.read (_stream_readable.js:360:10)
at flow (stream_readable.js:743:26)
at resume
at nextTickCallbackWith2Args (node.js:437:9)
at process._tickDomainCallback (node.js:392:17)
END RequestId: XXXXXXXXXX-1c56-11e7-b8d7-85bd015dc068
REPORT RequestId: XXXXXXX-1c56-11e7-b8d7-85bd015dc068 Duration: 360.08 ms Billed Duration: 400 ms Memory Size: 128 MB Max Memory Used: 9 MB
RequestId: XXXXXXXX-1c56-11e7-b8d7-85bd015dc068 Process exited before completing request

Not sure if that’s the cause but about the only thing I can find related to an error.

Help is appreciated, I use AskAlexa as my primary means to automate my house and having it not working is a big issue for me.

Thank you!


Maybe this is a platform issue. When I do a test on the Developer site, I see:

ask smartthings for the hallway light status


“session”: {
“sessionId”: “SessionId.XXXXXXXXXXXXX-b0af00ac362a”,
“application”: {
“applicationId”: “amzn1.ask.skill.XXXXXXXXXXXXXXXXX-5fdb9b1ed194”
“attributes”: {},
“user”: {
“userId”: “amzn1.ask.account.XXXXXXXXXXXXXXXXXXxA”
“new”: true
“request”: {
“type”: “IntentRequest”,
“requestId”: “EdwRequestId.XXXXXXXXXXXXXXXX-00a5473d90ca”,
“locale”: “en-US”,
“timestamp”: “2017-04-08T13:12:53Z”,
“intent”: {
“name”: “DeviceOperation”,
“slots”: {
“Operator”: {
“name”: “Operator”
“Device”: {
“name”: “Device”,
“value”: “hallway light”
“Num”: {
“name”: “Num”
“Param”: {
“name”: “Param”
“version”: “1.0”

And the Response

“response”: {
“outputSpeech”: {
“type”: “PlainText”
“card”: {
“title”: “SmartThings Devices”,
“type”: “Simple”
“shouldEndSession”: true
“sessionAttributes”: {}

Appears to be processing OK on the LAMBA side but providing details if this is an issue just on my end to try and help

To be clear, you upgraded from a working version, or this is a new install?

Either way, nothing that comes out of the lambda site is good for troubleshooting unless you put in specific JSON input.

Let’s start with the basics…if you do “Alexa, ask Smarthings for Help”, what happens?

The best way to troubleshoot this is to watch the IDE live logging. That will give us a really quick way to get data to troubleshoot this.

PM or post here to let me know the results of the test above.

Thanks for the reply. This is an upgrade.

To answer your questions:

  1. Yes the “Alexa, ask Smarthings for Help” works just fine.

Logs in IDE state:

XXXXXXXXXXXXXXXXXXXXX7f34f 11:59:15 AM: debug --Begin commands received–

  1. When I ask for the garage door status, I get the following in IDE logging:

XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:27 AM: error groovy.lang.MissingMethodException: No signature of method: java.lang.Boolean.contains() is applicable for argument types: (java.lang.String) values: [Primary Message Queue]
Possible solutions: toString(), toString(), toString(), notify(), toString(boolean) @ line 3450
XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:27 AM: debug Param: undefined
XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:27 AM: debug Num: undefined
XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:27 AM: debug Op: status
XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:27 AM: debug Dev: garage door
XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:27 AM: debug -Device command received-
XXXXXXXXXXXXXXXXXXXXX7f34f 11:58:25 AM: debug --Begin commands received–

When I ask for a report, I get a similar error:

XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: error groovy.lang.MissingMethodException: No signature of method: java.lang.Boolean.contains() is applicable for argument types: (java.lang.String) values: [Primary Message Queue]
Possible solutions: toString(), toString(), toString(), notify(), toString(boolean) @ line 3450
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug mPW: undefined
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug Param: undefined
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug Cmd: undefined
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug mNum: undefined
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug Macro Name: energy report
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug -Macro command received-
XXXXXXXXXXXXXXXXXXXXX7f34f 12:03:39 PM: debug --Begin commands received–

Hope this helps and thank you

This does help…this looks suspiciously like the error I thought I fixed yesterday. Do you have 2.2.4 or 2.2.4a?

Yes, I have 2.2.4a. Something weird in IDE though. I see there is an update for your code (integrated with GIT) but when I click on the “magnify glass” I get a page error stating “Not Found. We’re sorry, but that page doesn’t exist.”? Happens with all DTH/SmartApps but I can edit them just fine (even hoving over titles in ID the tip dialogue says “vcs.source.null”). So I manually pasted the 2.2.4a code direct from your GIT into IDE and published… When I “Alexa, ask Smartthings for Help”, she says the code Smart App code version is 2.2.4 and 1.2.4 for the LAMBA code