OneBusAway / onebusaway-alexa

An Java-based app to communicate with Amazon Alexa for devices such as the Amazon Echo
Other
52 stars 18 forks source link

Add ability to filter predictions by route #67

Closed barbeau closed 7 years ago

barbeau commented 8 years ago

Summary:

From user feedback in beta (https://github.com/OneBusAway/onebusaway-alexa/issues/65):

  • My bus stop (#700) is one of the busier ones and the list is daunting – it is possible to add bus filters (only 545 and 268 for example)?
  • Wondering if the skill could/should support other types of utterances, not just the no-intent ones. For example, I’d like to ask “ask OneBusAway when is the next 8 bus coming” so that it doesn’t give me the times of arrivals for other lines I don’t use. My stop only has two bus lines, but I think this could be very useful for users who frequent a bus stop with multiple bus lines.

Steps to reproduce:

Set the city to any city (e.g., Tampa), and with a busy stop (e.g, a transit center such as 6497).

Expected behavior:

Have some ability to filter which routes arrival information is returned for

Observed behavior:

All arrivals are returned

Device:

Amazon Echo

barbeau commented 7 years ago

Reviewing user reviews on Amazon for the skill, this is definitely the number one requested feature. We could implement this similar to how stop ID collisions are implemented when setting the stop ID (https://github.com/OneBusAway/onebusaway-alexa/issues/53, PR at https://github.com/OneBusAway/onebusaway-alexa/pull/83).

For example, if you say "Alexa, ask OneBusAway to filter my routes", a response could be something like:

You are setting a route filter for stop 6497.

...and then loop through all routes serving that stop:

Do you want to hear arrivals for Route 5?

...and the user could answer yes or no.

I'm open to better options if anyone else has ideas. Route IDs can be alphanumeric, and we don't know all possible values at build time, so we can't ask the user to specify them by saying the ID.

Another question is if we allow users to filter at the trip headsign level, so "Route 5 - South to Downtown" incoming to a stop vs. "Route 5 - North to UATC" for departures outbound - this is particularly relevant at transit centers.

barbeau commented 7 years ago

I'm working on this.