Introduction
While the Echo Dot and Alex Skills portal are very cool there is likely to be a few "Gotcha" moments that will have you scratching your head when you first set off down the line of creating custom skills. Firstly you will need a free Amazon Developer account you can sign up here.
You can then visit the Alexa Skills Portal which will list all your current skills and allow you to "Create A New Skill".
There are lots of guides on the web for creating a basic skill doing this so I'm not going to duplicate that here, aside from to point out a few things that caused me issues and might save you some time and frustration.
Endpoint Configuration
When you develop any skill you must host code somewhere that will run the server side portion of that skill. You have 2 choices, you can use the Amazon AWS Lamda service or you can host the code on your own internet facing webserver. Preferring not to have to learn about AWS as well I decided using my own webserver would be easier, plus I can see the logs and whats going on etc. If you choose to do this be aware of the following caveats:
- You MUST use HTTPS to talk to your web server AND it MUST be on port 443. You cannot use plain HTTP or a custom HTTPS port for SSL. It will happily accept a custom URL like https://mysite.com:12345/skill.php but it simply will not work the port option is completely ignored.
- With SSL comes the problem of secure certificates, if the SSL hand shake fails your skill will not work. You can use a self signed SSL certificate and upload it in to the Alexa Skills Portal, however you cannot publish or beta test a skill that has a self signed SSL certificate. Luckily Amazon also supports LetsEncrypt so I used that to generate a free SSL certificate and installed it on my webserver.
Initial Testing and Beta Testing Your Skill
Once you have created a skill and have ticks in the first 5 boxes, your skill should be visible inside the Alexa app on your phone. I have 2 accounts on my Echo's as my partner has Amazon Prime and I share it with her as a Family Member. Initially the skill is only available to the same account that the Amazon Developer Account is associated with. So make sure you are in your Dev account when you come to test it, or she will simply say "skill not found". You can do this by asking "Alexa Which Account" and she will tell you who's account she is in, then you can say "Alexa Switch Account" to hop between them.
Once you have ticked all the boxes on the left the "Skills Beta Testing" option will become active, this is where you can add email addresses of people who you want to test the skill. I added my partners email to this so I didn't have to worry about switching between the accounts. When you add the testers they "should" get an email, however stupidly Amazon apply the Marketing perferences to the Beta Testers so if they have opted out of marketing emails they will not get the beta invite. To get around this on the beta page you can copy the large URL in the box at the top and email or text it to them manually. When they click that link it takes them to the Alexa app where they can confirm they want to test the skill and then enable it on their devices.
ALSO: The beta test skills will expire after 90 days and once they do, you cannot extend them. You have to start a new test, send new invites, have testers re-add the skill etc; basically start the whole process all over again! My plan was to share my kills with friends and family but not publish them, however because of this expiry its not suitable to leave things in prepetual test.
I think thats just about it for pitfalls, but if I think of any more I will add them here.