[NO LONGER SUPPORTED] Ask Alexa

I’ve never heard of Yonomi, but I just Googled it and now I’ve got something else to play with, thanks!

1 Like

Is there a way to insert a time delay when executing a macro group? For example, I have a control macro called “activate dog door solenoid” that triggers an outlet to open a dog door. I also have a voice report macro that asks for the status of the dog door contact sensor. I’d like to create a macro group called “Let the dogs out” that fires the “activate dog door” macro, then waits 2-3 seconds, then asks for the status of the dog door. Right now, it executes them both at the same time and even though the dog door is opened, the status reports back as closed.

I can see what I can do, but I guess I don’t understand the whole need…you should always run the latest version…

Yes. Control macros can be delayed either in the setup or through a voice command.

Edit: actually rereading your post what you are asking for is not possible. First, SmartThings requests that programmers don’t put delays into their code as it causes problems on the backend. Second, Alexa has a finite time that it will wait for a response. You can delay this but the first rule kills the whole concept. You basically will have to run the open door command then run a report…unless I a missing what you are asking…

Makes sense. I’ll just have to do the 2 step process. Thanks.

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
2 Likes

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.

2 Likes

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.