Skip to content

Node RED PI and Alexa Setup

Joey Langan edited this page Jun 7, 2017 · 3 revisions

Initial setup for PI and Node-RED from pre-requisite: https://github.com/langanjp/PI-NodeRed

Create Amazon Alexa Skill

  • Navigate to https://developer.amazon.com/edw/home.html#/skills
    • Use your normal Amazon account to login as a developer
    • If you don't have an Amazon account, you will need to make one
  • Under Alexa Skills kit, click "Get Started"
  • Click "Add a New Skill"
  • You will input information in a number of steps (click "Next" at the bottom of each page to move to the next step):
  1. Skill Information
    • Pick any name that you want (this is only important if you ever publish the skill)
    • Use pie as the invocation name (otherwise Alexa sometimes gets confused with using just PI)
  2. Interaction Model
    • Intent schema
      • Intents are the information (e.g. objects / elements / attributes) that are needed for the skill to work
      • Copy alexa-intents.json into the Intent Schema window
    • Custom Slot Types
      • These are the "type" of values that are in the intent schema. Amazon has a lot of built in ones (e.g. Cities, countries, numbers) and allows you to build and define your own types and lists of values. It does not restrict the values to what you have listed
    • Sample Utterances
      • This is where you train Alexa how to interact with the intents model
      • Copy alexa-sample-utterances.txt into the Sample Utterances window
  3. Configuration
    • Input your service endpoint here: https://yoururl/alexapi
    • Account linking: No
    • Permissions: No additional (nothing checked)
  4. SSL Certificate
    • If using IBM Bluemix, check the option "My development endpoint is a sub-domain ..."
    • You can also import a self-signed certificate
  5. Test
    • Select enabled
    • You can test using the Service Simulator. This will give you the exact json request and response as pictured below:

Additional set-up for PI and Node-RED

  • Import alexa.xml to your PI AF database
  • Import NodeRed-Alexa-PI.json to your Node-RED instance
    • In the json import, find and replace the yourskillapplicationidhere with your amazon skill application id
    • If you would prefer to do this from the Node-RED editor, you can make this substitution in the "check appid" node