Show HN: When is the next Caltrain? (minimal webapp) (erikschluntz.com)

42 points by eschluntz ↗ HN
I was frustrated with the existing caltrain websites / apps, so I made a super minimalist one to answer the actual question I have: how long until the next train?

If you're in SF it grabs the next southbound trains, otherwise, the next northbound.

15 comments

[ 3.5 ms ] story [ 40.2 ms ] thread
(comment deleted)
I am not in the area so I had to click on the thing to view all schedules, I would say it is super slick, I like it.
The public transport service in Hannover/Germany once had a screensaver that you could configure to show the next departure from your nearest station. I thought that was clever marketing. Today you probably could implement this as a web service.
Thanks, this'll be a nice little timesaver!
Very cool. Would be good if it also shows whether it's a local train or limited or express, and/or which stations it stops at.
haha nice, the official caltrain schedule is a bit of a hassle to parse...
Closest station: San Francisco

But there are two SF stations

app hard dies if it's unable to get your location. was really expecting the "full schedule" link to show an input box to pick a station
While cool, this does not incorporate real-time data, just the static schedule.

I've explored this--you need 511 API access to obtain real-time data, and to conceal your API key you need to stand up a web application.

Cool proof-of-concept, need to take it to the next level!

I have a command line app for this somewhere I wrote a few years back when I was commuting on Caltrain a lot, I should dig it up and publish it. It had some extra pathfinding/fuzzy search stuff. I almost always have my bike with me and I wanted to cover the edge cases where it's faster to bike to a nearby station to catch a bullet or where you can take a train the wrong direction a stop or two for the same purpose.

I wish there a maps app that would build entire itineraries taking into account that you have a bike with you, and ideally your average expected biking speed. It's so annoying to plan any sort of multi-transit itinerary in the bay, you always have to piece things together yourself or get stuck with some nonsense that takes 30% longer than it needs to.

Of course all of this could also be resolved if we had a sane transit system with short intervals.

I've been looking into doing this as a Home Assistant integration so I can put it in a little dashboard by the door. Can you describe how you built this a bit more? It's exactly the kind of data that should be easy to grab, but isn't.
I like how simple and minimalist this is!

Another great similar solution is the Caltrain Companion iOS app. The main screen I use is "Arriving Trains" which uses your current location to tell you when the next trains arrive in each direction, how far along they are on their route, etc. The data is realtime.

(comment deleted)
What was the prompt and how are you hosting it? :)