Recently I bought a videography drone, the DJI Phantom 4 that shoots 4K video and noticed that in high winds, it drifts a bit and has to compensate. So ideal flying situations would have almost no wind, but looking up that info on my phone every time is quite time consuming and it would be so much easier if I could ask my Amazon Echo for that information while I'm packing up my drone for a trip!
Enter "Wind Report" an Amazon Alexa Skill that I created to give you the current conditions of the wind in a specific city. Now I can plan a drone flight knowing I don't have to worry about any competing winds.
Generic Alexa Skill Guide
For this guide I will be using Node.js in an Amazon Lambda function (Amazon's version of a cloud run process) combined with an Amazon Alexa Skill.
- Set up a new Amazon Lambda function (Needs to be in N.Virginia in the top right of your dashboard screen)
- Set up a new Amazon Skill
- Grab the
Application Id
from the newly created Amazon Skill and replace the part in theindex.js
file relating to the ApplicationId. - Zip the two files up and upload the zip file to your Amazon Lambda function.
- Then define the Voice Interface using the two files in the speechAssets folder. (
IntentSchema.json
andSampleUtterances.txt
) - In your lambda function, go to the Event Sources tab, and add the "Alexa Skills Kit" Event source.
- Copy your Amazon Lambda's ARN (Amazon Resource Name) and past that into the Endpoint textbox in the Configurations Tab of your Alexa Skill - something like
arn:aws:lambda-us-east-2:9081209381:function:hello-world
Now you should have an Amazon Alexa Skill set up!
Publishing an Alexa SkillSome things to keep in mind if you are making your own Alexa Skill for global publishing.
- You will need icons for your Alexa Skill
- You will need to process the generic Help intent
- You will need to process the generic Stop / Cancel intents
You can find the code that I used inside of this GitHub repo: https://github.com/anthony-ngu/alexa-wind-report
- The
src
folder contains the files that you will need to zip up and place inside your Amazon Lambda function - The
interaction_model
folder contains theintent_schema.json
andsample_utterances.txt
files that you will want to copy the content from and place into your Alexa Skill configurations
I also tied in API calls to the Wunderground Weather API in order to get wind information for specific cities, so you will need to get your own API Key from them if you want to make your own version work.
Use it on Your Amazon Echo Right Now!Since it finished the Amazon Alexa Certification process on April 21, 2016 , you can download and use it without having to set it up yourself!
To turn on a skill:
- Open the Alexa app.
- Open the left navigation panel, and then select Skills.
- You can use the Search bar to find "Wind Report" and then select Enable.
After you turn on a skill, you can ask Alexa to open and use it. For example, say, "Alexa, open Wind Report for Seattle"
Here are the available commands to launch Wind Report:
Alexa, ask Wind Report what is the wind report for {Location}
Alexa, ask Wind Report what is the wind for {Location}
Alexa, ask Wind Report what is the wind like for {Location}
Alexa, ask Wind Report what is the wind like in {Location}
Alexa, ask Wind Report what's the wind report for {Location}
Alexa, ask Wind Report what's the wind like for {Location}
Alexa, ask Wind Report what's the wind like in {Location}
Alexa, ask Wind Report how much wind in {Location}
Alexa, ask Wind Report how much wind is there in {Location}
Alexa, open Wind Report tell me the wind report for {Location}
Alexa, open Wind Report give the wind report for {Location}
Alexa, open Wind Report give me the wind report for {Location}
Alexa, open Wind Report get the wind report for {Location}
Alexa, open Wind Report get me the wind report for {Location}
Alexa, open Wind Report find the wind report for {Location}
Alexa, open Wind Report find me the wind report for {Location}
Alexa, open Wind Report for {Location}
Future WorkStay tuned for another project on how to set up an Alexa Skill with user login capabilities in order to keep track of configurations and personal preferences!
Comments