Track Trimet on your iPhone

Recently I started riding the bus again full time…if not to save the environment, but to save my nerves from dealing with traffic. After a few days I was reminded about one of the things that bothered me about riding the bus: I hated not knowing exactly when the next bus was going to arrive.

This time around I have my iPhone, so I am able to use the tracker on Trimet.org to see when the next bus came. Except it was really difficult to use on such a small screen. I was able to find out when the next bus came, it took me 2-3 minutes to do it.

So I decided I was going to write an iPhone app to do the same thing, but with a much simpler and easier to use interface. At first I was just going to scrape the Trimet site to get the information. But then I came to find out that Trimet actually has a really nice API to all their tracking information!

So I present to to you the Trimet Tracker, an iPhone app that allows you to easily find out when the next bus is going to arrive at your stop. Just enter your Stop ID and you’ll get a list of all the arriving buses (or MAX or Street Car), what time they will be showing up, and how long you have to wait. If you don’t know your Stop ID, you can also do a quick search by picking a route and selecting from all the stops on that route.

To make it even easier, you can also save any stop to your favorites list so you don’t have to enter a Stop ID or search for your stop again. Just hit ‘Favorites’ and select which stop you saved.

Obviously this tool isn’t for the masses…how many people are riding Trimet with an iPhone? Even if no one uses it, this tool has already saved me the a couple times from missing a bus. That’s worth the whole 4 hours it took me to develop it.

For the technically inclined, Trimet Tracker was built using the Camping microframework, IUI for the interface, and a few lines of custom Javascript.

One final thought: I now firmly believe that Portland is the geekiest city on the west coast. Even our transit system has an API.

11 Responses to “Track Trimet on your iPhone”


  1. 1 hazmatt

    Very nice. Now I may have to get an iPhone.

  2. 2 jonno

    It’s cool that you’ve done this, but for all the non-iPhone-owning trimet riding masses (like me), you can get the same functionality by pointing any rinky-dink wireless web browser to trimet.org/wap. I’ve been using it for years but I can’t remember where I first heard about it.

  3. 3 Adam

    This is very nice; one problem with the Trimet PDA/phone version (not WAP) is that it doesn’t specify the width, so I keep having to stretch the transit tracker window out. This is much faster and much nicer to look at.

    Thanks!

  4. 4 Isaac

    This is really nice and extremely impressive. I am proud to live in the geekiest city. Good job dude.

  5. 5 Lee Rimar

    Matt (and Adam:):

    I found a neat trick for web pages that don’t understand the iPhone screen size.

    As long as you have a place to host your OWN page:

    1) Create a page that specifies a frameset of ONE frame
    2) Use the meta viewport item to specify the width of the page
    3) Make the source of the page’s one frame the site you want to keep from resizing.

    Here’s what I mean:

    TRIMET

  6. 6 Lee Rimar

    I see the original comment entry stripped my html coding out. Try this link, it’s my own frame around Trimet’s PDA transit tracker.

    http://lee.rimar.googlepages.com/trimet.html

    If you view the source of that page, you’ll see that it’s really easy to do for any website at all.

  7. 7 Lee Rimar

    Trimet has made this unnecessary. I emailed a suggestion a little over a week ago for them to fix the viewport on the pda pages (and to add a Trimet loog for the iPhone home screen icon) - and it looks like they did so as of this morning.

    If you look at the source of any of their pages, you’ll now find these two lines:

    meta name=”viewport” content=”width=device-width, height=device-height”/

    link rel=”apple-touch-icon” href=”/images/trimet-icon.png”/

    Cool, huh?

  8. 8 LaValle

    Tri-met rider = yes
    iPhone owner = yes
    grateful = yes

  9. 9 Bill Kress

    I love your tracker, use it all the time now.

    I had two feature requests. One I think is a no-brainer, the other isn’t really a feature request but more of a new program along the same lines…

    First of all, when you are viewing a specific time for the next train, I’d like to be able to touch that and see another page with a list of stops and when that train will arrive at each.

    The other is harder…
    I’ve seen programs that will tell you a series of busses/trains to get somewhere… I’d love to have that ability with trimet tracker (Nothing else is really easy to use on the iPhone).

    If I were to put in 2 stop IDs, it could come up with a list of bus/max/trolley lines I would have to take. Times would be nice too.

    This would help me make much better use of the trimet system…

    Even if you don’t have the time to do either, thanks a lot for what you have done! It’s really fantastic.

  10. 10 cwm

    I take TriMet everywhere (I am disabled), and I have an iPod touch (yes, most iPhone applets work on them, also). This is very useful for me. Thanks!

    re: Lee Rimar’s comment on March 6th: it sounds as if the gist is that I should be able to get similar results directly from trimet.org now. But I don’t understand exactly what this entails.

    I’d already tried loading TriMet web pages in my iPod touch’s web browser. However, all the zooming in and out, clicking on tiny links etc. is much more trouble than it’s worth.

  1. 1 » Trimet Tracker for your iPhone - Silicon Florist

Leave a Reply