-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data is missing for profile "Deutsche Bahn" #21
Comments
I'm having the same issue. |
I just checked, and I also have the same issue... It seems to be affecting DB only. |
same issue here... |
same |
Seems there is a API Problem. |
Hmm. Their front-end warning commit is commented with "Warning as mgate.exe was shut down". I think, pyhafas also uses mgate. So, I think, this will need upstream fixing... |
@akloeckner That's unfortunate to read, but thank you for diving deeper. |
It seems like they solved the issue: https://gitlab.com/bahnvorhersage/bahnvorhersage_frontend/-/commits/main |
Unfortunately I don't find any hint what they did, the commit just removes the banner and the other repo has also no commit changing anything relevant... |
Me neither... But found something on another repository about the vendo client: https://github.com/emmaboecker/railboard-api Here is the commit: |
Reading the docs of that repo shows that it has three endpoints implemented, none of them was the mgate stuff, there is iris, ris and vendo, also explained which one is good for what. It seems the structure of vendo changed recently so there had to be some adjustments. Question is, is there a ready-to-use python lib for one or all of these APIs especially with the needs of this project... |
Ok after some research I found the best starting point is DB API Marketplace. Doing a code search on Github with "apis.deutschebahn.com" you find some code accross multiple projects and languages. As far as I can tell there are and have been several systems for getting the information but RIS seems to be the only real supported one. But complete RIS is not public and costs money. There is one "public" API accessible: "Timetables", which should give the needed information but you still have to register with DB, the best project I found with some documentation how to do this is Deutsche Bahn API. In the search result you also find projects with the needed keys which should not be public so... So IMHO "Deutsche Bahn API" could be used as a base but I don't think it does fit this project as all other clients are also mgate based and a new "DB Departures" component should be developed but which will then reuiqre each user to register their own account with DB. There are other components which require something similar so... |
That's what they're doing over at the deutschebahn integration: FaserF/ha-deutschebahn#60 |
Ahh that is where I initially came from, used the core component until banned because of web-scraping then the custom but was unreliable so switched to yours... |
They moved their backend integration to https://github.com/public-transport/db-vendo-client/pkgs/container/db-vendo-client The changes are not in the frontend but in the backend - that's why you don't see it in the repository above. Please check here: https://gitlab.com/bahnvorhersage/bahnvorhersage Cheers! |
Found a easy solution for VVS in Stuttgart. There is a Web-Service (https://www.vvs.de/services/efaaufhp/). I integrated the service with a ifram-card.
Works for me. |
So, it appears the DB HAFAS endpoint will likely stay shut down, as the DB mobile apps use a different API now. Some relevant links can be found in the upstream issue: FahrplanDatenGarten/pyhafas#51 (comment). There is also a first hint, what might need to be done to enable the new "vendo" API in pyhafas. I am afraid, this is more than I am able to do myself, currently. So, unless we find a volunteer to fix pyhafas (or create a new library to replace it), the DB profile will likely stay broken. 😞 |
I am not sure how db-infoscreen fetches the data from DB (havent had a look into the source code, but it's still based on HAFAS), but it works great. I have published a new Homeassitant Integration using this. Maybe the data source can also be interesting for this project. |
Thank you for this integration, for anyone interested, I build a template sensor which gives the information for a destination in the format "HH:MM +DELAY", here is the code: Note: you need to change the to the one you wand and is available in the attributes of the sensor. |
Since today at roughly 11:20 (CET) Hafas is not able to pull any data from the profile "Deutsche Bahn". Existing entities just show "unknown".
If I try to create a new entity, I always get the error "invalid_station" no matter which stations I'm trying.
Looking at the logs, I can only see this line which seems to be related (note: I removed the name of the stations):
2025-01-08 11:23:50.357 WARNING (MainThread) [custom_components.hafas.sensor] Couldn't fetch journeys for sensor.[xxx]_to_[xxx]: Expecting value: line 1 column 1 (char 0)
Let me know, if you need any more details.
The text was updated successfully, but these errors were encountered: