-
Sign in/Sign up to your Amazon Developer Console https://developer.amazon.com/.
-
On the top you would see Alexa alongside the Dashboard, Apps & Services. Select that.
-
Next you will see Alexa Skills Set. Click Get Started on that.
-
On Top Right, click on Add a New Skill.
-
In the skill, add the name and invocation as shown.
- Go to Next and enter the details from screenshots
- Go to Next and enter the endpoint details. For domain address you need to look at ngrok setup explained below in README.md.
You are done with the setup of your Alexa app.
-
Clone/Download zip of repository.
-
Extract content of the zip.
-
Open cmd to run the following code -
cd "folderpath where zip is extracted"
npm install
- After the installation, run -
npm start
- You need to register for google geoencoder api from here - https://developers.google.com/maps/documentation/geocoding/get-api-key?authuser=1
Copy the API KEY in the .env file.
- You also need to have a bluemix account and should have credentials for the Weather API. You can get it from here - https://console.bluemix.net/catalog/services/weather-company-data
Copy the Username and Password of the SERVICE (as shown in image) in the .env file.
-
In Amazon Alexa, you need an endpoint so that it can connect to your app locally. For this we will install ngrok. Download from here - https://ngrok.com/download
-
Run your app using npm start as explained above in Setting up the Node.js application.
-
Open another terminal and run the following command -
ngrok http 8080
8080 is the port number on which your Nodejs app is running.
- Copy the Forwarding domain from the ngrok terminal. E.g. Your domain would look something like - https://c90db8b2.ngrok.io
Paste it in the Amazon Alexa Endpoint Configuration.
The final endpoint will be - https://c90db8b2.ngrok.io/weather
Here is a sample conversation flow using Alexa -
- User: Alexa, ask watson to tell me the weather in New York .
- Alexa/Watson: The weather in New York is 68 degrees Farenheit.