deg0nz / MMM-PublicTransportBerlin

MagicMirror module to display public transport in Berlin and Brandenburg with BVG Hafas data.
MIT License
40 stars 20 forks source link

Departures not shown in order #38

Closed der-eismann closed 6 years ago

der-eismann commented 6 years ago

Hey, thank you for the great module!

However I just setup a new instance and have some problems with the order of the departures shown (picture was taken at 12:10): bildschirmfoto vom 2018-09-12 12-09-56

As you can see the U5 at 12:20 is shown as unreachable, although I set 5 minutes as travelTimeToStation and then there is the U5 at 12:10 shown as reachable, which would require running at the speed of light. Last but not least one departure at 12:10 managed to get down between the departures at 12:15 and 12:20.

It's a bit hard to describe in words, but should be clear once you see the picture. Any idea what I can do to debug? Or give you more information?

$ node -v
v8.11.4
$ cat config/config.js
...
        {
            module: "MMM-PublicTransportBerlin",
            position: "top_right",
            config: {
                name: "Strausberger Platz",
                stationId: "900000120006",
                hidden: false, 
                travelTimeToStation: 5,
                //interval: 120000,
                departureMinutes: 20,          
                //maxDepartures: 15,
                marqueeLongDirections: false,
                //showColoredLineSymbols: true,  
                //useColorForRealtimeInfo: true,
                showTableHeaders: false,
                //showTableHeadersAsSymbols: true,
                maxUnreachableDepartures: 1,    
                maxReachableDepartures: 12,
                fadeUnreachableDepartures: false,
                fadeReachableDepartures: false,
                excludeDelayFromTimeLabel: false
            }
        },
...
deg0nz commented 6 years ago

hmm... This is indeed weird behaviour.

Do you still encounter this issue? Or was it a one time thing?

der-eismann commented 6 years ago

I'm still encountering it, one departure is always sorted too low (here between 08:17 and 08:21). However I noticed that this doesn't happen at night, when there are only 5-6 departures. Is the listing sorted by your module or do you use the order provided by the BVG?

screenshot_2018-09-17-08-03-51-1

deg0nz commented 6 years ago

I think I fixed the error with ccd3a84.

After a change in the sorting some time ago, I forgot to actually compare the times of the departures. Instead, I was comparing the whole departures object 🤦‍♂️. But it seemed to work most of the time though...

@der-eismann Could you please pull the current version of the module and verify if this works for you?

ferby09 commented 6 years ago

Had the same issue the since one of the last commits but it's fixed for me now. Thanks again!

der-eismann commented 6 years ago

I can also confirm that it's fixed, thanks for your work!