Echo (Alexa) User Forums

Echo Coding Tutorial

0 Members and 1 Guest are viewing this topic.

Echo Coding Tutorial
« on: August 03, 2015, 03:04:46 pm »
Can anyone point me in the direction of a "dummy's guide" to AWS coding so that I can get the Echo to control my Nest Thermostats? I have a coding background (WAY in my background) and I've been checking out a GITHUB site dedicated to the topic, but I'm missing the basics. There MUST be a tutorial out there somewhere! I've also already signed up for an AWS account... I just don't know how to use it. :)

Re: Echo Coding Tutorial
« Reply #1 on: August 04, 2015, 01:20:26 pm »
Hey Dan
If you signed up with aws you should have access to the the Using the Alexa Skills Kit Samples (Node.js)

make sure you have a account on amazon developer not sure if that is same thing. I just google amazon developer and it takes me there

Re: Echo Coding Tutorial
« Reply #2 on: August 04, 2015, 01:21:26 pm »

Re: Echo Coding Tutorial
« Reply #3 on: August 04, 2015, 11:03:22 pm »
There's always the third party app ifttt. That's what I'm using and it works pretty well for a work around. Still a straight  forward control would be the ideal situation.

And if you already know about that my apologies

Re: Echo Coding Tutorial
« Reply #4 on: August 08, 2015, 07:58:11 pm »
Dan -
My take is that there isn't really any such thing as "AWS Programming" per se because you can write programs for Echo in any language you like, from javascript (which I'm using) to Ruby or even Python, and you don't have to host your stuff on AWS. JSON is used to pass communications back and forth between your program and the Alexa Voice Service. So long as your chosen language can parse out to JSON (pretty much all modern programming languages can), you can write your code in whatever language you're most comfortable with or knowledgeable of.

RE: hosting, using AWS Lambda eliminates the requirement that you provide your own SSL cert and do your own server load balancing, but many Echo devs are using private or virtual private servers + purchased SSL certs to meet Amazon's requirements. Javascript works great on Lambda, BTW. No need to write your own node.js server.

The tricky part of programming for Echo is that you have to think in an entirely different way than you're used to, because there's no GUI and there are strict rules in place for how the user is supposed to interact with your program (aka "skill").

For example, I've got a Bingo skill certified. It has six major subroutines: one for launch/welcome message, one for call the first number, one for call the next number, one for help, one to start a new round when someone calls "bingo", and one for closing. I had to try to predict all the different possible ways---spoken words and phrases---an Echo owner might try to invoke each of those subroutines and include all of those "utterances" in my "Utterances & Intents Schema" (more details about these are available in the development docs someone else already linked to above) to link them to each of the respective subroutines.

Furthermore, the developer is required to include utterances that will allow the user to both launch the skill and perform its first, main function with a one-shot invocation. In my Bingo example, that means I have to anticipate some users invoking with a standard utterance of, "Alexa: launch Bingo," and other users invoking with a one-shot utterance like, "Alexa: launch Bingo and call the first number."

Finally, there can be NO duplication across utterances and this can create challenges for the developer. In my Bingo skill, I linked a bunch of utterances based on the word "ready" to the 'call next number' subroutine because it made logical sense to me that the user would be 'ready' to hear the 'next' number. When I submitted for certification, Amazon's team asked me to include utterances to support user invocations like, "Alexa: launch Bingo and tell it I'm ready." A conference call was needed with Amazon's Echo team to clarify this problem of 'utterance collisions'.

It can be a tricky business to anticipate all the different things the user might say when interacting with your skill, and trickier still to map all those utterances to your skill's functions.