[NO LONGER SUPPORTED] Ask Alexa

I realize there is one oddity in the docs that throws me off. When creating the Lambda function, the two screen shots presented seem to show first selections a Alexa Skills Kit integration and then the second shot shows an Alexa Smart Home integration. Did I mistakenly assume one vs. the other?

I will look into that…the Alexa Skills Kit is the correct one.

Were you able to get it working or are you still having issues?

Edit: I know why I added that…it was to show the error if you create a function in the wrong region. However, I see how this could be confusing and will re-do that section. Thanks for bringing this to my attention.

Got it. Recreated the function using Skills Kit, correctly, but same error is being generated. I did this very rapidly, so if there is any replication involved, or such dependency I may need to wait.

Ok…Let me know…Sounds like you did everything correctly…but specific errors mean specific things, so if you run into issues be sure to look in the live logging and see what the IDE says.

Good luck!

I’ve yet to get anything Ask Alexa to show up in the IDE logs which is why I checked the tokens. I’ll go back through it again and hopefully find my mistake. Thanks.

The other thing is to check the ARN number that comes from the Lambda code and is put in the developers area.

Think of it this way…The device in your home is connected to the developer site, which is connected (with the ARN) to the Lamdba site, which is connected to SmartThings through the OAuth.

Hopefully that makes sense…again, good luck!

Yes. Reconfirmed. Note that the UI has changed since you took the screen shots in the docs. The AWS Global Fields UI now asks you to choose a region (North America vs. Europe) just above entering your ARN.

Yeah…they have changed the screens multiple times…I am going through the documentation tomorrow to update it for the latest version, so I may go through some of the old screens to update them.

Anyway, if your ARN is correct, and your Token and Oauth are correct, you should get something from the IDE when issuing a command.

Looking at your message above from the developer site, it does appear to be getting to the Lambda functions…so it is definitely in the Lambda function where you are having the error, and this is almost always the AppID and the Token. I recommend copying it from the setup web page created by the app and not attempting to type it in manually.

Strangely enough, I can’t find the screen you attached above. Here is what I see:

Either way, did you get your app working?

Interesting if they can do this and they allow developers access this info : http://www.theverge.com/circuitbreaker/2017/2/27/14753276/amazon-alexa-individual-voice-recognition-voice-id

I seem to be running into a problem trying to set a temperature with the Ecobee (using YRacine device handlers).

“great room” is the name of the YRacine thermostat device
"set great room to auto"
19f64f1d-6405-461c-aac9-18a4534a79a1 1:34:44 AM: debug I am setting the great room to ‘auto’ mode. Please note, to properly set the temperature in ‘auto’ mode, you must specify the heating or cooling setpoints separately.
1:34:43 AM: debug Param: auto
1:34:43 AM: debug Num: undefined
1:34:43 AM: debug Op: undefined
1:34:43 AM: debug Dev: great room
1:34:43 AM: debug -Device command received-

"set great room heating setpoint to 65 degrees"
1:39:14 AM: debug I could not process your request for the ‘great room’. Ensure you are using the correct commands with the device.
1:39:14 AM: debug Param: heating 65
1:39:14 AM: debug Num: undefined
1:39:14 AM: debug Op: undefined
1:39:14 AM: debug Dev: great room
1:39:14 AM: debug -Device command received-
1:39:14 AM: debug --Begin commands received–

"set great room to heating mode"
Clear
1:44:47 AM: debug I am setting the great room to ‘heating’ mode.
1:44:47 AM: debug Param: heating
1:44:47 AM: debug Num: undefined
1:44:47 AM: debug Op: undefined
1:44:47 AM: debug Dev: great room
1:44:47 AM: debug -Device command received-
1:44:47 AM: debug --Begin commands received–

"set great room to 65 degrees"
19f64f1d-6405-461c-aac9-18a4534a79a1 1:46:08 AM: debug I could not process your request for the ‘great room’. Ensure you are using the correct commands with the device.
1:46:08 AM: debug Param: 65
1:46:08 AM: debug Num: undefined
1:46:08 AM: debug Op: undefined
1:46:08 AM: debug Dev: great room
1:46:08 AM: debug -Device command received-
1:46:08 AM: debug --Begin commands received–

Looks like the Num is being passed as Param?

You should copy @yvesracine on this to see if he has insight and the devices to test this properly. I did make some changes in the next version that improve some of the mode changes, but not on the device itself.

Looking at your results:
“set great room to auto” -This seemed to work correctly, yes?
“set great room heating setpoint to 65 degrees” - This one combined ‘heating’ and 65 into the parameter setting which would give an error. Have you tried “set great room to 65 degrees, heating”?
I am setting the great room to ‘heating’ mode-This seemed to work correctly, yes?
“set great room to 65 degrees”-You do need to give heating or cooling to the description unless you override that from the app (there is a switch that will ALWAYS send heating/cooling setpoints without having to say it.

Let me know if that helps…I tested some of this with my Nest Thermostat and it seems to work fine.

[quote=“MichaelS, post:2898, topic:46786”]
Looking at your results:“set great room to auto” -This seemed to work correctly, yes?[/quote]
Yep.

[quote="MichaelS, post:2898, topic:46786"]"set great room heating setpoint to 65 degrees" - This one combined 'heating' and 65 into the parameter setting which would give an error. Have you tried "set great room to 65 degrees, heating"?[/quote] Yes--I realized that. Was just wondering why the param and number weren't split out. Looks like I may need to look at the Utterences and add to them. [quote="MichaelS, post:2898, topic:46786"]I am setting the great room to 'heating' mode-This seemed to work correctly, yes?[/quote] Yes. [quote="MichaelS, post:2898, topic:46786"]"set great room to 65 degrees"-You do need to give heating or cooling to the description unless you override that from the app (there is a switch that will ALWAYS send heating/cooling setpoints without having to say it.[/quote] I just assumed that since the thermostat is in "heating" mode from the previous command, that it would adjust the heating mode temperature. At least that's how the native Alexa command works. So right now, I use Ask Alexa to change the mode, and use Alexa native to change the temperature.

So, mode changes work just fine. It’s trying to set the temperature. Weird thing is that it works just fine bypassing Ask Alexa: “Alexa, lower the temperature in the great room,” “The great room is in auto mode. Aiming for 66 degrees.” Seems like Alexa is adjusting the temperature based on the current mode of the thermostat.

BTW–one of the error messages from Ask Alexa on trying to set the temp is, “You must designate a ‘heating’ or ‘cooling’ parameter when setting the temperature. The thermostat will not accept a generic setpoint in its current mode. For example, you could simply say, ‘ask Alfred to set the great room heating to 65 degrees’. Want to try again?”

So I say EXACTLY that phrase, and it returns this error in the logs:
4:40:35 PM: debug I could not process your request for the ‘great room’. Ensure you are using the correct commands with the device.
4:40:35 PM: debug Param: heating 65
4:40:35 PM: debug Num: undefined
4:40:35 PM: debug Op: undefined
4:40:35 PM: debug Dev: great room
4:40:35 PM: debug -Device command received-

Hopefully @yvesracine is reading this here as well…

So I tried using one of the existing utterences:

I tried “set heating of great room to 66 degrees”–no go. :frowning:

I am looking into this, but have you tried the simulator in the developers area? This would tell you if Alexa is misunderstanding you, or there is some sort of programming issue. I will be looking into this either way. Try heat instead of heating as a test as well. I will go into why this syntax is the way it is in another post but it is the syntax for all thermostats.

Yep–all I use to test is the SS (Service Simulator). Don’t want to be yelling at Alexa all the time. :wink: Plus it’s easier to cut and paste utterences onto there and just paste in the variable.

I’ve tried the simulator, but there are some issues with the Amazon AWS services right now.

So, the endpoints cannot be reached at the moment.:confused:

However, the intend request has been decoded correctly by Ask Alexa. See below:

set ecobee heating setpoint to 25

{
“session”: {
“sessionId”: “SessionId.768c3efd-8ac5-47e3-812d-64854b6382d1”,
“application”: {
“applicationId”: “XXX”
},
“attributes”: {},
“user”: {
“userId”: XXX
},
“new”: true
},
“request”: {
“type”: “IntentRequest”,
“requestId”: “EdwRequestId.0527554c-88d3-4b2f-acbf-26874df35ab7”,
“locale”: “en-US”,
“timestamp”: “2017-03-01T01:30:22Z”,
“intent”: {
“name”: “DeviceOperation”,
“slots”: {
“Operator”: {
“name”: “Operator”
},
“Device”: {
“name”: “Device”,
“value”: “ecobee”
},
“Num”: {
“name”: “Num”,
“value”: “25”
},
“Param”: {
“name”: “Param”,
“value”: “heating”
}
}
}
},
“version”: “1.0”
}

Regards.

By chance is this one of the utterances you sent me? I am away from my computer but find it strange that it is combining the temp with the other parameter.

Thanks for confirming…Will check this tonight.

All the commands work on my side in testing mode:

Set ecobee to twenty-five

{
“session”: {
“sessionId”: “SessionId.c854474d-7ea1-40b1-af30-15d7745e9d43”,
“application”: {
“applicationId”: “XXX”
},
“attributes”: {},
“user”: {
“userId”: XXX
},
“new”: true
},
“request”: {
“type”: “IntentRequest”,
“requestId”: “EdwRequestId.15bb3311-db9c-44da-ad9e-dd915d0f7f3d”,
“locale”: “en-US”,
“timestamp”: “2017-03-01T01:46:31Z”,
“intent”: {
“name”: “DeviceOperation”,
“slots”: {
“Operator”: {
“name”: “Operator”
},
“Device”: {
“name”: “Device”,
“value”: “ecobee”
},
“Num”: {
“name”: “Num”
},
“Param”: {
“name”: “Param”,
“value”: “twenty-five”
}
}
}
},
“version”: “1.0”

Regards.

I just checked the uttterences pull request I had sent previously (https://github.com/MichaelStruck/SmartThingsPublic/commit/f4ba2d1af960b35cb5ec939d2d20c16bd41b0dfc) and that sample utterence I used is not mine. I believe I mainly dealt with color utterences and a few status ones.