Hacker News new | ask | show | jobs
by kevan 2522 days ago
Pretty cool. When I took the train to work I made a simple stop-light with transit data. Trains ran every 10 minutes and it took me a few minutes to walk to the station. Green meant I could definitely catch the next train. Yellow meant I'd make it if I walked fast, and red meant I'd miss this train and need to wait for the next one.
5 comments

I also found that a binary notification is all I needed. I just want to know if everything is running OK or if there are delays. So I built this a few years ago: https://unop.uk/train-disruption-indicator-with-a-blinky-tap...
:-) I use reactube everyday. It is permanently open on my desktop and also as a home screen shortcut on the phone. :+1:
Cheers, nice to know it's appreciated. Someone actually asked me to change it to say "Good Service" the other day! Whoosh...

There is a ~mirror at https://unop.uk/tube/ in case CloudFlare go down. Although as I discovered recently, this doesn't help as the API runs on them too! There's another API I could use as a backup but it's not as good.

For the curious: https://reactube.com/

I made something similar when I was in uni and had to catch a bus to get back home, but with my Pebble and a C application: next bus was one button press away and another press was all was needed to start a carefully calibrated double alarm for "start packing" and "leave" times
Is there any option right now as hackable as the Pebble? I'm not sure how I would build something like this right now that the Pebble is gone.
Not that I know of, sadly. Pebble was a jewel :(
Curiously, I've made almost this exact same thing. In my case it needs to account that some platforms are a couple minutes extra walk.

Given that we've both independently implemented basically exactly the same thing, I wonder how many other people would want something like this.

Idk where you live, but it ain’t Boston.
Rather than show red, why not show the next train you could actually catch?

A bit more glass half full, and reduces the light count by 33%!

I was using a physical RGB LED so there wasn't much extra bandwidth for conveying information. I live in a cold climate so green really meant "Leave now and you'll only have to wait in the cold at the stop for 2-3 minutes". Here's the code if anyone's interested[1]. Looks like my memory wasn't quite right, I did blue/green/red with blue=wait, green=leave, red=missed.

[1] https://gist.github.com/kevana/32bfa486d9fb0aa20a19694d1b69d...

Ah ok, I envisioned a screen with train info and a traffic light.
I went that route: https://jrock.us/mta.html

Much better than the MTA's website... though slightly less useful if you're not me commuting to work.

What I learned from this exercise is that:

1) The estimates are consistently inaccurate; downtown trains at Chambers St. always arrive when the clock says "2" (minutes until arrival).

2) They use some sort of distributed cache that doesn't remain consistent; as you bounce between backend instances you get different results, but often the same two results. (The red/green lines under the station names indicate freshness.)

3) The clocks in the stations don't work when it's too hot, but the actual data collection/processing is fine.

That's interesting. Worked on a service based on TFL (London) data, and they were incredibly picky about ensuring people would not get misled by signage. Of course sometimes there are tradeoffs, but they had extensive rules to ensure the tradeoffs minimised negative experiences. E.g we had to take any buses off the boards if the data was more than x seconds old, never ever allow enough clock drift or other issues to cause our displays to be off by more than a certain amount, clear the whole display if we got no api response within a certain amount of time etc.

It was very annoying to implement, but as a user it is very nice to know how much thought has gone into it.

This is pretty awesome - I like how simple yet informative the design is. Do you have a license on the underlying code?