Coder Social home page Coder Social logo

klizzy / mmm-vrr Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 6.0 2.75 MB

🚌🚏🚅 Displays information about the upcoming departure of public transport within Germany, NRW. Module for MagicMirror

License: MIT License

JavaScript 96.91% CSS 3.09%
magicmirror mmm-vrr delays efa mmm smartmirror hacktoberfest vrr

mmm-vrr's Introduction

MMM-Vrr and more areas

setup and tests

This is a module for the MagicMirror².

This module is designed to provide users with up-to-date information about the upcoming departure times of trains, subways, and buses from any station in the North Rhine-Westphalia VRR region of Germany.

This module was intended for the public transport of VRR, but it also supports the following areas.

If you like this module, consider to give this project a ⭐ on GitHub to show support.

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 LCD type support
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
withoutDestination Optional Only show results without destination. Supports a list of strings, separated by comma (",").

Type: list of strings (default: empty list (show all destinations))
any possible list (e.g., ["Aachen, Hbf,Aachen","Duisburg Hbf"])
platform Optional Only show platform. Supports multiple strings, separated by comma (",").

Type: string (default: empty (show all platforms))
any possible string (e.g., "2,3")
line Optional Only show lines that start with the given string. Supports multiple strings, separated by comma (",").

Type: string (default: empty (i.e., show all lines))
any possible string (e.g., "RB33,U")

Support

If you like my module and want to thank, you could consider:

  • buying Buy me a ☕ & plant a 🌳 at the same time
  • give this Project a ⭐ on GitHub.

Buy Me A Coffee

Supported Languages

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

"LCD" Display

This view can be set if displayType: 'lcd' has been set.

Not all config parameters are supported in this mode. Check the parameters within the "Configuration options" table.

lcd

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. You can check your station and city combination beforehand here

Possible Side effects for non 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

Check if your station is supported

This application uses the provided API from vrrf.finalrewind.org. If your desired station and city combination returns a result, its highly possible that MMM-Vrr supoorts it also.

Feedback

It's 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 trough a Github issue.

Changelog

See changelogs.md to view changes and contributors.

mmm-vrr's People

Contributors

bywulf avatar dependabot[bot] avatar klizzy avatar marnwk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mmm-vrr's Issues

Displaying Buses

Am I missing something, or is there no option to display buses? The Readme says:

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

But I can't see any Buses beeing shown. Is there a config option I missed?

2 things: Module not showing up and support for more options

Hello :) thank you so much for this module, it looks so much nicer than all other pub transport modules.

  1. It worked perfectly fine until yesterday, today it just does not show up. I tried to use standard confit but does not change anything. Any idea what to do?

  2. Could you add a separate column for the delay so the time still be perfectly aligned? I think it does not need an extra column title. That would be great!

Thanks in advance

Jan from Essen

Add Github Actions - tests and automation

The following things should be automatically testen, if a PR has been made:

  • Setup process with the latest MagicMirror release is working correctly
  • Check on PR if changelog has been modified
  • Check if package.json version has been updated accordingly

LCD Option not updating

Hey, ich schreibe mal auf deutsch, hoffe, das ist okay.
Zunächst einmal vielen Dank für das coole Addon, ich bin begeistert von den Funktionen und kann das echt super auf meinem Smart Mirror gebrauchen.

Das Addon funktioniert an und für sich bei mir auch super, jedoch updatet es sich nicht, wenn ich die Display-Anzeige auf LCD-Modus umstelle...
Im "Details" Modus klappt alles einwandfrei und sonst habe ich nichts am Addon oder in der Config bearbeitet...

Habe bereits eine neuinstallation und mehrere Neustarts versucht, auch eine Anpassung des Update Intervalls hilft nicht...

Beim Start vom Magic Mirror zieht sich im LCD-Modus das Addon seine Daten, dann passiert aber leider nichts mehr, die Minuten werden nicht weniger und bereits abgefahrene Linien stehen weiterhin mit der Minutenzahl an, es wirkt wie eingefroren...

Nur wenn ich Magic Mirror neu starte zieht sich das Addon einmal kur die neuen Daten, dann friert es wieder ein.
Im Details Modus hingegen absolut keine Probleme, aber mir gefällt das LCD Aussehen so viel besser :)

Würde mich über einen Fix freuen, viele Grüße

On Install: (node:13734) MaxListenersExceededWarning: Possible EventEmitter memory leak detected.

I don't know if this is a serious issue, but I saw it during installation of the module and to be safe, I post it anyway:

The following message appears multiple (10+) times in the terminal while running npm install:

(node:13734) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
after that, the install seems to finish okay.

Now I'll try to configure it in my new MM² smart display and see if it works ;-)

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.