SmartThings and Amazon Echo (Using ASK)

So I got everything to load up but am having trouble with the HH phrases.
I can say “Alexa, tell smart things to set mode to home day”, “Alexa, tell smart things to switch hallway lights off” but if I say “Alexa, tell smart things to say home day” I get “The smart things app did not understand the request…”.
I have the latest SmartApp loaded. I updated the Intent Scheme and ran the Get new Samples and loaded them into the Sample Utterances and saved and I do have a HH phrase called Home Day. I also verified in the echo app that it is receiving the correct wording.
I feel like I am missing something stupid.

Phrases that start with H seem to be trouble. Try changing it. Just a hunch.

1 Like

Did you see those phrases in the sample utterances? I just want to make sure that it is seeing them.

So I think I figured it out… I tried loading the same sample utterances tonight and here’s what I got:

Error: There was a problem with your request: Invalid token {first floor 30%|phrase} in sample, “STPhrase to say {first floor 30%|phrase}”. Each sample must consist only of alphabets, white-spaces and valid punctuation marks. Valid punctuation marks are periods for abbreviations, possesive apostrophes and hyphens.

So using “%” in a HH phrase is no bueno. I also have another HH phrase that is “Andy & Kathryn Away.” ASK did not like the “&.” I edited the utterances to replace the non alpha characters with text (i.e. " thirty percent"), and I was able to successfully save the new utterances. Unfortunately, “tell the house to say ‘First Floor Thirty Percent’” is not triggering the HH phrase “First Floor 30%.”

So change the HH phrase name to match?

You will have to change the HH phrase in smart things too… Its a limitation of Alexa and also my code…

I am comparing what amazon give me to what I read from smart things… so I see u'First Floor 30%', u'Vacation', u'Andy & Kathryn Away' from smart things and 'Andy and Kathryn Away' from Smartthings. Also you can see the logs below… Alexa is having a hard time understanding the phrases too.

I hope the output blow helps a little. I made sure to cut out any information besides what you already posted above. :slight_smile:

2015-08-01T01:06:33.238400 :{
    "request": {
        "intent": {
            "name": "STPhrase", 
            "slots": {
                "phrase": {
                    "name": "phrase", 
                    "value": "first floor three percent"
                }
            }
        }, 
    }, 
    2015-08-01T01:06:33.240487 :{
    "intent": {
        "name": "STPhrase", 
        "slots": {
            "phrase": {
                "name": "phrase", 
                "value": "first floor three percent"
            }
        }
    }, 
    2015-08-01T01:06:47.455714 :{
    "request": {
        "intent": {
            "name": "STPhrase", 
            "slots": {
                "phrase": {
                    "name": "phrase", 
                    "value": "house a slower three percent"
                }
            }
        }, 
       2015-08-01T01:06:47.458438 :{
    "intent": {
        "name": "STPhrase", 
        "slots": {
            "phrase": {
                "name": "phrase", 
                "value": "house a slower three percent"
            }
        }
    }, 
    2015-08-01T01:06:58.230735 :{
    "request": {
        "intent": {
            "name": "STPhrase", 
            "slots": {
                "phrase": {
                    "name": "phrase", 
                    "value": "movie time"
                }
            }
        }, 
        2015-08-01T01:06:58.232523 :{
    "intent": {
        "name": "STPhrase", 
        "slots": {
            "phrase": {
                "name": "phrase", 
                "value": "movie time"
            }
        }
    }, 
    2015-08-01T01:06:59.121246 :Phrase Response: {u'error': 0}2015-08-01T01:06:59.123547 :{
    "response": {
        "card": {
            "content": "Telling Smart Things to say movie time", 
            "title": "SmartThings Control - HelloHome", 
            "type": "Simple"
        }, 
        "outputSpeech": {
            "text": "Telling Smart Things to say movie time", 
            "type": "PlainText"
        }, 
        "shouldEndSession": true
    }, 
    "version": 1.0
}2015-08-01T01:08:26.145514 :{
    "request": {
        "intent": {
            "name": "STPhrase", 
            "slots": {
                "phrase": {
                    "name": "phrase"
                }
            }
        },
1 Like

@zpriddy
Thanks for the reply. It is seeing those phrases in the samples which is why I could not understand what I was doing wrong.
The phrase shows in the samples.
The exho app shows I am saying it right.
The HH does exist in ST.
And as a test I tried a HH phrase that does not start with H.
Everything else seems to work fine except HH phrases which is why I think I just missed something stupid :smile:
Would it help if I PMed you everything I have set?
Thanks,
Scott

Thanks for the insight here, @zpriddy! And yes, I agree with you @JDRoberts, the solution does seem obvious: Change the HH phrase to a more Alexa-friendly value. The problem is that most of my HH phrases are named to be economically displayed in the iPhone notification screen widget (which is actually a great way to access HH actions). The main reason I edited the sample utterances from “30%” to “Thirty Percent” was so that I could actually save the utterances in ASK (it would let me save non-alpha characters). Since @zpriddy’s solution/app seems to still be evolving, I’ll probably hold off on renaming HH phrases for now.

Either way, Echo is an incredibly fun and increasingly useful point of entry for SmartThings.

2 Likes

Since you want the names with symbols for the watch widgets can you create a second set of hello home phrases that have the echo-friendly name?

so you would have two hello home phrases that do the same thing: one with your current name, and one with the echo-friendly name.

That’s not that much different than having multiple group names for a voice control system. For example we have a group of lights which is called “the study” and another group name for the exact same lights called “the office” because some people in the household call it one name and some call it the other.

Anyway, if there’s a way to not set up an echo utterance for the name that confuses it, you should be OK. Even if the two names sound exactly the same when you say them out loud.

So the Echo utterance is “first floor thirty percent” and the watch widget shows “1st floor 30%” and those are two different hello home actions that do exactly the same thing.

It does mean you have to make the same changes to both hello home actions going forward, which means more maintenance work, but if it’s doable it should solve your problem.

@zpriddy, I think I screwed something up. I decided to try to start completely over by deleting everything and re-setting it back up. First thing I tried to do was to deleted my Skill, which apparently Amazon has not allowed yet, So I disabled it and created a new one. I also deleted the smartapp and re-created a new one. My problem now is my echo does not want to setup the skill as “New”. When I do the initial “Talk to SmartThings” it responds as if its already setup and wants a command instead of giving me the Alexa ID.
I think the link between my Skill and the smartapp is broken, possibly because I deleted my Smartapp and the OAuth Client ID and Secret are different now.
Is there something on your end that you need to clear out to I can -re-setup my Echo?

Thanks,
Scott

So at this point just say ‘Alexa, tell smart things to give me a new alexa ID’ -> from there just use that alexa ID to redo the linking process as if it was new. It will overwrite the old setup. :slight_smile:

1 Like

@zpriddy I have been following this thread closely. I am currently using the Hue Bridge Emulator but would like to switch over to your app. How do I do this? Is it still in Beta? How far till General Release?

Thanks @zpriddy, I had tried the “Give me new samples” which seems to do that same thing, right? When I get the new ID and input that with my OAuth info, I authorize my devices and get this when I submit it:

Internal Server Error
The server encountered an internal error and was unable to complete 
your request.  Either the server is overloaded or there is an error in 
the application. 

It worked fine the first time I ran thru everything but now am stuck since I tried to redo it.

Thanks for all your help!
Scott

Don’t redo OAuth each time. Once you have OAuth, that’s set. All you have to update are the samples. @zpriddy has a separate link for updating samples.

1 Like

Yeah I figured thats where I screwed up but now I can’t fix it. It seems to be holding on to the original OAuth info which I deleted (the smartapp).
I need to be able to start from scratch but am getting stuck.

You need Zach’s help for that.

1 Like

@zpriddy are you still open to additional Beta Test Participants? If so I’d love to join and take a look at the amazing progress you’ve been able to make using the native ASK. - I have already went through your GitHub setup, and all works, just wanted to give a heads-up in the event there were any concerns. - Great Work!

Sorry for the lack of updates lately… I was out of town for DEFCON and should be resuming work on updates today :slight_smile:

3 Likes

ohhhhhhhhhh Lucky…

1 Like

So is ST as hard to crack as a Tesla?