I sense a great opportunity for Super programmer Gus Gorman…


Just learned of this today so I did the install. Dude - you rock! This is really great stuff. The install was tedious but easy. It helped that I already had an Amazon Dev account. The lambda account was easy to add. Now I just need to start the tweaking and macro writing process which should be fun. As a programmer I really appreciate have this a a sophisticated sample code for writing my own stuff too.

1 Like


Excellent! Good to hear from a fellow programmer! I have some new additions to the app coming soon so be sure to sync your GitHub with your IDE and watch this space! And thanks for the little ‘incentive’ I received today as well…Really appreciate it!

Sorry to bother you , however I keep getting and error when using Ask Alexa, Alexa keeps telling me that the Version of LAmbda Code is out of date , I have updated IDE from GitHub to ver 2.23a. I cant seem to figure out.
W\at am I missing here

Besides not being able to type today

Hehe…no worries…What you will want to do is ensure you get the latest code for the Lambda portion. That is here: https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/Node.js

Here are the steps you need to take to ensure a clean upgrade.

  • Go to your current code in Lambda (AWS).
  • Find the lines around 39-41 (the STAppID, STToken and URL. Copy those to a notepad or something
  • Copy the code from the GitHub site above and OVERWRITE the current AWS code
  • Copy the items from the second step back into lines 30-41 in the Lamdba code
  • Save…

That should do it…let me know if that works for you and if you get this operational.

I replaced the Code you specified and pasted in my origional STappID and STtoken now when I say “Alexa ask the Hub” , she responds there was an error with the Alexa Smart App execution , if this continues please contsact the Author of the Smart App


Sounds like the OAuth may have changed…If you went through the whole install again you may have inadvertently changed your authentication…no big deal. I recommend going to Settings and running the Setup Variables and recopying the 3 lines from the generated web page to Lambda.

Let me know if that works…

OK Tried That too no luck , Copied OAuth ID and Secret to Lambda Code , NG Tried Refreshing Client Secret in Smart App Settings and tHe executed a save/test here is the log output maybe that will help, sorry to be such a pain.
START RequestId: 260f004c-0cc4-11e7-9851-61ae9256fb76 Version: $LATEST
2017-03-19T16:50:25.768Z 260f004c-0cc4-11e7-9851-61ae9256fb76 TypeError: Cannot read property ‘type’ of undefined
at IncomingMessage. (/var/task/index.js:61: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: 260f004c-0cc4-11e7-9851-61ae9256fb76
REPORT RequestId: 260f004c-0cc4-11e7-9851-61ae9256fb76 Duration: 888.71 ms Billed Duration: 900 ms Memory Size: 128 MB Max Memory Used: 8 MB
RequestId: 260f004c-0cc4-11e7-9851-61ae9256fb76 Process exited before completing request

That looks like the output of Lambda…You don’t need that and that is not a good way to test as it will always show an error without proper input.

The best way to test is via either the developer site or actually speaking to Alexa. If you say “Alexa, Ask {invocaton name] help.” Any output besides the instructions speech is incorrect. Let’s start from there.

I assume you had this working previously, correct? If so, do the test above and let me know the output. If it appears not to be working, I would re-generate your Oauth key (via Settings). I would then copy/paste from the link I sent earlier to Lambda, then do the Setup Variables piece again. I know you already did this, but I have seem TOO many times the copy/paste process miss one character and it shows this symptom.

Please report back on your progress and what you are seeing (hearing).

yes I did have this working , so to update on last reply , I said "Alexa ask {invocation name} Help,
Alexa response " there was an error with the Requested Skill Response.

In the mean time I will re generate and paste to Lambda Code again. If this Fails is it advisable to delete SMart App and Lambda code and start from Scratch ?

Thanks Again for the help .


There is never a need to delete the whole thing and start over…you are really close. If you updated via GitHub integration with SmartThings it should have been a simple couple clicks. If you copy/pasted the code, I recommend doing that again (from this link); https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/ask-alexa.groovy

Tried again and Alexa still posting Error “There was an Error with the Smart App Execution, if this continues please contact the author of the SmartApp”

OAuth was gone in my IDE Settings for Ask Alexa App , I re-enabled and pasted lines being very careful with spaces etc…

?? stumped!

Ok…let’s go step by step…

Open live logging…when you initiate a command, do you see anything relating to Ask Alexa? If the answer is no, then it is an OAuth, Token ID, or code pasting issue.

I will stop there as that is what it sounds like. Are you on a Mac or PC? I recommend not using your mouse to copy/paste the Lambda code, but instead hit CTL+A, CTL+C then go to a text editor, paste the text in there, then copy/paste it again from the text editor to the AWS site. This will get rid of any encoded characters that sometimes creep into the copy/paste process. I would then follow these steps exactly:

  • Go to Settings on the Smartapp and revoke your token again
  • Go to the About page (main menu, bottom) and click there. Expand the Access Token/ Application ID area…Make sure there are numbers in there
  • Go back to Settings and copy/page the first three lines from Setup Variables to the Lambda code in the proper locations.

You are probably saying, “I have done this…why does he keep saying this”…Unfortunately, the copy/paste process is not as clean as one would expect, so please trust that this will probably get you to the finish line.

If you continue to have issues PM me and we can work real time on this.

I am totally with you on Copy Paste Issues , I think I have that under Control
I did notice that in the updated Lambda Code Line 41 the var url is different that what was in my original Lambda code.
I am assuming that ( and you know what happens when we Assume LOL) that i need to only update the STappID and STtoken is that correct ? or should I have left the old URL ?

sorry my bad , i see you said replace url and I did and Verified still not functioning

You should always use the output of the Setup Variables as that polls you account specifically on the location to go to for the REST API.

I assume while watching Live Logging you see nothing there? Just curious…are you using voice or the developer simulator? Did you happen to create a new Lambda session or reuse the old one? It SOUNDS like you are ok with your ARN number, but we should verify that as well.

Let’s take this to PM to see if we can solve this in case I need to log into your account (only with your permission, of course).

It was my pleasure. I worked on setting up my Git properly today. I never did that previously for whatever reason. Anyway I made a pull request of my repository so my stuff should show up soon.

1 Like

Here is your Friday update! I have finished the coding for the next revision of Ask Alexa. It will be a big one, but the upgrade will not require you to set up everything again. Ask Alexa is all about compatibility, which leads off the new features that will be included in this version.

In this version I have changed the internal model of Ask Alexa to allow for extensions…Think of the macros as an extension, along with the newest extension in this release, message queues. While the original version had a single message queue, you now have the ability to set up multiple message queues within your environment. Each person in the house can have a message queue, or as most people will set this up, the queue will represent either an Alexa or ST connected speaker/synth device. With the partner apps Ask Alexa can work with, you can now have directed messages going to specific speakers/rooms. For example, let’s say you want the Nest Manager (@tonesto7) to alert you in the living room, but you want Big Talker (@rayzurbock) to alert you to a door opening when you are in the bedroom, but you want the windows opening to alert you on every speaker in the house. Just set up these message queues and you will be able do just that. I have been working behind the scenes with all of the Ask Alexa partners to ensure not only backward compatibility with their apps, but to support these new features. Please note the Alexa’s can NOT wake up on their own to talk to you; however, you can use the push feature for speakers like Sonos while we all wait for Amazon to release this feature for their speakers.

With these new features I had an opportunity to re-engineer some of the GUI to allow for more logical flow of some of the Settings (that page was getting a bit to big).

Anyway, I will spend the next week beta testing, working on documentation, and working with the partners to have some of them support the new message queues on the release date, which is looking like next week sometime. I will keep you informed!


This sounds like a wonderful “extension” of Ask Alexa!

Your ability to collaborate with other developers and bring in the use of other apps is ingenious!

End users are grateful that you have limited the work required to update as well. While we understand this is not always avoidable, but at least limiting the work / effort to update is an added value.

Very much looking forward to this new release.
Thank you for your dedicated support to make our homes yet smarter again.

1 Like