[RELEASE] Ask Alexa

Could he set up the two macros, with the report have a10 delay to run… Then create a group macro, run it and all it does is run the other two macros?

I think that is what he is asking…the problem is that when you issue a command to SmartThings (let’s say turn off a light), and then immediately poll that device it may show on until the light actually goes off. I know of no way to have it wait for the change without implementing something SmartThings would not like.

I have a dog door that is controlled by a zwave outlet. I have a contact sensor that’s on the dog door as well, so I was trying to create a single command that would open the dog door, then delay a couple seconds to allow the contact sensor to update status, then poll the contact sensor for status. It’s not a big deal to do them separately though. I can just issue two separate commands.

Well, if you have a connected speaker that you can use as a text to speech devices you can do this using CoRE.

You would set up a piston to do everything you want. You would not need to do a polling on the device.

In askAlexa you would set up a CoRE trigger macro to run the CoRE piston. This would make it voice activated.

In CoRE you would create the piston, that when ran, would open the door. As part of it you would have the relay being open as a condition. When that condition is met you can have text to speech, a push notification, or a text message.

I don’t have a speaker, and I’m mostly concerned about doing this when I’m not at home. The push notification is a good idea, I’ll do that instead of the voice macro. Thanks :slight_smile:

Yeah, the integration between the two apps raises things to a while new level. You can now add voice control to all of your automations, as a second layer of control.

The tts feedback via CoRE is great to.

If you have an old Android device laying around, you can set it up as a speech synthesizer with a cheap speaker plugged into the phone.

I’m having trouble finding Adrian’s original post, but given the context and what you said in your instructions (“There is a known issue where, after editing a macro, the application returns to the main SmartThings app instead of the Ask Alexa main interface. SmartThings is aware of this and is working on a resolution. This only affects Android users. This message will be removed when this issues is resolved.”), I’m pretty sure I’m having the same problem in iOS (iPhone 6 running up to date SmartThings app).

Sometimes when I try to make a macro, the parent page next to the back arrow in the top left turns from “Ask Alexa” to whatever the name of the macro is. When I hit Done, it then goes back to the main SmartApps page. If I go back to the Ask Alexa app, I’m taken directly back to the macro, the macro name is still where the parent page should be and tapping it takes me to MyApps page. I can’t do anything else in the SmartApp until I remove the macro. Sometimes after removal, it will take me back to the main Ask Alexa page and sometimes it will take me to another macro with the same issue and I wind up removing macros until I get back to the main Ask Alexa page.

I really can’t find any common link. I may do the same macro three times with the error and then it takes on the fourth attempt.

The interesting part is that when I get the error, SmartThings seems to be processing the macro as a normal routine. When I hit Done, I get the green dropdown saying that is now saved and automating, and on live logging, a new log section pops up with the macro’s name.

I don’t have an iOS device, so I can’t confirm that this affects that platform as well. Can anyone else?

I fixed this…the line now reads:

if (num>0) num = num <= tstatHighLimit && num >= tstatLowLimit ? num : num > tstatHighLimit ? tstatHighLimit : tstatLowLimit

First off Ask Alexa is pretty sweet.

Question: How can you add the ask Alexa skill to multiple profiles? Wife and I use separate profiles but would like the functionality. I could duplicate everything on her account, but that seems heavy.

1 Like

Are you talking about different ST accounts or different Amazon accounts?

I believe you would have to do separate installs on the Amazon side, but not sure how it will work in the ST side

1 Like

Amazon accounts. You should be able to use the same SmartApp for both.

Biggest concern is keeping both in sync when things change. Plan on adding a couple custom commands.

May give it a shot, if you can use the same Lambda then its not too much work.


One smart app should be fine…it’s just answering calls from anywhere. You may need two accounts for the Alexa developer, one attached to you and one for her.

I bet the one lambda account would work, but two separate handler programs one each profile for listening to alexa developer…both will end up calling the same instance of the smartapp

Thanks for the comments!

I have two accounts for two separate houses. I have one lambda account, but different sets of code for each account (for the OAuth and Token). In my case, I have two Amazon accounts as well as there are separate devices.

Not clear on your use case, but sounds like two accounts are needed. I have been tinkering for myself on seeing how I can do everything I need with one account, but that is a ways out right now.

Let me know what you mean by separate profiles (does that mean separate SmartThings accounts?)

Profiles is for Alexa. We have Spotify and other accounts tied into our profiles and switch between the two.

I stumbled on a weird workaround to my issue. I was having the problem I mentioned when I went Marketplace -> SmartApps -> My Apps -> Ask Alexa. But if instead of that, I tapped the top right menu and went Menu -> SmartApps -> Ask Alexa, it works fine and goes to the main Ask Alexa page instead of direct to a macro. I have no idea why it works one way and not the other. Regardless, this is a great app that finally makes Alexa and SmartThings do all the functions I’ve wanted it to do. Thanks for all the work and the responsiveness on the forum!

1 Like

Well, that’s because of this…

The ones listed in the marketplace are for the initial install.

Your work around is actually the way you are supposed to get to it, after, you install it.

Keep exploring! There’s lots of gems!

Got it. I just converted over to ST recently after being a Vera guy for four or five years. I’m still figuring out some things. Thanks!

1 Like

Lol… I’m contemplating jumping shop to vera plus

Profile Management sucks in Alexa. Only parent account can use Spotify, so I needed to create Ask Alexa under my wife’s profile. It is not the end of the world, just a little annoying.