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

Bringing New York City to One Bus Away #123

Open marcusraylewis opened 4 years ago

marcusraylewis commented 4 years ago

Summary:

I would like to bring one bus away to NYC

Steps to reproduce:

Looking for guidance and steps to help me make this happen. The New York City Transit (MTA) has GTFS data available in real time and static data. and would love to work to add this to One Bus Away for use on Alexa devices.

Expected behavior:

"Alexa when is my next bus?" or "Alexa when is the next bus at stop 201524?"

Observed behavior:

I haven't begun the process yet wanted to get your feedback before so doing

Device:

Echo, Dot, Flex and Show

Audio or video

Not Applicable

barbeau commented 4 years ago

@marcusraylewis Thanks for reaching out! You should be able to enable "experimental regions" by saying this to Alexa:

Alexa, ask OneBusAway to enable experimental regions

NYC should then be accessible like a normal region. See a list of other commands here that you can use to switch regions, etc.: https://github.com/OneBusAway/onebusaway-alexa#using-the-onebusaway-skill

The big question is if accurate real-time arrival information is available for NYC. Long story (more info at https://github.com/OneBusAway/onebusaway-alexa/issues/92, https://github.com/OneBusAway/onebusaway-android/issues/768), NYC didn't originally support real-time arrival times, so only schedule info would be returned by their OBA server - this is why they are listed as an "experimental" region.

The above may have changed since I last worked on this, so I'd love to get feedback from you if it seems to work well and give you accurate real-time arrival info!

marcusraylewis commented 4 years ago

Greetings Mr. Barbeau,

I tried enabling NYC as an experimental region and this did not work. Alexa recognized the command but began repeating the initial setup process for onebusaway. Do you have any recommendations of what is needed to have NYC as an experimental city?

barbeau commented 4 years ago

It should reinitialize after setting up experimental regions. If you answer New York for the city does it find NYC?

barbeau commented 4 years ago

Or just try "Alexa ask OneBusAway to set my region to New York".

marcusraylewis commented 4 years ago

the response I get is "OneBusAway could not locate a onebusaway region near NY". She then goes on to list the supported regions. following this she asks for my city.

barbeau commented 4 years ago

Hmmm... Not sure what's going on. If I do:

... it finds NYC and asks me for my stop number like normal.

Maybe make sure you add "city" after "new york"?

marcusraylewis commented 4 years ago

I am not getting that option at all. Any idea what the issue could be?

barbeau commented 4 years ago

Not sure - what exactly does it say after you enable experimental regions?

marcusraylewis commented 4 years ago

Please listen to the attached voice recording of the Alexa prompts...when asked to set NYC as experimental region she just cycles.

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, May 30, 2020 at 10:24 PM Sean Barbeau notifications@github.com wrote:

Not sure - what exactly does it say after you enable experimental regions?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-636410871, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GOHUL65KHDN2VR6JOLRUG5WTANCNFSM4NNU52SA .

-- Keep Your Feet on the ground but keep reaching for the sky

marcusraylewis commented 4 years ago

I sent you a voice recording of my Alexa interaction via email

barbeau commented 4 years ago

You'll need to upload somewhere or share link on Dropbox - email attachments won't work here.

marcusraylewis commented 4 years ago

Please see dropbox link https://www.dropbox.com/s/obna26zlqlbkmme/Recording.m4a?dl=0 if you didn't receive via email.

barbeau commented 4 years ago

@marcusraylewis Sounds like you're saying: "Alexa, set OneBusAway to experimental regions"

Please try:

"Alexa, ask OneBusAway to enable experimental regions"

Alexa can be very finicky - you have to get it exact for some of the commands.

If that works, you should hear something like "Experimental regions are now enabled" and it should list NYC as one of the experimental regions. Then say:

"Alexa, ask OneBusAway to set my city to New York City"

You can see a list of all the exact supported commands here: https://github.com/OneBusAway/onebusaway-alexa#using-the-onebusaway-skill

marcusraylewis commented 4 years ago

I tried saying "enable" instead of "set" and I am having the same problem. I am flummoxed. Any suggestions?

Marcus

On Mon, Jun 1, 2020, 10:25 AM Sean Barbeau notifications@github.com wrote:

@marcusraylewis https://github.com/marcusraylewis Sounds like you're saying: "Alexa, set OneBusAway to experimental regions"

Please try:

"Alexa, ask OneBusAway to enable experimental regions"

Alexa can be very finicky - you have to get it exact for some of the commands.

If that works, you should hear something like "Experimental regions are now enabled" and it should list NYC as one of the experimental regions. Then say:

"Alexa, ask OneBusAway to set my city to New York City"

You can see a list of all the exact supported commands here: https://github.com/OneBusAway/onebusaway-alexa#using-the-onebusaway-skill

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-636890652, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GPA4XY5E2SUQJEUERTRUO245ANCNFSM4NNU52SA .

marcusraylewis commented 4 years ago

I took a look at the list of commands and I am wondering if the "beta" option would work for me. I will have to look into this. I pulled it from the list below:

EnableExperimentalRegions enable experimental region EnableExperimentalRegions enable experimental regions EnableExperimentalRegions turn on experimental region EnableExperimentalRegions turn on experimental regions EnableExperimentalRegions enable beta region EnableExperimentalRegions enable beta regions EnableExperimentalRegions turn on beta region EnableExperimentalRegions turn on beta regions

marcusraylewis commented 4 years ago

Mr. Barbeau,

Could there be something wrong with the MTA server associated with OBA. I know you said that you haven't had any issue with your Alexa device recognizing the NYC as an experimental region.I am just trying to ascertain what could be the problem. I did see in one of the google groups back in November that there was "Timeout 504 Error from the OBANYC server. Your thoughts?

barbeau commented 4 years ago

@marcusraylewis Turning on experimental regions and discovering the New York region happens before there is any communication with the MTA server, so an MTA issue wouldn't affect this part of the skill.

In short, I'm not sure why it's not working for you. You could try disable and enabling the skill to see if that changes anything, or setting up your own version of the skill using the instructions in the README to see if it works that way: https://github.com/OneBusAway/onebusaway-alexa#develop

If anyone else is able to test on their Alexa device to see if enabling/disabling experimental regions works for them, that would help.

marcusraylewis commented 4 years ago

I will try your suggestions when I get home and provide feedback. I appreciate your patience. I too am very surprised that something this simple is giving problems.

Marcus

On Wed, Jun 3, 2020 at 10:49 AM Sean Barbeau notifications@github.com wrote:

@marcusraylewis https://github.com/marcusraylewis Turning on experimental regions and discovering the New York region happens before there is any communication with the MTA server, so an MTA issue wouldn't affect this part of the skill.

In short, I'm not sure why it's not working for you. You could try disable and enabling the skill to see if that changes anything, or setting up your own version of the skill using the instructions in the README to see if it works that way: https://github.com/OneBusAway/onebusaway-alexa#develop

If anyone else is able to test on their Alexa device to see if enabling/disabling experimental regions works for them, that would help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-638248473, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GI4QNLIFUMLCE5VQVLRUZPJBANCNFSM4NNU52SA .

-- Keep Your Feet on the ground but keep reaching for the sky

marcusraylewis commented 4 years ago

Mr. Barbeau,

I disabled the skill and then re-enabled the skill with same result. Additionally I had my colleague enable the skill and try it at his home and he got the same issues that I got. What am I missing here?

Marcus

On Wed, Jun 3, 2020 at 4:18 PM Marcus Lewis marcusraylewis@gmail.com wrote:

I will try your suggestions when I get home and provide feedback. I appreciate your patience. I too am very surprised that something this simple is giving problems.

Marcus

On Wed, Jun 3, 2020 at 10:49 AM Sean Barbeau notifications@github.com wrote:

@marcusraylewis https://github.com/marcusraylewis Turning on experimental regions and discovering the New York region happens before there is any communication with the MTA server, so an MTA issue wouldn't affect this part of the skill.

In short, I'm not sure why it's not working for you. You could try disable and enabling the skill to see if that changes anything, or setting up your own version of the skill using the instructions in the README to see if it works that way: https://github.com/OneBusAway/onebusaway-alexa#develop

If anyone else is able to test on their Alexa device to see if enabling/disabling experimental regions works for them, that would help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-638248473, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GI4QNLIFUMLCE5VQVLRUZPJBANCNFSM4NNU52SA .

-- Keep Your Feet on the ground but keep reaching for the sky

-- Keep Your Feet on the ground but keep reaching for the sky

barbeau commented 4 years ago

Hmmm...if others can't enable experimental regions either it could be a bug that I'm not seeing with my account because I'm set up as the publisher (and possibly seeing a different version of the app), or I have an older database profile and newer profiles can't access this field for some reason.

Could you open a new issue for this problem with the exact phrases you're using, and the exact response you're getting?

marcusraylewis commented 4 years ago

Mr. Barbeau

I have been swamped with work last few days I hope to open the new issue later today.

Marcus

On Wed, Jun 3, 2020, 5:28 PM Sean Barbeau notifications@github.com wrote:

Hmmm...if others can't enable experimental regions either it could be a bug that I'm not seeing with my account because I'm set up as the publisher (and possibly seeing a different version of the app), or I have an older database profile and newer profiles can't access this field for some reason.

Could you open a new issue for this problem with the exact phrases you're using, and the exact response you're getting?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-638471648, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GJQVQK5EVZ2C6YPN5DRU2575ANCNFSM4NNU52SA .

marcusraylewis commented 4 years ago

The Bus arrival times are incorrect and says "Based on the schedule" after the incorrect bus time notification is announced

barbeau commented 4 years ago

@marcusraylewis Thanks! Could you give some specific examples for incorrect arrival times (including route/stop/times), along with screenshots from apps you're comparing to?

I want to:

marcusraylewis commented 4 years ago

Mr. Barbeau

I am happy to help in any way I can.

This morning at 8:40 am before I left the house I asked Alexa to open One Bus Away. She indicated the following: "Route S40 to St George Ferry via Richmond Terrace will arrive in 47 based on the schedule.". I opened the "transit app" and it said 6 minutes. I walked out to the bus stop to go to work and the S40 was there 6 minutes later. Please see the attached screenshot. I hope this helps. It is my understanding that the data should be real time unless it states "based on the schedule" like in my instance. ..

On Tue, Jul 7, 2020, 3:55 PM Sean Barbeau notifications@github.com wrote:

@marcusraylewis https://github.com/marcusraylewis Thanks! Could you give some specific examples for incorrect arrival times (including route/stop/times), along with screenshots from apps you're comparing to?

I want to:

  • Be sure we're comparing scheduled times to scheduled times (and not real-time to scheduled times)
  • Know which stops/routes we're looking at
  • Know which data sources we're looking at

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-655092299, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GNZK3TIR57IYU7GJW3R2N4TXANCNFSM4NNU52SA .

barbeau commented 4 years ago

@marcusraylewis The screenshot didn't come through - could you upload via GitHub web UI?

If you're comparing the scheduled arrival times in OBA Alexa to the real-time arrival times in Transit App, they will definitely be different. OBA Alexa for NYC is just the time the bus was scheduled to be there, and the Transit App is showing real-time predicted arrivals based on bus GPS data.

marcusraylewis commented 4 years ago

As requested see my screenshot from 8:40 this AM...

Screenshot_20200708-084042

marcusraylewis commented 4 years ago

How can I get real time bus data into OBA Alexa or at least the most accurate data?

barbeau commented 4 years ago

@marcusraylewis From the above screenshot looks like all the trips except for the SIM34 route have real-time data (the little wireless symbol indicates real-time). The OBA Alexa arrival time for SIM34 should have matched the time in Transit App for this example, as it sounds like they are both providing schedule data.

How can I get real time bus data into OBA Alexa or at least the most accurate data?

Unfortunately I don't think you can get NYC real-time data via OBA Alexa right now - that's the reason the NYC region is still experimental. As I said in https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-635978551:

The big question is if accurate real-time arrival information is available for NYC. Long story (more info at #92, OneBusAway/onebusaway-android#768), NYC didn't originally support real-time arrival times, so only schedule info would be returned by their OBA server - this is why they are listed as an "experimental" region.

The above may have changed since I last worked on this, so I'd love to get feedback from you if it seems to work well and give you accurate real-time arrival info!

I'm curious if any stops/routes have real-time data in NYC in OBA Alexa. If not, I don't think there is anything as a user you can do to change this, other than ask MTA to provide real-time arrival times in OneBusAway the same way other regions are.

marcusraylewis commented 4 years ago

My preliminary research seems to indicate that MTA Bus Time supports GTFS real time data. Please see the following links. https://bustime.mta.info/wiki/Developers/GTFSRt

What is not very clear is the relationship of the OBA Restful API especially concerning Real Time. and getting real time data to OBA Alexa. See https://bustime.mta.info/wiki/Developers/OneBusAwayRESTfulAPI and https://github.com/OneBusAway/onebusaway-application-modules/wiki/RESTful-API-Roadmap

barbeau commented 4 years ago

OBA Alexa uses the regional OBA servers defined in the Regions API: http://regions.onebusaway.org/regions-v3.json

Each of these servers are maintained by the local transit agency, which means that MTA NYC maintains the NYC server - the same server(s) that backs https://bustime.mta.info/ (the address is actually the same).

MTA was the first OBA deployment outside of Puget Sound, and in the process they forked the code and changed a few things. Historically MTA NYC didn't publish arrival times, just "distance to stop" (some mention of this here - https://bustime.mta.info/wiki/Developers/SIRIIntro), although that's since changed. The also chose to initially support SIRI as the real-time RESTful API instead of the real-time OBA Restful API - they do expose the OBA API now, but https://bustime.mta.info/wiki/Developers/OneBusAwayRESTfulAPI says:

The primary modification is to exclude all real-time data, which in the context of MTA Bus Time should come from the standards-based SIRI API.

tl;dr things have changed over time, and I can loop back to MTA again and see if supporting real-time info via the OBA Restful API is on their roadmap now.

It may be possible to set up your own OBA server and input the MTA GTFS and GTFS-realtime data - I assume that would work given that they are now publishing GTFS and GTFS-RT data. But it seems kind of silly to do that when MTA is already running one of their own.

I'll ask MTA and see what they say.

marcusraylewis commented 4 years ago

Mr. Barbeau,

I am following up on our last discussion to see if you were able to get the real time feedback that you were seeking from the MTA.

Marcus

On Thu, Jul 9, 2020, 6:06 PM Sean Barbeau notifications@github.com wrote:

OBA Alexa uses the regional OBA servers defined in the Regions API: http://regions.onebusaway.org/regions-v3.json

Each of these servers are maintained by the local transit agency, which means that MTA NYC maintains the NYC server - the same server(s) that backs https://bustime.mta.info/ (the address is actually the same).

MTA was the first OBA deployment outside of Puget Sound, and in the process they forked the code and changed a few things. Historically MTA NYC didn't publish arrival times, just "distance to stop" (some mention of this here - https://bustime.mta.info/wiki/Developers/SIRIIntro), although that's since changed. The also chose to initially support SIRI as the real-time RESTful API instead of the real-time OBA Restful API - they do expose the OBA API now, but https://bustime.mta.info/wiki/Developers/OneBusAwayRESTfulAPI says:

The primary modification is to exclude all real-time data, which in the context of MTA Bus Time should come from the standards-based SIRI API.

tl;dr things have changed over time, and I can loop back to MTA again and see if supporting real-time info via the OBA Restful API is on their roadmap now.

It may be possible to set up your own OBA server https://github.com/OneBusAway/onebusaway-application-modules#getting-started and input the MTA GTFS and GTFS-realtime data - I assume that would work given that they are now publishing GTFS and GTFS-RT data. But it seems kind of silly to do that when MTA is already running one of their own.

I'll ask MTA and see what they say.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-656373892, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GJHMHCORL2NOZTQR53R2Y5ORANCNFSM4NNU52SA .

barbeau commented 4 years ago

@marcusraylewis I talked to MTA and they are looking into changing their system to publish this data. No promises or ETA yet, but feel free to ping me in a few more weeks if you don't hear anything.

marcusraylewis commented 4 years ago

Thanks for the prompt response.

Marcus

On Wed, Aug 5, 2020, 6:14 PM Sean Barbeau notifications@github.com wrote:

@marcusraylewis https://github.com/marcusraylewis I talked to MTA and they are looking into changing their system to publish this data. No promises or ETA yet, but feel free to ping me in a few more weeks if you don't hear anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-669548531, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GLX75NHDH4W7FS2FADR7HKVRANCNFSM4NNU52SA .

marcusraylewis commented 3 years ago

Mr. Barbeau,

I am following up from our last conversation any updates are appreciated.

Marcus

On Wed, Aug 5, 2020, 6:14 PM Sean Barbeau notifications@github.com wrote:

@marcusraylewis https://github.com/marcusraylewis I talked to MTA and they are looking into changing their system to publish this data. No promises or ETA yet, but feel free to ping me in a few more weeks if you don't hear anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-669548531, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GLX75NHDH4W7FS2FADR7HKVRANCNFSM4NNU52SA .

barbeau commented 3 years ago

Thanks for following up. It isn't something MTA is currently working on, but it's something they would like to pursue in the future. Unfortunately I don't have an exact timeline.

marcusraylewis commented 3 years ago

Greetings Sean,

I am following up. Is there any way that we can nudge the MTA to make the desired change?

Marcus

On Tue, Sep 22, 2020, 5:17 PM Sean Barbeau notifications@github.com wrote:

Thanks for following up. It isn't something MTA is currently working on, but it's something they would like to pursue in the future. Unfortunately I don't have an exact timeline.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-alexa/issues/123#issuecomment-696985590, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYH6GN2PM25T3B4PJ4FQ43SHEHSPANCNFSM4NNU52SA .

barbeau commented 3 years ago

@marcusraylewis Thanks for following up. The last response I got from them is that they're interested, but with COVID-19 issues it's (understandably) not a priority at this time.

I'd encourage you or anyone else that's interested to reach out to MTA directly at MTABusTime@mtahq.org and request that they "support real-time information via the OneBusAway REST APIs" so that OneBusAway Alexa, Android, and iOS will work with the MTA's servers. I'm sure they will record the feedback and when things aren't in such a critical state they'll have the evidence they need that customers want this to make it happen.