Skip to content

cdzombak/alexa-aircraft-radar

Repository files navigation

Aircraft Radar skill for Amazon Alexa

The Aircraft Radar skill for Amazon Alexa uses live ADS-B radio signals, collected by volunteers, to tell you what airplanes are around you.

This top-level README covers technical topics relevant to development of the skill codebase.

Requirements

Node v12

This is a standard Node application which requires Node v12. It should work with newer Node versions and versions as old as 8, but it's currently deployed with v12.

On macOS,

brew tap homebrew/cask-versions
brew install node@12

# then, in your shell:
export PATH="/usr/local/opt/node@12/bin:$PATH"

AWS Lambda

This application is deployed to AWS Lambda. You can probably run it elsewhere, but it’s specifically designed for and tested with Lambda.

Geocoding API

The skill requires my geocoding web service to be deployed, and you’ll need an API key to access it (see “Environment Vars” below).

Aircraft Images API

The skill requires my aircraft images web service to be deployed, and you’ll need an API key to access it (see “Environment Vars” below).

Libraries

Per package.json, in production this application requires alexa-sdk, request, and request-promise.

Development

Install dependencies with npm

Install dependencies, including those for development, with npm install.

Set required environment variables in your shell

Once you have an API key for the geocoding service and aircraft image service, run source .env.dev in your shell before running mock requests (see the next step). You can create this file by copying .env.sample and filling out the empty values there.

Run mock requests with lambda-local

package.json defines a script that can be used to run a mock request for every supported intent.

Start by running npm run mock-nearest-aircraft, and see package.json for the full list.

(You’ll have to run this after setting the required environment variables in your shell.)

Generate utterances programmatically

Use scripts/utterance-gen.py to programmatically generate variants of utterances which can be grafted into the skill JSON file.

Deployment

npm run package generates a zip file suitable for uploading to AWS Lambda. It’s placed in the products subdirectory. (See scripts/package.sh.)

npm run deploy uses the AWS CLI tool to deploy the Lambda function. Install aws via brew install awscli. The script respects the AWS_PROFILE_NAME environment variable, if set. (See scripts/deploy.sh.)

npm run deploy-website rsyncs the www folder to the public website.

Environment Vars

  • ADSBX_API_KEY is the API key for the ADS-B Exchange API.
  • GEOCODE_API_KEY is the client key for my geocoding web service.
  • IMAGE_API_KEY is the client key for my aircraft images web service.

Be nice to ADS-B Exchange

Aircraft data comes from ADS-B Exchange. Be nice to them:

Reference Materials

Updating ICAO 8643 Aircraft Types

Visit https://www.icao.int/publications/DOC8643/Pages/Search.aspx, observe network requests in the Inspector, and download the AircraftTypes file.

For Manufacturers, visit https://www.icao.int/publications/DOC8643/Pages/Manufacturers.aspx and download the Manufacturers file it loads.

License

The skill’s code and related data (eg. the utterances file) is licensed under GPLv3. See LICENSE.

The skill’s icon is stored in this repository but is not available for use by others under any circumstances.

Author

Chris Dzombak

Inspiration

These links were interesting and inspired me to start on this project, but I wanted something more generally useful and that could use data from all over the place:

About

The Aircraft Radar skill for Amazon Alexa uses live data from ADS-B Exchange to tell you what airplanes are around.

Topics

Resources

License

Stars

Watchers

Forks