MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-PublicTransportHafas – Public transport information for all stations known to Deutsche Bahn

    Scheduled Pinned Locked Moved Transport
    transportdeutsche bahn
    42 Posts 13 Posters 35.7k Views 13 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      djsunrise19 @raywo
      last edited by

      @raywo Done!

      Another topic is your reference to query_stations.js. In your readme you’re talking about the query_station.js ;).

      1 Reply Last reply Reply Quote 0
      • K Offline
        Klinge
        last edited by

        Hi,
        unfortunately I have some problems with the module. When my MM started, the module will not be loaded. There is only the message “Loading…”. Other modules will be loaded.

        I configured the module as follows.

        {
          module: "MMM-PublicTransportHafas",
          position: "bottom_left",
         
          config: {
            stationID: "008000152",                   // Replace with your stationID!
            stationName: "Hannover Hbf",   // Replace with your station name!
         
            direction: "",                    // Show only departures heading to this station. (A station ID.)
            ignoredLines: [],                 // Which lines should be ignored? (comma-separated list of line names)
            excludedTransportationTypes: [],  // Which transportation types should not be shown on the mirror? (comma-separated list of types) possible values: StN for tram, BuN for bus, s for suburban
            timeToStation: 10,                // How long do you need to walk to the next Station?
            timeToStation: 60,
            timeInFuture: 10,                 // Show departures for the next *timeInFuture* minutes.
        
            showColoredLineSymbols: false,     // Want colored line symbols?
            useColorForRealtimeInfo: true,    // Want colored real time information (timeToStation, early)?
            showTableHeadersAsSymbols: true,  // Table Headers as symbols or text?
            maxUnreachableDepartures: 3,      // How many unreachable departures should be shown?
            maxReachableDepartures: 7,        // How many reachable departures should be shown?
            customLineStyles: "leipzig",      // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
            showOnlyLineNumbers: false        // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
          }
        },
        
        

        I would be really grateful, if you could help me.

        Thank you.

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          raywo Module Developer @Klinge
          last edited by

          @Klinge The problem lies in your settings. First you listed timeToStation twice. The last setting will apply which is 60. Next you state that you only want to see departures within the next 10 minutes (timeInFuture). That will lead to only unreachable departures. Of course it is a bug that the module crashes. I will fix that with the next update.

          But for now you can bring your mirror to work if you set timeInFuture to a higher value. Maybe you should use 60. That way the module has enough departures to choose from.

          1 Reply Last reply Reply Quote 0
          • K Offline
            Klinge
            last edited by

            Damn it! So a Layer 8 problem ;-) Now it works. Thank you, for your quick help.

            R 1 Reply Last reply Reply Quote 1
            • R Offline
              raywo Module Developer @Klinge
              last edited by

              @Klinge There is now also an update available which will prevent this “layer 8 problem“. ;)

              1 Reply Last reply Reply Quote 0
              • D Offline
                djsunrise19
                last edited by djsunrise19

                @raywo In my config i set maxUnreachableDepartures: 2,, timeToStation: 15, and timeInFuture: 90, . This morning (8:00 o’clock) there were two trains within maxUnreachableDepartures. 7:54 +0, and 8:05 +2. I think the 7:54 shouldn’t be there. Yes, the train is unreachable (15), but he is gone already :).

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Klinge
                  last edited by

                  @raywo
                  Thank you. Now it can be configured by someone like me ;-)

                  1 Reply Last reply Reply Quote 1
                  • P Offline
                    pinsdorf Module Developer
                    last edited by

                    Thanks, @raywo Works like a charm. Well done also w.r.t documentation, the convenience script for retrieving stationID, and customization! Awesome work.

                    1 Reply Last reply Reply Quote 1
                    • I Offline
                      Iseknutz
                      last edited by Iseknutz

                      @raywo Thank you for the module! It works great. Since I used the MMM-PublicTransportDB and there I had some issues with delay-calculation and excluding from busses. But here everything is working fine. Thanks a lot!

                      1 Reply Last reply Reply Quote 1
                      • O Offline
                        onkelbobby
                        last edited by

                        Thanks also from my side… this is exact the module I was looking for. Is there a way to change the “STR” into “Tram”? Thanks for your help.

                        R 1 Reply Last reply Reply Quote 1
                        • R Offline
                          raywo Module Developer @onkelbobby
                          last edited by

                          @onkelbobby If your mirror displays "STR" your transport provider sends it that way.

                          One way to suppress that would be to set the option showOnlyLineNumbers to true and providing a custom css file with a rule like so:

                          .str11:before {
                            content: "Tram ";
                          }
                          
                          1 Reply Last reply Reply Quote 0
                          • O Offline
                            onkelbobby
                            last edited by

                            @raywo said in MMM-PublicTransportHafas – Public transport information for all stations known to Deutsche Bahn:

                            .str11:before {
                            content: "Tram ";
                            }

                            works perfectly…
                            thank you for the prompt support :-)

                            1 Reply Last reply Reply Quote 1
                            • O Offline
                              onkelbobby
                              last edited by

                              Hi there,
                              while configuring this awsome module another question came up. is there an way to get rid of the city name being displayed behind the final destination of e.g. the bus? In my configuration I want to remove “München”.
                              0_1519375568336_directions.jpg

                              Thanks in advance…

                              R 1 Reply Last reply Reply Quote 1
                              • R Offline
                                raywo Module Developer @onkelbobby
                                last edited by

                                @onkelbobby I’ve made an update to the module. It is now possible to provide key-value pair which are used to replace strings in the displayed directions. Use the option replaceInDirections. For more information see the documentation.

                                1 Reply Last reply Reply Quote 0
                                • O Offline
                                  onkelbobby
                                  last edited by

                                  @raywo Thank’s… best support ever :-)

                                  1 Reply Last reply Reply Quote 1
                                  • V Offline
                                    Vauxdvihl
                                    last edited by Vauxdvihl

                                    @raywo
                                    Thanks for this great module
                                    Today here in munich we had absolutly chaos with regards to the “sbahn” here.
                                    I was wondering that the modules displays me…everything is ok.

                                    So i have been checking the stations from Start Starnberg to End Munich.
                                    But in the morning (and also till now) the end will be never reached by “sbahn” because of big problems.
                                    Isnt there a possibilty to check if there are some problems by the choosen start-to-end connection?

                                    Thanks a lot

                                    R 1 Reply Last reply Reply Quote 0
                                    • E Offline
                                      E3V3A
                                      last edited by

                                      @raywo Great Looking module, very professional!

                                      "Everything I do (here) is for free – altruism is the way!"
                                      MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                                      1 Reply Last reply Reply Quote 1
                                      • R Offline
                                        raywo Module Developer @Vauxdvihl
                                        last edited by

                                        @Vauxdvihl Unfortunately I can’t do anything about this. Obviously MVG or DB didn’t update their data accordingly.

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          jimjay203
                                          last edited by

                                          Hey @raywo, is this module able to show cancelled trains?

                                          R 1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            raywo Module Developer @jimjay203
                                            last edited by

                                            @jimjay203 Actually I don’t know. But I know for sure that the module displays just the data which are given to the HAFAS system. If your provider delivers such information then it would be possible to display them.

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy