RTI Anywhere

Real Time Information for Wellington Buses, Fast

Some years ago now Metlink (the brand under which Wellington Regional Council runs its public transport) introduced electronic Real Time Information signs at train stations and at many bus stops. Displays like these are invaluable, in Wellington as elsewhere, for transit users to know when their ride is actually going to show and not just its schedule printed at the stop.

Unfortunately coverage at bus stops outside of the Wellington CBD itself is very patchy. Metlink does have an app and website which will give this info, but they are very slow for this simple job and unfortunately my phone is a cheap android and not at all powerful. A new site and app are on their way, but I got frustrated the other day and decided to build my own.

As a source of data I used the API that Andrew Lensen tried to OIA for documentation about. The response to that request also revealed that Metlink is creating a proper OpenData API, but in the meantime that doesn’t work either and so I’ve wrapped a python Flask app around the undocumented API instead.

Surprisingly, it works.

RTI Anywhere as seen in my phone

The app (which is really a website, but you can put rti.petras.space on your phone home screen and pretend it’s a real app) works by allowing the user to quickly enter the four-digit stop number on the sign in front of them and immediately get up-to-date information. These pages can also be bookmarked in your browser.

The API requests happen at the server end, which isn’t ideal and means that if a lot of people use this it will probably knock my server over very quickly. What I hope however is that helps Metlink realise that they don’t need a fancy app, they need a fast and reliable one. That lack of JavaScript does mean one cool thing though: even things like ereaders can use this site, provided they have access to the internet!

RTI Anywhere on my Kindle

(Did you know Kindle Paperwhites can take screenshots? Touch the top left and bottom right corners simultaneously and the screen will flash, leaving an image file available when you connect it to your computer.)

I’ve released the source code under the GPL: I’m not trying to make money from this, and there are no ads or tracking. All I want is to know when the bus is going to be here.

Special thanks to Moss for helping prod me to do this, and Mark Hanna for teaching me a trick for making websites display better on mobile.

File under:

Tags: