Skip to content

MagicMirror² Module to display public transport from Ingolstadt in Germany.

License

Notifications You must be signed in to change notification settings

wiesty/MMM-VGIWiesty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-VGIWiesty GitHub license

MagicMirror² Module to display public transport from Ingolstadt in Germany.

Dependencies

Installation

  1. Clone this repository in your MagicMirror installation into the folder modules. git clone https://github.com/wiesty/MMM-VGIWiesty.git
  2. Install dependencies in main MagicMirror folder
  3. Search your station and modify the config template below
  4. Add configuration to your config.js

Config

{
    module: "MMM-VGIWiesty",
    position: "top_left",
    config: {
        maxEntries: 5,               // Maximum number of departures to display
        station: "IN-ZOB",           // Station name
        overwriteIP: false,          // Use a custom URL and port if needed
        customURL: "",               // Custom base URL for CORS, if overwriteIP is true
        customPort: ""               // Custom port for CORS, if overwriteIP is true
    }
}

Configuration Options

  • maxEntries: The maximum number of departures to display on the screen.
  • station: The name of the station in Ingolstadt (e.g., "IN-ZOB").
  • overwriteIP: Boolean that allows custom URL and port for API requests.
  • customURL: The URL to use if overwriteIP is true.
  • customPort: The port to use if overwriteIP is true.

Finding the Station ID

To find the Station ID, follow these steps:

  1. Go to https://www.invg.de/echtzeit and enter the name of the station.

  2. Select the desired station from the list.

  3. Retrieve the Station ID from the URL as follows:

    In the URL https://www.invg.de/rt/showMultiple.action?station=IN-Hbf&stopPoint=1&menuId=1493&sid=240&locale=de, the Station ID is the value between ?station= and the next &. For this example, the Station ID is IN-Hbf.

  4. Use this ID in the station field in the config.js configuration for the module.

Why use overwriteIP?

The overwriteIP setting is helpful if the MagicMirror's automatic IP and port detection does not work as expected. By default, the module attempts to detect and use the MagicMirror's IP and port for the API request. However, in certain network setups or configurations, the automatic detection may fail. Enabling overwriteIP allows you to manually specify a custom URL and port for the CORS request, ensuring that the module can still retrieve the required data without issues.

Displaying Planned Departures

If realtime is false for a departure, a * will appear next to the time, indicating a planned (not real-time) departure. The table footer clarifies this with * = geplante Abfahrt.

Changelog

v1.0.0 - Latest Release

  • New Config Option: overwriteIP, customURL, and customPort - Allows configuration of custom IP and port settings for CORS handling.
  • Updated Display: Footer row added to clarify the meaning of * as a planned departure.
  • Initial Release: Displays real-time departures for Ingolstadt using the VGI API, customizable to show multiple stations and routes.

About

MagicMirror² Module to display public transport from Ingolstadt in Germany.

Resources

License

Stars

Watchers

Forks