I thought it was live too, I wonder if there's a way to do that? I like that you can see both the s and u bahn, though I kind of wish the abstract map would carry over.
Thanks a lot for the feedback!! The "live mode" is already developed using hafas-client[1] and VBB-API[2]. I just asked VBB to give me API access, I'll release the feature when I get it.
If you are interested, VBB already made a live map[3]
Do you know about v5.vbb.transport.rest's /radar API [1]? Because it wraps VBB's de-facto-open unofficial API [2][3], it doesn't require authentication or even signing a contract.
If you have problems using it, please get in touch with me!
Hi, I know you! You're hard to miss when working on public transportation. Very happy to see you're looking at my project! I sent you an email.
v5.vbb.transport.rest's frames were missing something I needed, if I recall correctly. With a fork of hafas-client, I got something to work okay. I was going to release it too, but then I realised I should use another user agent than 'my-awesome-program' which only VBB can provide, I think.
> v5.vbb.transport.rest's frames were missing something I needed, if I recall correctly. With a fork of hafas-client, I got something to work okay.
It would be great if you could create an Issue in hafas-client about this, so everyone can benefit from the changes.
> I realised I should use another user agent than 'my-awesome-program' which only VBB can provide, I think
If you're talking about hafas-client: No, you can use anything! It's merely about being transparent towards VBB who/what is using their API, but they don't have to approve it beforehand; They can't in fact, because the "mobile" HAFAS API just uses a static auth token.
Oh okay. Here is an old version of Ubähnchen with the toggle for "live mode / planned mode" on the top right: https://ubahnchen-inona1te6-lzear.vercel.app/?live
The URL parameter still works in the current version by the way.
When I changed 'my-awesome-program' to 'ubahnchen' or something else when creating the hafas-client, it stopped getting valid responses. So I thought I should wait for VBB to give me an ID that works.
> When I changed 'my-awesome-program' to 'ubahnchen' or something else when creating the hafas-client, it stopped getting valid responses.
Please report this as an Issue in the hafas-client repo, so we can discuss this further.
> So I thought I should wait for VBB to give me an ID that works.
This is not how it works:
- The official VBB API is an entirely different API, which they give you an auth token for when you ask.
- hafas-client uses the "mobile" API, which has a static universal auth token. But it sends a (slightly randomised) User-Agent in order to communicate who/what is making requests. It might be that some User-Agents are blocked.
1: https://github.com/public-transport/hafas-client 2: https://www.vbb.de/vbb-services/api-open-data/api/ 3: https://www.vbb.de/fahrinfo/