GithubHelp home page GithubHelp logo

wapolinar / mmm-vrr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from klizzy/mmm-vrr

0.0 1.0 0.0 2.59 MB

Displays local Transport for Germany, NRW (VRR). Module for MagicMirror

License: MIT License

JavaScript 97.21% CSS 2.79%

mmm-vrr's Introduction

MMM-Vrr and more Areas

This is a module for the MagicMirror².

Displays the next departure times of Trains, subway and Buses from any city and station in the german federal state North Rhine-Westphalia (VRR).

This module was intended for VRR, but it also supports the following Areas.

displayType detail    displayType digital

Installation

  1. Navigate into your MagicMirror's modules folder.
  2. Execute git clone https://github.com/Klizzy/MMM-Vrr.git.
  3. Execute cd MMM-Vrr.
  4. Execute npm install.

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

{
    module: 'MMM-Vrr',
    position: "top_right",
    config: {
        city: 'Düsseldorf',
        station: 'Hauptbahnhof',
        numberOfResults: 10,
        displayTimeOption: 'countdown',
        displayType: 'detail'
    }
}  

Configuration options

Option Description Options
city Required German City Name

Type: String (default: Düsseldorf)
Any City Name in North Rhine-Westphalia
station Required German Station Name

Type: String (default: Hauptbahnhof)
Any Station Name in North Rhine-Westphalia
numberOfResults Optional Number of results to be displayed

Type: Int (default: 10)
*
displayType Optional Changes the display type

Type: String (default: 'detail')
'detail', 'lcd'
displayIcons Optional Display fontawsome icons

Type: boolean (default: true)
false
updateInterval Optional Sets the Update Interval int

Type: int(milliseconds)
Default 60000 milliseconds (1 minute)
* (API result is always cached for 1 Min)
displayTimeOption Optional Changes the type of time

Type: String (default: 'countdown')
'time', 'time+countdown', 'countdown'
setWidth Optional Sets the width of the module in pixel

Type: int (default: false)
Any posible size like: 450
lcdWidth Optional Sets the width of the lcd display type

Type: int (default: 450)
any possible size
scrollAfter Optional Scrolls the destination text after the specified characters

Type: int (default: false)
any possible size or false

Supported Languages

Currently only de and en is supported. Gets the Value from the Global Magic Mirror language config.

"LCD" Display

lcd
This option can be set if displayType: 'lcd' is added. In this type are no delays, icons or abosulte time shown.

Visualization of the scrollAfter option

If you set scrollAfter:15, the text will be scrolled horizontally if it has 15 or more characters.

Auto scroll

EFA Support for other Areas

Please keep in mind, that everything besides VRR is not full supported.

Possible Side effects for not VRR Areas:

  • Icons don't match correctly
  • not all configured transport types hide correctly

Partly supported Areas:

  • ASEAG
  • BSVG
  • DING
  • IVB
  • KVV
  • LinzAG
  • NVBW
  • SVV
  • TLEM
  • VBL
  • VGN
  • VMV
  • VOR
  • VRN
  • VVO
  • VVS
  • VVV
  • BVG
  • DB
  • NAHSH
  • NASA
  • NVV
  • RSAG
  • SBB
  • VBB
  • VBN
  • ÖBB

Feedback

Its my first Open Source Project, so it would be nice if you share your experience with this module with me [email protected]! Feel free to suggest additional features and / or improvements.

Changelog

Version 1.0

  • initial release

Version 1.1

  • added some additional configuration to set a custom width
  • added the option to scroll the destination text horizontally

Version 1.2

  • now displays delays

Version 1.5

  • delay bugfix and styling changes
  • rail track is now displayed
  • added additional display type

Version 1.5.1

  • fix for Issue #3 scrollAfter and displayType lcd

mmm-vrr's People

Contributors

klizzy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.