-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
How to integrate SBB profile? #228
Comments
Hey! What do you want to do? If you explain which data you want to query from the SBB HAFAS API, I can provide more details. Have you seen the small code snippet in the SBB profile? It shows you how to create a Please ask more questions, and let me know what information you were looking for but couldn't find. |
Hi DerHürst Thank you for reaching out. So i‘m in the making of an information Display using Smart Mirror 2. 1st of all there is an InterRegio-line (IR) stopping at my town each hour in each direction. Those aren‘t being picked up by the vanilla hafas-client. After a quick research i found out i‘d have to somehow add this sbb profile to it in order for it to work. 2nd There is a RegioExpress-Line (RE) which is being displayed in full numbers than the conventional „RE“ which SBB refers to. Another User has also opened an issue with a similiar issue-description. I‘d have slight hope that this issue will also be resolved by adding this profile to the hafas-client. The small snippet of code you are referring to couldn‘t help me any further. I tried adding those to various files in the hafas-clients with no succes. I hope this information helps you and would love to hear back from you. Best Regards |
Hello @Nattinger, the original MMM-PublicTransportHafas module only use the db profile. You can't easily switch to other hafas profiles. I recommend to use my fork of this module. Then you can add |
Note that I'm not familiar with the MMM-PublicTransportHafas code base, I just know that it uses hafas-client. @raywo can probably answer specific questions about it.
What do you mean by "not picked up"? Are these trains missing from hafas-client's output? Does it identify them as the wrong product (or means of transport)?
We might have a misunderstanding here. hafas-client supports many different HAFAS API endpoints. Because each one is slightly different, it has one set of customizations per HAFAS API, called profile. There are many profiles, among them MMM-PublicTransportHafas currently uses the If you want to use MMM-PublicTransportHafas with the data of the Swiss Railways, you will have to
If you want to propose changes to hafas-client, e.g. parsing train names/numbers in a smarter way, please open another issue with specific examples. |
@KristjanESPERANTO I assume you forked MMM-PublicTransportHafas because @raywo doesn't want to or can't maintain it anymore. Have you tried contacting @raywo to take over maintenance? |
@Nattinger I'm going to close this issue, as your questions seem to be specific to MMM-PublicTransportHafas. Please reopen if you have more questions about hafas-client usage, or open a new Issue if it's a new topic. |
@derhuerst: Yes, you are right, since @raywo doesn't seem to care about the module, I forked it. At first I didn't want to take over the maintenance, but I changed my mind. I'll try to contact him 🙂 |
(It may be obvious, but I'll say it anyways: You don't have to maintain it up to anyone's expectations. But since you've made improvements in your fork already, why not let everyone benefit from them? 🙂) |
Okay, I looked into it. There is something strange what I can't explain and has nothing to do with the MagicMirror module. I propose to reopen this issue or we open a new one. The sbb profil works fine with the station 'Zürich Kreuzplatz' (ID: 8530813). The problem occurs with the Station 'Thalwil' (ID: 8503202). When I'm asking for departures in the next minute I get a valid answer. Code snipped:
Response:
But when I'm asking for departures in the next 10 minutes I get an error. Code snipped:
Response:
At the moment I have no idea how to continue looking for the cause. |
Hi there. I'm a beginner in Programming so sorry if i don't understand everything :)
Having this said, i've got quite the struggles to integrate the SBB Profile to the hafas-client. Can somone help me?
Best Regards
The text was updated successfully, but these errors were encountered: