Bingo!
Thank you so much for this. It was the last remaining piece to my new found love for SmartThings because of Alexa.
-SiP
Bingo!
Thank you so much for this. It was the last remaining piece to my new found love for SmartThings because of Alexa.
-SiP
Great Job!
By the way, itâs pretty easy to support multiple locations with AskHome. You just duplicate what you did the first time, and change the Ask word (Invocation name) to Cabin or Work or whatever on the copy. âask cabin to shut off the waterâ
Your other locations can even be in the same smartthings location. âŠ, add just the devices in the polebarn to the new copy of the SmartApp/Skill/Lambda combination and say things like âask polebarn to turn off the lightsâ
And if your friends will give you a token & id to their smartThings AskHome appâŠyour Alexa can control their stuff too. You can even use a different invocation name when you talk about their devices than what they use. (youâll need their list of nouns too for the Alexa skill part) Great for helping out old parents by remote control. âAsk moms-house to water the lawn.â (you know, like when sheâs on vacation with your brothers family and grand kids or something.)
Very nice, well done!
I canât seem to get the right appID or the Token.
I get an error when running the simulator to get them
this is the error i get.
grails.validation.ValidationException: Validation Error(s) occurred during save():
Donât forget the Tap for portability, I have all three!
Hi Bamarayne,
Looks like a lot of devices you donât have assigned to the inputs. You have to fill in all the inputs in the simulator, and you donât have those same devices as I do. Go get a copy of AskHome-Bare-1-device.groovy and use that code instead. I just uploaded it. It has all the inputs and switch structure for the nouns and ops removedâŠexcept for one light.
While in the SmartApp editor, make sure youâve chosen App settings and have enabled Oauth. Then go to the simulator pick your location, choose a light and install. And get your token and ID (donât uninstall!). Then over time add your inputs at the top for your own devices and switch/case structure to call the routines when they match. Iâd do this one at a time, test it out with alexa. Look at the full code for examples of how the inputs and switch/case can be worked.
âKeith
Whippm,
Yea, it should work with Tapâs too. Alexa handles all that. Though I donât have a Tap, there was nothing I needed to change to make this work with my dots. My dots are assigned to the same amazon account as my echo.
âKeith
I thought that was my problem, but it was around 2am. Thanks!
I have no idea what Iâm doing wrong.
in Lambda when I save/test I keep getting this error below the box:
âerrorMessageâ: âProcess exited before completing requestâ
when I test in the developer console I get this response:
âThe app on smartthings did not return any messageâ
What does the smartthings log say for your smartApp when you run the test? Does anything show up there?
the logs are blank???
OkâŠso you turned on loggingâŠran the test and nothing showed up. Thatâs ok.
In the lambda testâŠthe lower left has that box with the process exitingâŠwhats in the right lower box?
START RequestId: cd4b94df-112a-11e6-b83c-5fac0961332f Version: $LATEST
2016-05-03T12:30:21.226Z cd4b94df-112a-11e6-b83c-5fac0961332f TypeError: Cannot read property âintentâ of undefined
at exports.handler (/var/task/index.js:10:21)
END RequestId: cd4b94df-112a-11e6-b83c-5fac0961332f
REPORT RequestId: cd4b94df-112a-11e6-b83c-5fac0961332f Duration: 47.31 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB
Process exited before completing request
What is the JSON code in your Lambda, Actions / Configure Test Event box
{
âkey3â: âvalue3â,
âkey2â: âvalue2â,
âkey1â: âvalue1â
}
Go back to the Alexa Developer console Test section, and type in something like âask home to turn on the bedroom lightâ Below it, it will create a valid JSON test code for Lambda. Put that in the Lambda test window in place of the key1key2key3 stuff. And try the test again. And show me the code too.
{
âsessionâ: {
âsessionIdâ: âSessionId.50262640-180f-46fc-9962-02041dcbf98aâ,
âapplicationâ: {
âapplicationIdâ: âamzn1.echo-sdk-ams.app.bd9bd9ab-2dc7-482e-ae35-356d46678eebâ
},
âuserâ: {
âuserIdâ: âamzn1.ask.account.AFP3ZWPOS2BGJR7OWJZ3DHPKMOMNWY4AY66FUR7ILBWANIHQN73QHCD3E2XHPBMHHR2BQJB36X5U25SI67QDW6DHLRXOTODH6LDJ53FWM65PNSI2LUOI64CX5N7DPGQQ37R54IS6T4XU2WMS2VU5VG6S2X3B36DXE3CDOWTQXDTGPKY5FXHT7SNGIHPQQZLVYVPKJ5ENDZZHKUAâ
},
ânewâ: true
},
ârequestâ: {
âtypeâ: âIntentRequestâ,
ârequestIdâ: âEdwRequestId.a71404fb-4ad4-4aad-bb29-e83242b5c156â,
âtimestampâ: â2016-05-03T12:44:57Zâ,
âintentâ: {
ânameâ: âHomeâ,
âslotsâ: {
âOperatorâ: {
ânameâ: âOperatorâ,
âvalueâ: âonâ
},
âOperandâ: {
ânameâ: âOperandâ
},
âInquisitorâ: {
ânameâ: âInquisitorâ
},
âNounâ: {
ânameâ: âNounâ,
âvalueâ: âvanity lightâ
}
}
},
âlocaleâ: âen-USâ
},
âversionâ: â1.0â
}
That looks good nowâŠwhat did Lambda say, in the lower left and rightâŠwhat did the smartthings log say when you hit the test?