(the -> means estimate based on gps data from the bus, * means scheduled time)
A while a go TriMet opened up several APIs to let people access its Transit Tracker data. Since the bus on our route is rarely on time its always nice to know if you can relax and eat your breakfast or if you have to bolt out the door. It seemed like having access to the arrival times without either a full computer or starring at the phone would be a good thing.
The apis are documented at http://developer.trimet.org/ Its basically a pile of XML that you ask for with a url like this
http://developer.trimet.org/ws/V1/arrivals/locIDs/7536/appID/EC36A740E55BB5A803BB2602B
you could also call the same url like this.
http://developer.trimet.org/ws/V1/arrivals?locIDs=7536&appID=EC36A740E55BB5A803BB2602B
Some where in the resulting pile is the data are a couple of arrival times.
<arrival block="7514" departed="true" dir="1" estimated="1346270336000" fullSign="75 Chavez Blvd to Milwaukie" piece="1" route="75" scheduled="1346270214000"shortSign="75 To Milwaukie" status="estimated" locid="7536" detour="true">
Now thats not exactly a pretty thing but its parse-able. Fortunately for us we don’t have to deal with it yet. Because a fellow portlander Dan Colish has published some python to do exactly what we need to do https://github.com/dcolish/PyMET/blob/master/pymet/pymet.py
So now with a little hacking we put a serial lcd on our maple-bacon and have it forward all serial from the usb port to the display.
Since the lcd requires 5 volts we plug its power into the maple-bacon’s vin and then we connect its serial rx line to tx3. Then we mangle Mr Colish’s code until it works.
Of course this morning when I went to actually use. it.
The next step will be to get the python and the maple bacon onto the pogo plug.
The step after that will be to hook the maple directly to the internet using ethernet.
Russell Senior
A suggestion: it is easy to get distracted by screens, reading something else. Use audio cues (beep, then beep with increasing frequency as temporal urgency increases) to bracket the times you should start putting on your shoes and gathering your things, and when you need to be out the door.
feurig
I think the like a clock with no distractions is our goal.
However that is something to consider.
Michael, Portland Afoot
Awesome! Also see Chris Smith’s commercial-grade but similarly cheap-for-its-class and simple Transit Appliance, if you’re interested.
sales site
development site
feurig
Michael,
Seems like there are a few people building products around the awesome service provided to us by trimet.
I wound up doing this http://www.suspectdevices.com/blahg/electronics/making-due-with-what-you-have/ and am really happy with it.
Plan to do two other similar hacks (livingroom/garage) with more info like weather and current temp.
Thanks.
Don.