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.
Show HN: When is the next Caltrain? (minimal webapp)
21–30 of 31 posts
Re: Show HN: When is the next Caltrain? (minimal webapp)
#22Re: Show HN: When is the next Caltrain? (minimal webapp)
#23While 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!
GTFS-RT data isn't a lot of fun to work with directly, though, so I'd recommend that you use an intermediary like OneBusAway (OBA) to interpret the data and give you a nicer to use API.
You can find more about OBA here: https://onebusaway.org
and our GitHub organization is here: https://github.com/onebusaway
Our docker images repo has pretty good docs about running a server: https://github.com/OneBusAway/docker
And the SDKs can all be found here: https://developer.onebusaway.org/api/sdk
(n.b. I've been a volunteer on the project for years and am currently serving as the part time exec director of the nonprofit behind OBA.)
Re: Show HN: When is the next Caltrain? (minimal webapp)
#24I 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…
Re: Show HN: When is the next Caltrain? (minimal webapp)
#25I'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.
copy and pasted into a spreadsheet from the website, then claude wrote a little script to convert it into js
Re: Show HN: When is the next Caltrain? (minimal webapp)
#26haha nice, the official caltrain schedule is a bit of a hassle to parse...
Re: Show HN: When is the next Caltrain? (minimal webapp)
#27Re: Show HN: When is the next Caltrain? (minimal webapp)
#28haha nice, the official caltrain schedule is a bit of a hassle to parse...
https://caltrain.live is pretty nice (I developed it, along with the Caltrain Companion iOS app)
Re: Show HN: When is the next Caltrain? (minimal webapp)
#29I 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…
Does Transit[1] not do this? It suggests routes including walking and biking when I input my destination... 1. https://transitapp.com/
Re: Show HN: When is the next Caltrain? (minimal webapp)
#30Very 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.
bullet trains should be displayed in red, but I haven't tested it yet at the right time and I've been too lazy to write tests with mocked time / gps :)