Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

METAR CHATBOT

This is an example chatbot implemented with Dialogflow that allows you to get METAR informations of your favorite airport.

A simple example of what you can ask

You: What's the METAR for LFPG?
Chatbot: LFPG 081600Z 23012KT 9999 SCT044 BKN260 11/02 Q1017 NOSIG

You can also ask specifically for visibility

You: What's the visibility for LFPO?
Chatbot: Visibility is 9999

You can test a live demo version here

INSTALLATION

You'll need some packages to run this example :

If you want to deploy the webhook, you'll need a firebase account

NB: Firebase cloud functions can only run on Node V6 or V8, I choose the 8.15.1 as it is the latest LTS for Node 8.

nvm use
cd functions && npm install

RUN

You can run the project with :

firebase serve

TESTS

You can run tests by running :

npm test

You can also run mocha directly with :

npm run mocha

DEPLOY

To build the project :

npm run predeploy

To upload it on Firebase :

firebase deploy

ENV VAR

APIKEY = Define the API KEY used to access the API (default: IAMANAPIKEY)

WEATHER_URL = Define the weather service endpoint (default: https://avwx.rest)

WEATHER_TIMEOUT = Weather service timeout (default: 30000)

CHECKLIST BEFORE GOING TO PRODUCTION

This project is not full ready for production.

In order to do so, we need to add :

  • more functionnalities (this is a test!)
  • metrics (Grafana?)
  • a logger / alerting system (like Sentry?)
  • documentation (Swagger for example)

HOW DOES IT WORK?

I used the free API https://avwx.rest to retrieve METAR airport information.

WANT TO KNOW MORE?

About

A simple chatbot to retrieve METAR info 🤖✈️

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages