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 28.1k 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.
    • R Offline
      raywo Module Developer
      last edited by yawns

      Description

      I just finished my latest module. It can be used to display departures from a station near you.

      The module uses data from the HAFAS system which is fed by nearly all transportation providers in Germany. Most providers even provide real time information on the departures. As far as I know and read this system is used also in many other European countries especially Switzerland and Austria. So give it a try if you located there.

      It is possible to use this module to display local transport departures like tram or bus or regional and national transport departures.

      Screenshots

      departures from Leipzig Main Station

      regional and national departures from Leipzig Main Station

      Download

      [card:raywo/MMM-PublicTransportHafas]

      R rudibaraniR 2 Replies Last reply Reply Quote 2
      • R Offline
        raywo Module Developer
        last edited by raywo

        It is now possible to display the departure time in absolute (like 18:02+3) or relative (in 7 minutes) format via showAbsoluteTime. Furthermore you can reorder the columnOrder via tableHeaderOrder;

        Leuschner Platz, Leipzig (displaying departure times in relative format and reordered columns)

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

          Hi! Great module. There seems to be a problem with the output (product type “RB” twice). Perhaps you can check that:
          0_1519065090416_Bildschirmfoto 2018-02-19 um 19.29.00.png

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

            @djsunrise19 Can you please open an issue in the GitHub repository and provide there information on your used stationID?

            D 1 Reply Last reply Reply Quote 0
            • 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
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 1 / 5
                        • 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