Skip to content
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

directionStationId not working #39

Closed
ferby09 opened this issue Sep 13, 2018 · 10 comments
Closed

directionStationId not working #39

ferby09 opened this issue Sep 13, 2018 · 10 comments

Comments

@ferby09
Copy link

ferby09 commented Sep 13, 2018

First of all thank you again for your hard work in cooperation with @derhuerst and making this module usable again.
Unfortunately I can't get the directionStationId to work like it did with vbb-rest. The IDs are the same with bvg-rest, but it isn't working as I can still see the lines in the other direction.
Is this an issue in bvg-rest?

@deg0nz
Copy link
Owner

deg0nz commented Sep 13, 2018

AFAIK the directionStationId option had a bug/was not working some time ago... I think it was an issue on the HAFAS-side, but I'm not so sure.
I don't know if this is fixed yet. Maybe you could dig into vbb-client or hafas-client issues and look for it. I remember I saw an issue about that somewhere there.

@ferby09
Copy link
Author

ferby09 commented Sep 13, 2018

Thank you for your quick response, I'll have a look. But I can't remember having issues with it when you were still using the vbb-client.

@derhuerst
Copy link

vbb-client doesn't work right now, because 2.vbb.transport.rest is offline.

I have set up 1.bvg.transport.rest though, which has a very similar return format. From what I can tell, the direction parameter works there:

https://1.bvg.transport.rest/stations/900000013102/departures?direction=900000014101&duration=1

@deg0nz
Copy link
Owner

deg0nz commented Sep 14, 2018 via email

@deg0nz
Copy link
Owner

deg0nz commented Sep 16, 2018

Commit 6319c45 should fix this issue. The code used the old nextStation parameter which was changed to direction I think.

@ferby09 Could you please check if this works for you and close the issue afterwards?

@deg0nz
Copy link
Owner

deg0nz commented Sep 16, 2018

As I'm playing around a little bit... nextStation still gives answers.. and the amount of returned station differs from direction.

@derhuerst: What is the difference between these two?

@derhuerst
Copy link

It's an obscure technical one: direction uses a HAFAS parameter and therefore returns whatever HAFAS understands by "in direction"; nextStation uses hafas-departures-in-direction, which queries enough departures and then filters those that actually pass by the stop/station.

I don't know exactly which is the better one. I have also forgotten wether all HAFAS endpoints support the direction parameter (then nextStation should be used), but BVG does AFAIR.

So please play with direction, using a few edge cases:

@deg0nz
Copy link
Owner

deg0nz commented Sep 19, 2018

@ferby09 Any updates?

@ferby09
Copy link
Author

ferby09 commented Oct 1, 2018

I'm sorry for my late reply but I was kind of busy because my Magic Mirror's power supply was malfunctioning so I couldn't test it until now.
It works perfectly fine now, thank you very much!

@ferby09 ferby09 closed this as completed Oct 1, 2018
@derhuerst
Copy link

Please document your findings here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants