Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

πŸš‰ πŸ”‰ DC Metro Google Assistant action that will show you the latest train and bus arrival information for your commute.

License

Notifications You must be signed in to change notification settings

JamesIves/dc-metro-google-assistant-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DC Metro Google Assistant Action πŸš‰ πŸ”‰

This is a custom action for Google Assistant which will tell you the current rail- and bus-predictions/incidents for the DC Metro transit system. These actions can be invoked on anything that supports Google Assistant such as a phone, a Google Home device, and the from the app. This action leverages the Metro API's. It's not an official product provided by WMATA.

You can view this application on the Google Assistant interaction directory here . You can also check out the article I wrote on this here! πŸ“‘

Installation Steps πŸ’½

This application can be installed with Yarn by running yarn install. With the dependencies installed you can compile, lint, and format the code base using the following commands:

Command Description
yarn format Formats the code.
yarn lint Lints the code.
yarn build Prepares the code for production.
yarn test Runs the unit tests. All unit tests can be found within the tests directory.

Deploying the Action

This action uses Firebase functions and DialogFlow. It can be deployed to Firebase by running the yarn deploy command and by importing the DialogFlow intents using the zip file found in the root of the repository. You'll also need to setup an environment variable within your functions configuration called metro.apiKey with an API key from WMATA.

Interactions πŸ’¬

You're able to invoke the action using Google Assistant by saying Hey Google, talk to DC Metro, or by using one of the following commands:

Action Description
Ok Google, Ask DC Metro for the Train times at Farragut North You can ask the action for a rail or train timetable at a specific station. For instance you can say Rail times for Farragut North or Train times for U Street. Stations with acronyms in their name will also work, for example Metro times for George Mason University will produce results even though the station name is GMU.
Ok Google, Ask DC Metro for the Bus times for stop 3004076 You can ask the action for a bus stop timetable for a specific stop id. For instance you can say Bus times for stop 123. You can find the stop id on the sign that the bus stops at.
Ok Google, Ask DC Metro for Train Commands You can ask the action for a list of available commands by saying either train commands or bus commands.

If you have a screen the action will send a detailed timetable to your device.

Screenshot

The app icon used for the action was created by Paganini.