[DEPRECATED] Ask Alexa 2.2.2

Ok.,
let’s take one macro first
what it’s primary name, and what are its aliases?

Actually, if you are savvy with the code, modify line 1288 to this:

if (it."macAlias${i}" && it."macAlias${i}".toLowerCase().replaceAll("[^a-zA-Z0-9 ]", "")==mac) {

I should have checked for a name present before checking its value
silly Groovy Code :slight_smile:

I think that did it. Thanks for all your hard work!

Which one
the code? I will push out 2.2.2b if that is the case! Thanks for bringing this to my attention.

Yea. Switching out that one line of code seemed to do it.

Cool
pushing the fix
Also tagging @kinserc as he originally called out the original issue.

Code is here: https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/ask-alexa.groovy

Well, I’ve got another one that looks similar:
groovy.lang.MissingMethodException: No signature of method: script14890271186312086074392.toLowerCase() is applicable for argument types: () values: [] @ line 1297

The last fix got my “macro of macros” error free, but now this one pops up when I try to fire the underlying macros individually. They also don’t seem to fire when I do my “macro of macros”.

So, looking at my code that would only come up if you have no primary name for your macro and ONLY an alias name
can you confirm? I probably need to put in a check that you CAN’T add aliases without a primary name already entered.

I haven’t used this app before, so I can’t be sure I’m doing it right but:
I have a name under the “Voice Macro Name”. I assume that’s the primary macro name.
I’ve tried them with both no aliases listed, and duplicating the Voice Macro name. I’m not sure if aliases are required or not.

Can you send a screen shot of your main screen where you are configuring the macros
I can’t really reproduce what you are seeing. I can’t control your house with that information, so no worries there :slight_smile:

Ok
I was able to reproduce this
you aren’t doing anything wrong
I created myself a little logic loop here
stand by.

Ok
ironically, I put TOO much logic in this
simply delete 1297
it is not needed

Nice work! It’s all working as expected now. Thank you so much.

Would you like me to delete all my comments to clean up your thread a bit?

Nah
quite honestly this is good for others to view and learn from
I will be closing this thread when the next version is released (it will have these fixes in them).

Pubished 2.2.2.c https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/ask-alexa.groovy

@MichaelS (Feature Request)

Could you make it possible to do the following in a future release (idea from the current message queue function):
“Alexa, tell SmartThings to leave a note for Anna, Brian will be at a meeting until 3pm”
“Alexa, ask SmartThings Are there messages for Anna?” 
 “There are 3 messages for Anna, 1. Brian will be at a meeting until 3pm. 2
”

“Alexa, tell SmartThings to remind me to do taxes”
“Alexa, ask SmartThings for my reminders” 
 “You have 3 reminders. 1. Do taxes 2. 
”

Ironically, I am expanding the message queue in the next release which will build the framework for things like this
next release on Friday won’t have this but will give an indication of where I am going with this.

1 Like

I’m totally comfortable with the copy/paste of the slots. Given you were asking me to go to the app to execute the “setup variables” link, I was wondering if that link actually performed any function beyond providing the variables. Clear that there is not.

Thanks for your hard work on this.

1 Like

I wish
I am speaking to some folks about some ‘automation’ to perform the slot population, but nothing from Amazon, unfortunately.

This version is gone. long live version 2.2.3 :slight_smile: