Coder Social home page Coder Social logo

jamesives / dc-metro-google-assistant-action Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 3.0 1.72 MB

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

Home Page: https://assistant.google.com/services/a/uid/000000c72972063a

License: MIT License

TypeScript 100.00%
google-actions dialogflow-fulfillment actions-on-google google-assistant wmata washington-dc dc-metro dialogflow actions-on-google-nodejs

dc-metro-google-assistant-action's Introduction

dc-metro-google-assistant-action's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar iam-afvincent avatar jamesives avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dc-metro-google-assistant-action's Issues

Storing favorite stop/station

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It can sometimes be tedious to have to always tell the action which station/stop you'd like to request.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

Actions on Google allow you to store data about a user similar to local storage in the browser. What would be nice is if you could tell the action "Remember my favorite bus stop is 11222" or something to similar, and then on follow invocations you could ask the action to tell me about the saved bus stop.

Additional Comments

Add any other context or screenshots about the feature request here.

Docs: https://developers.google.com/actions/assistant/save-data

Bus Incidents

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Only rail incidents are presented currently, the application should be mirrored for bus users.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

Similar to rail incidents, it would be nice to include any bus incidents in a similar method. For instance if a user requests a stop id and one of the route numbers which stop there is affected by an incident, it should be presented to the user.

Additional Comments

Add any other context or screenshots about the feature request here.

There is a separate incident for bus incidents on the WMATA API site.

Interruption Data

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The action be able to tell if there's a delay on any of the lines which stop at the requested station. This data can be surfaced in the Interruptions endpoint by WMATA.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

When the user asks for a station, for example: train times for Farragut North the action should be able to respond with There's x amount of interruptions that affect the lines which stop at this station, would you like to hear them?, answering with yes should provide a readout with what the interruptions are. If there's no interruptions the action should immediately close.

Additional Comments

Add any other context or screenshots about the feature request here.

Incidents endpoint: https://developer.wmata.com/docs/services/54763641281d83086473f232/operations/54763641281d830c946a3d77?

There should also be a separate command to get interruptions, Ok Google, ask DC metro for train interrupts on the red line or Ok Google, ask DC metro for train/bus interruptions.

Spanish Localization

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It would be nice if some of the action data was localized in a secondary language. Spanish would make the most sense I believe. For content which is API sourced it would be best to use the Google translate API: https://cloud.google.com/translate/docs/

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

Whenever a user queries the application, it should return data in the users language of choice. For instance Spanish. Station names and incident data should be left in English as that makes the most sense.

Action should understand stop commands

When presented with the β€œWould you like to try another station?” question, if the user says no it doesn’t end the action. This should be fixed so any variation of no causes the action to terminate.

Handling when bus number not recognized

Describe the bug

Please provide a clear and concise description of what the bug is.

When DC Metro doesn't recognize a bus station number (because it doesn't exist), instead of asking for a different number, it just terminates the program.

Reproduce

Steps to reproduce the behavior.

Ask for bus times at stop number 1231233. Your query will be terminated.

Expected behavior

Please provide a clear and concise description of what you expected to happen.

It should tell me there was an issue and ask for a different bus station number

Screenshots

If applicable, add screenshots to help explain your problem.

Additional Comments

Add any other context about the problem here.

Line Filtering

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Certain stations have a lot of trains arriving at a station, and often times the user only wants to see data about a specific line or destination.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

You should be able to invoke the action to request a station and a specific line, for example Ok Google, Ask DC Metro for the Orange Line Train times at Farragut North to get the orange line trains at Farragut North.

Additional Comments

Add any other context or screenshots about the feature request here.

The dialog flow will need to be improved generally to handle this more gracefully (#24), but the general lift should be relatively small to get the filtering in place.

General Action Improvements

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like

Whenever the user runs the initial command Talk to DC Metro, the action should suggest possible speech responses. It should also display some of the data in a better way (for instance if there's incidents that data should be surfaced on the table somehow so it's not just reading off broken text).

Please provide a clear and concise description of what you want to happen.

  • Use the speech suggestions.
  • Look at what other actions do to make the flow more natural.
  • Allow users to follow up to one station with another.
  • Add incidents to bus stops.

Additional Comments

Add any other context or screenshots about the feature request here.

Lots of random things here, just writing down some thoughts while I take the metro.

Timestamp is not EST on timetable

Describe the bug

Please provide a clear and concise description of what the bug is.

As this is for the Metro in DC, the timestamp should be displayed as Eastern time only.

Reproduce

Steps to reproduce the behavior.

  • Ask the bot for a timetable, the time provided is UTC and not EST.

Expected behavior

Please provide a clear and concise description of what you expected to happen.

I expect the bot to give me the local time in DC.

Nearby Bus Stops

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Right now for bus stops you have to put in the stop ID which can be somewhat annoying because it's not always readily available to the user. This is a bad user experience and should be improved.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

The WMATA API has an endpoint for nearby stops which accepts LAT/LONG coordinates. The proposed flow would be something like this...

> User asks for nearby stop
> Application asks if it can access the users location data.
> User accepts or denies, application then presents the top 3 stops near them if they accept. 
> User selects a stop, and the prediction data is presented to them.

This could be improved for assistant devices with a screen as an actual interface could be presented to the user for them to select, for speaker devices (Most Google Homes) the name could be read off to them, or the address.

Additional Comments

Add any other context or screenshots about the feature request here.

I'm not sure if this is really needed for trains, or if the tools even exist for the functionality to be mimicked for that service.

Dialog Improvement

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Right now some of the dialog feels tricky to use, and the application doesn't always understand the user.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

The DialogFlow settings should be improved, and potentially the way the app is invoked to provide a better user experience.

Additional Comments

Add any other context or screenshots about the feature request here.

There's a lot to unfold here, so I'd like to use this thread to keep track of any ideas I or anyone else may have.

Stations with multiple platforms

Describe the bug

Please provide a clear and concise description of what the bug is.

Certain stations contain multiple platforms with different lines which stop at each such as Metro Center at Fort Tot. When we retrieve all stations from the stations endpoint there's a Code property which doesn't show all of the lines. There's a StationsTogether1 property on the API which should be used for these station types which will aggregate all of the data when the predictions endpoint is hit.

Reproduce

Steps to reproduce the behavior.

  • Ask for train times for Metro Center
  • Observe that only red line trains are shown.

Expected behavior

Please provide a clear and concise description of what you expected to happen.

Should show all of the trains arriving at this station.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.