[NO LONGER SUPPORTED] Ask Alexa

Thanks MichaelS, very much appreciated!

1 Like

Hi Michael I’m running version 2.2.3a this weekend everything was working great. Except last night I started getting a message from my Amazon Echo stating “There was an error in the execution of the Ask Alex smart app. If this continue contact the author of the smart app” Any ideas?

I have no ability on my end to change anything once you install the code.

One thing I would check it to go through Setting>>Setup Variables again and look at the 3 lines you copy to Lambda. If the Oauth changed on SmartThings that COULD affect it.

Next step would be to revoke your Oauth, then take the new code and paste that to Lambda…

Could anyone else have been in your accounts? Might not be a bad idea to recopy the Lambda code and the IDE code just in case.

Let me know if any of this stuff works.

I’m the only one with access to my account but the codes did changed. I pasted the new code to Lambda and had to reconfigure the devices in Ask Alexa since it lost its configuration as well.

Its working again not sure why the codes changed.

Thanks for your help

It may have been on SmartThings side with some sort of expiration…I know they have been toying with that idea. In addition, it may have been a rouge finger press on the app.

Either way, I am glad you got it working again!

I wanted to give you a Friday update on the next version of Ask Alexa (designated 2.2.4). I have completed the code (I am actually working now on 2 versions ahead, making framework changes back to 2.2.4) and I am currently testing this with a number of beta testers. I am VERY happy with this is going and thought I would share some of the high level items:

Alexa Alexa Extensions: As mentioned last time, I have changed the framework of Ask Alexa to allow for other apps (from me and others) to ‘plug in’ to the main app, giving you added capabilities without bloating the main code. As was discovered by the developer of CoRE, there is a hard limit to how large a SmartApp can be. I have been programming for quite a while, and started when computers had very little memory, so I am used to writing efficient code. Ask Alexa has only grown slightly over the year it has been out, and I am constantly finding ways to accomplish more with less code; however that is not sustainable so the extension model will allow me to grow the capabilities of the app and not re-write it every few months, forcing you all to redo all of the hard work you already put into configuring the application for your needs. There WILL be one exception in a revision or two…I am splitting out the weather reporting function into its own extension in one or two versions from now. The functionality will stay the same (thanks @storageanarchy again for the code), but with it being an extension you will be able to do some rather fun stuff with this and all extensions after version 2.2.6+. And as always, you won’t have to reload your app from scratch to just get these new features. You will just add to what you already have and keep all of you settings.

Message Queues: Another big enhancement for Ask Alexa as we get ready for Amazon push notifications. Now external apps won’t need to write a skill themselves to go from SmartThings to Alexa output….Ask Alexa will be the ‘hub’ of the communications. While we wait for this, if you have connected speakers (or synth devices) in every room you can get a similar experience with 2.2.4. While this is a new structure, I have put pieces into place to allow for legacy operation (via the primary message queue) so you don’t lose functionality of what you might already be running with partners like Big Talker, Nest, Lock or Device Manager. All partners have been given the specs to work with the new structure, and some of them will already work when the next version of Ask Alexa is released.

Outside of the small bug fixes and optimizations that were done, this may SEEM like a small update, but it will require you to update your Lambda, intents, slots, utterances and your IDE code (basically everything). As such, while the code is done, I am going to wait another week while I really document the new additions. However, for anyone that is interested in beta testing the new version and the documentation for me (and you have external speakers/synth devices), I would greatly appreciate it. I have room for maybe a couple more people in the beta pool. If you are a developer of an app that does notification and want to be able to send messages to the Alexa device, I recommend you reach out to me.

Enjoy the weekend!

4 Likes

Hey Michael,
Great job adopting the extension plug ins. We’ve been doing that for a while in ES and it really gives the user flexibility. They can choose what features they want and not be bogged down by those they don’t. And, it gives the ability to expand almost no limit!

Keep up the great work!

Hi there! Ask Alexa is a great app, but I’m having some trouble setting it up and I have a couple questions.

I have a Generation 2 Multipurpose sensor I’m using a garage door sensor. This shows up on the SmartThings app and is working correctly. Should this show up as an Alexa smart home device? Its not and I’m not sure if its normal or part of the issue.

When I try to test the the app I get the following response:

Alexa ask SmartThings for help

The remote endpoint could not be called, or the response it returned was invalid.

and

Alexa ask SmartThings about garage sensor

{
  "response": {
"outputSpeech": {
  "type": "PlainText",
  "text": "There was an error with the Ask Alexa SmartApp execution. If this continues, please contact the author of the SmartApp. "
},
"card": {
  "content": "There was an error with the Ask Alexa SmartApp execution. If this continues, please contact the author of the SmartApp. ",
  "title": "Lambda Error",
  "type": "Simple"
},
"shouldEndSession": true
  },
  "sessionAttributes": {}
}

If it was just a a problem with the sensor setup I’d expect the first command to work? I’ve done some research and re-copied and compared the source code 3 times to make sure it was correct. I’m researching further but I’m not sure how to troubleshoot the second issue further.

Any guidance would be greatly appreciated, thanks much!

First, thanks for the compliments!

Second, is this a new installation, or was it working and then stopped? It SOUNDS like it is a new installation and I will speak from there; however, if it stopped working. It sounds like your Oauth is not working properly. First, I would ensure you have authorized your OAuth by following these steps:

http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#OAuth_Setup

Then, I would go into the app and ensure you see an Access Token/Application ID in the About Ask Alexa (main page of the app).

Finally, I would go to Setting>>Setup Variables to copy the required code lines into your Lambda code: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Finalizing_The_Function_Code

This probably has nothing to do with your sensor as the main app isn’t working/configured properly. I have heard reports of this being ‘wonky’ and sometimes you have to go in and reset your OAuth (under Settings in the main app) to resolve this.

Let me know if you get this working or need clarification on any of the items above. You are actually rather close to getting this working.

It is a new installation. I think the issue was due the shard I was using. I read that publish ‘for me’ is local to a shard, and it seems like I was connected to a number of different shards when I was trying to set up the app. I’m guessing the ‘correct’ shard is the one my hub is connected to, which https://graph-na02-useast1.api.smartthings.com, at least at this time.

I’m currently figuring out how I can get temperature, accelerometer, and open state from the same sensor without having to register it multiple times, which doesn’t work. :slight_smile:

Got the aliases straightened out and everything works. Only wrinkle is I need to update the Alexa device list after the aliases are set up but this works great, very impressed!

I wish there was an automated way to update items back and Amazon; alas there isn’t. Fortunately, the app spits out this information instead of you having to figure out what needs to go in there.

Thanks for the kind words and keep an eye out Friday for the next version.

Was wondering if I could do this for the wife since she hates alexa, jarvis, failed HA.

could I set up another lambda skill with a different invocation word like “channing tatum” or “Ryan gosling”

if I did this would I still be able to use all of my macros I use with my invocation word jarvis? Same arn#

I try and do little things that make her giggle to keep my waf up.

Yes and no…

it is a little advanced, but it CAN be done. This is the same concept as a multi-room setup that I outlined here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Multi-Room_Controls_.28Advanced.29

Please note that you have to create a second app, which creates a second Oauth token, which would require a second Lambda, which would necessitate a second ARN. All of this aside, following the directions should work.

However, when doing this you will have a complicated time with Message queues and such.

From a personal standpoint, would you really want your wife screaming out another guy’s name? Kinda the same as you screaming Alexa (or Jarvis) all of the time :slight_smile:

Maybe you could compromise and use the Amazon setting to change it to Echo or computer and then change the invocation name to something gender neutral like “home”.

For some reason I am unable to run Routines. Is anyone having this problem. I keep getting “To run SmartThings routines, ask me to run the routine by its full name. For a list of available routines, simply say, ‘ask Home to list routines’.”

And I even tried testing it through the console, and same result.

Any thoughts?

Thought I would throw in my 2 cents… I understand what you are wanting to do…

You only need one install of askAlexa, or another app. Keep the lambda that you currently have.

Create another aws skill. Give that skill the sexy stud invocation name, also, use the same ARN as your other skill, from the same and only lambda.

Now, you have one app install, one lambda, and multiple skills. Both skills will talk to the one lambda and it will talk to the one askAlexa install. They can both run all of your macros, the only difference is the invocation name.

This is exactly how I do it with my app… Which I won’t say the name of here because that’s not right… But I’m willing to help out everyone.

@MichaelS, that is the earth way to set up room control for your users. No multi installs of the app. Your users can create macros based off of room names… At least I think that will work with your macros. I haven’t used the app in a very long time, so it might have changed. But the lambda and skill set up works.

:grin:

Edit, I just read your link above… I see why you’re saying multi installs of the app… Control of only one room… We built that into our app to prevent the multi installs. Sorry.

1 Like

With respect to both the apps we shall not speak of. I was able to do this with said unspoken app and I kinda thought it was the same thing. Thank you I think you got my use case perfect. She can ask Leonardo Dicaprio anything she wants if she’ll just use it,lol. Thank you that answered my question I’ll just do the same thing as I did with unsaid, which I really like and am impressed as well, also @bamarayne could you help me with doggy door in core. I have questions and I really like the set up

4 Likes

Do you have routines selected in your app…Instead of it being universal you have to select which routines you want to be able to control (some people use this as a mechanism to prevent kids from running certain routines). From there you must populate the developer slots from the Settings>>Setup Variables. It sounds like you may have done one of these but not the other.

Let me know if that helps.

1 Like

I may have misunderstood what @Cody_Farmer was looking for. If he wants to get rid of “Alexa”, that isn’t quite possibles as a name (or to be more correct, you can’t select your own but must use Amazon, Computer, Echo, etc). However, you are correct that another skill (with a different name) can still use the same Lamba which means the same ARN number can be used. For whatever reason I thought she also wanted to control her own devices and the two shall never meet…While Ask Alexa can do multi room (think isolated guest room) with multiple apps, I was making this more difficult than it needed to be. Thank you for the suggestion. I am going to add it to my wiki documentation as another use case as it doesn’t require additional coding!

As for the structure of the apps, yeah…design philosophy differences.

1 Like

I’ve bee trying to run a routine for hours and I finally changed all the names so they are all spelled out and with not added characters. for example, I had a “I’m back” routine and not I had to change it to “I am back”.

I find that I had the same issue with macro names…I had a macro called “I’m going to bed”, which worked for months, then one day it stopped working and I had to change it to “I am going to bed” for it to work again.

I guess no shortcuts for me.

I love this app BTW, and thank you for making Alexa useful again.

1 Like