Echo & Alexa Forums
General Category => Alexa Software Development & Technical Discussion => Topic started by: monty617 on August 18, 2015, 11:19:43 am
-
EDIT - Initial post no longer relevant since the same can be accomplished much easier with SmartThings virtual switch.
-------------------------------------------------------------------
Hey guys, I had an idea for direct IFTTT integration rather than the cumbersome options Amazon provides. I noticed someone on Github (mefogle) had a similar idea so I made some customizations to allow direct voice commands sent to the IFTTT maker channel. This allows you to say something like "Alexa, tell my house to turn on the TV" or "Alexa, tell my house to turn on the lights" which would pass "turnonthetv" and "turnonthelights" to IFTTT Maker channel respectively which you can then pass to whatever channels you wanted.
I do still use the Hue Bridge for simple lighting commands as that flows better, but having the entire IFTTT channel library at your fingertips with simple commands is working out pretty well for everything else. All you have to do is plop the code in AWS Lambda or your own server and you're off to the races. I hope someone finds this useful.
Github Code:
https://github.com/monty617/AtoIFTTT
Thanks go out to mefogle @ Github for the initial code.
-
Hey monty617,
Thanks a lot for this! I am attempting to walk through your instructions on Github but I'm running into issues hosting the code out in Lambda. Are you using Lambda or are you running it from your own server?
Mine is erroring on this line:
if (event.session.application.applicationId !== "YOUR_AMAZON_APP_ID_HERE") {
context.fail("Invalid Application ID");
}
Error response:
{
"errorMessage": "Invalid Application ID"
}
Where do we find the Amazon app id? I don't see that listed in the instructions as a variable that has to be set as unique.
Thanks!
-
Sorry, the instructions assume some previous knowledge creating ASK skills. Did you get that error testing with Lambda or your Echo itself? You can find your app ID when you create the skill on Amazon's developer portal (https://developer.amazon.com/public/solutions/devices/echo). I would suggest looking through their documentation on setting up a skill as they run through it step-by-step.
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit
Hope that helps.
-
Appreciate the links. Was simple enough to find the Application ID, I just glanced right over it initially. I was getting the error when testing through Lambda, now I'm getting the desired output when throwing the Alexa Start Session example at it.
-
Glad to hear. Hope it works well for you.
-
Well, looks like no real reason for this now. Amazon announced direct integration with SmartThings recently and even without a hub you can now tie a virtual switch directly to IFTTT. Can now use the native "turn on" Echo functions to launch anything on IFTTT.