Giter Club home page Giter Club logo

mmm-mvgmunich's People

Contributors

canseyman avatar chrisdevh avatar ipien avatar mrvragec avatar nischi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

mmm-mvgmunich's Issues

Undefined Error

Everytime I am trying to fetch any data it says undefined (even with the standard config template given in your repo)

Internet working (can fetch other apis etc.)
node latest version
Running on docker bastilimbach/docker-magicmirror

I don't know if they changed their API but it is still working with station id's...
Thanks

CSS formating: Walking time

When formatting "td.timing" this does not apply to the walking time.

Line 129/130 of mvgmunich.js should look like:

if (this.config.showWalkingTime) { htmlText += "<td class='timing'> / ";

Only 3 departures are shown

Hi,

in my config file I wrote:
maxEntries: 6,

but only 3 departures are shown.

When don't use maxEntries at all it shows 4 departures.

What can I do to fix this?

MMM-mvgmunich module pulls no data

Hello,

even after installing and configuring the module according the github readme section, the module is displayed at the magic mirror page, but pulls no data (see screenshot).

Capture

No errors have been thrown into the error log.

I updated yesterday and ...

all my stations display undefined :)
I also tried adding the new fields in the configuration.
BTW I think you are missing some commas into the example.
mvgmunich

Unexpected token < in JSON

Hi, despite a second install Fresh as You described in issue #43 (comment)
I am still not getting any data, npm start results in the following error:
Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at Request._callback (/home/pi/MagicMirror/modules/mvgmunich/node_helper.js:59:31) at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22) at Request.emit (events.js:315:20) at Request.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1154:10) at Request.emit (events.js:315:20) at Gunzip.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:421:28) at Gunzip.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1220:12)

A JSOn check of request.js retrieves that: Parse error on line 1: 'use strict'var ht ^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'

Any idea how to fix that?
Thanks

train station names

Hiya

great module, thx a million. Exactly what I was looking for.
Unfortunately only Hauptbahnhof works for me. I was trying to change it to Aufhausen and module is not defined.
Any idea?

no station name is working

Hi Folks,
no matter which station name i put in the config file,
i always get
"The name of the station is not correct, please check on MVG."
tried at least 20 different stations which definitely exists.
same with default "Hauptbahnhof".

raspbian 9 (stretch)
MagicMirror 2.9.0

any ideas?

Showing 2 Stations

Hello mrVragec,

I want to show two different stations.
One for me and one for my wife.

I was trying to load the module twice but then it shows the data for one station in both modules.
All the different settings how ever apply to both modules differently.

Also tried adding an array into the station field like [StationA, Station], but I guess this is not supported. So I also tried renaming everying in your module to mvgmunich2 but then this model will not start.

My Linux and JavaScript skills are limited but I am not new to programming. I would be thankful for a little bit of direction. I am even willing to help developing if needed.

"Bus" symbol also for regional busses

It would be nice if you could add the "bus"-symbol which you use for the mvg-busses, also for the regional busses.
IMG_0920

Thank's a lot und frohe Feiertage.

Add disruptions (Stroeungsmeldungen)

Option to show disruptions should be implemented.

Details:

  • there should be two lines on display for disruptions (one just for transports with disruptions and second one with details)
  • displaying each of them should be configurable
  • in the second line (detailed line) detail text should rotate
  • rotation time should be configurable
  • there should be filter for disruptions (filter out only those for which user is interested)

UNMET PEER DEPENDENCY stylelint invalid

I installed it, as told in you description but i get the following errors:
The mirror boots like normal, but does not show the MVG plan.

MM Version ## [2.1.3] - 2017-10-01
But tried with the newest also.
Hope you can help.

`pi@raspberrypi:~/MagicMirror $ npm install cheerio && npm install array-filter
[email protected] /home/pi/MagicMirror
├── [email protected]
└── UNMET PEER DEPENDENCY [email protected] invalid

npm WARN [email protected] requires a peer of stylelint@^8.0.0 but none was installed.
npm WARN [email protected] requires a peer of stylelint@^8.0.0 but none was installed.
[email protected] /home/pi/MagicMirror
├── [email protected]
└── UNMET PEER DEPENDENCY [email protected] invalid

npm WARN [email protected] requires a peer of stylelint@^8.0.0 but none was installed.
npm WARN [email protected] requires a peer of stylelint@^8.0.0 but none was installed.
`

Karlsplatz is undefined

I have a similar problem. I'm trying to list Karlsplatz as the station. Unfortunately I only get undefined as result

Enclosed the configuration

module: "mvgmunich",
position: "bottom_left",
header: "MVG",
config: {
    haltestelle: "Karlsplatz",
    maxEntries: 10,             // 10 items on screen
    updateInterval: 60000,      // 60 s
    showIcons: true,            // Show transport type icon
    transportTypesToShow: {
        "ubahn": true,            // show ubahn route
        "sbahn": true,            // show sbahn route
        "bus": true,              // show bus route
        "regional_bus": true,     // show regional bus route
        "tram": true              // show tram route
    },
    ignoreStations: [],         // lines with destination to which should not be shown
    lineFiltering: {
        "active": true, 			// set this to active if filtering should be used
        "filterType": "whitelist", 	// whitelist = only specified lines will be displayed, blacklist = all lines except specified lines will be displayed
        "lineNumbers": ["U1", "U3", "X50"] // lines that should be on the white-/blacklist
    },
    timeToWalk: 10,             // 10 min walking time to station. Default is 0
    showWalkingTime: false,     // if the walking time should be included and the starting time is displayed
    showTrainDepartureTime: true,             // show tran departure time
    trainDepartureTimeFormat: "relative",     // format of the train departure time
    walkingTimeFormat: "relative",            // format of the walking time
    showInterruptions: true,				    // show interruptions as gray-out rows
    showInterruptionsDetails: false,		    // show details of interruptions in next line
    countInterruptionsAsItemShown: false,	    // count interruptions details lines as a line shown
}

Hier exmerimentell die direkten Abfragen bei der MVG. An sich sollte es funktionieren.
https://www.mvg.de/api/fahrinfo/location/queryWeb?q=Karlsplatz
https://www.mvg.de/api/fahrinfo/departure/de:09162:1?footway=0

Nevertheless the module give back undefined

I'm not quite sure why I can't. I've looked at other issues. I'm at Master Branch. It should work out like I read.

Module doesn't appear/show

Hi this is what I did:

  1. git clone https://github.com/mrVragec/MMM-mvgmunich.git in ~/MagicMirror/modules
  2. Run: npm install cheerio && npm install array-filter in ~/MagicMirror/modules/MMM-mvgmunich
  3. Add configuration block to my config.js:
{
  module: "mvgmunich",
  position: "bottom_left",
  header: "MVG",
    config: {
      haltestelle: "Hauptbahnhof",
      maxEntries: 25,   // 10 items on screen
      updateInterval: 60000,  // 60 s
      showUbahn: true,    //show ubahn route
      showBus: true,    // show bus route
      showTram: true,   // show tram route
      showSbahn: true   // show sbahn route
    }
},

The module does not appear on my screen.
I tried to change the position to "top_right" but no changes.

Any ideas?

Format Time to Walk and Departure Time

Currently Time to walk displays an absolute time when you should start walking and a relative time when the next u-bahn/s-bahn/bus/Tram/etc. departs.

I personally like it the other way round: absolute for departure, relative for when I need to go.

Hence my question: Would it be possible to have an option to configure both times being absolute or relative?

No data or incomplete data is displayed

No data or incomplete data is displayed.
Enclosed is the error log from ~/.pm2/logs/

[2020-10-04 23:09:49.553] [ERROR] Error while parsing and sending departure info SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Request._callback (/home/pi/MagicMirror/modules/mvgmunich/node_helper.js:59:31)
at Request.self.callback (/home/pi/MagicMirror/modules/mvgmunich/node_modules/request/request.js:185:22)
at Request.emit (events.js:200:13)
at Request. (/home/pi/MagicMirror/modules/mvgmunich/node_modules/request/request.js:1154:10)
at Request.emit (events.js:200:13)
at IncomingMessage. (/home/pi/MagicMirror/modules/mvgmunich/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:288:20)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
[2020-10-05 10:15:39.514] [ERROR] Error while parsing and sending departure info SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Request._callback (/home/pi/MagicMirror/modules/mvgmunich/node_helper.js:59:31)
at Request.self.callback (/home/pi/MagicMirror/modules/mvgmunich/node_modules/request/request.js:185:22)
at Request.emit (events.js:200:13)
at Request. (/home/pi/MagicMirror/modules/mvgmunich/node_modules/request/request.js:1154:10)
at Request.emit (events.js:200:13)
at IncomingMessage. (/home/pi/MagicMirror/modules/mvgmunich/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:288:20)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)

This is my config:

              {
                       module: "mvgmunich",
                       disabled: false,
                       position: "bottom_right",
                       header: "MVG",
                       config: {
                               haltestelle: "Putzbrunn, Michael-Haslbeck-Straße",
                               //haltestelle: "Karlsplatz",
                               maxEntries: 5,              // 5 items on screen
                               updateInterval: 60000,      // 60 s
                               transportTypesToShow: {
                                       "ubahn": true,            // show ubahn route
                                       "sbahn": true,            // show sbahn route
                                       "bus": true,              // show bus route
                                       "regional_bus": true,     // show regional bus route
                                       "tram": true              // show tram route
                               },
                               ignoreStations: ["Neubiberg, Unterbiberg", "Grasbrunn, Kirchplatz"],         // destination not to be shown
                               timeToWalk: 2,             // min walking time to station. Default is 0
                               showWalkingTime: false,   // if the walking time should be included and the starting time is displayed
                               showTrainDepartureTime: true, // if the time of train departure should be displayed
                               trainDepartureTimeFormat: "absolute", // time format: absolute: 21:10; relative: in 8 min
                                walkingTimeFormat: "relative", // time format: absolute: 21:08; relative: in 6 min
                                showInterruptions: true,
                                showInterruptionsDetails: true,
                                countInterruptionsAsItemShown: false,
                                lineFiltering: {
                                               "active": false,                        // set this to active if filtering should be used
                                               "filterType": "whitelist",              
                                               "lineNumbers": ["U1", "U3", "X50"]      // lines that should be on the w
                                 }
                       }
               },

Keine Anzeige mit Haltestell "Münchner Str./Würmkanal, Karlsfeld (Obb."

Hallo Simon, Ich bekomme keine Anzeige mit der Verbindungen mit folgenen Einstellungen:

{
module: "mvgmunich",
position: "top_center",
header: "MVG",
config: {
haltestelle: "Münchner Str./Würmkanal, Karlsfeld (Obb.)",
maxEntries: 5, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
transportTypesToShow: {
"ubahn": true, // show ubahn route
"sbahn": true, // show sbahn route
"bus": true, // show bus route
"regional_bus": false, // show regional bus route
"tram": false // show tram route
},
ignoreStations: [], // destination not to be shown
.

.
.
.
.
myMagicMirror

Hast du eine Tipp für mich.
Danke - Günter

No data since last update

Hi,

I made the git pull request two days ago. Since then the great module does not show any connection. I see the header and my starting point. But then I only see "not defined".
Am I doing something wrong in my script?

{
module: "mvgmunich",
disabled: false,
position: "bottom_left",
header: "MVG",
config: {
haltestelle: "St. Quirin Platz",
maxEntries: 4, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
transportTypesToShow: {
"ubahn": true, // show ubahn route
"sbahn": true, // show sbahn route
"bus": true, // show bus route
"regional_bus": false, // show regional bus route
"tram": false // show tram route
},
ignoreStations: [], // destination not to be shown
timeToWalk: 0, // 10 min walking time to station. Default is 0
showWalkingTime: false, // if the walking time should be included and the starting time is displayed
showTrainDepartureTime: true, // show tran departure time
trainDepartureTimeFormat: "relative", // format of the train departure time
walkingTimeFormat: "relative", // format of the walking time
showInterruptions: true,
showInterruptionsDetails: true,
countInterruptionsAsItemShown: false
}
},

npm install cherio && npm install array-filter doesn' work

npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'install', 'cherio' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData cherio
8 silly fetchNamedPackageData cherio
9 silly mapToRegistry name cherio
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'cherio',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: 'cherio',
12 silly mapToRegistry name: 'cherio',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/cherio
14 verbose request uri https://registry.npmjs.org/cherio
15 verbose request no auth needed
16 info attempt registry request try #1 at 23:21:49
17 verbose request id 7698a179c8456a16
18 verbose etag W/"563ce344-190"
19 verbose lastModified Fri, 06 Nov 2015 17:28:36 GMT
20 http request GET https://registry.npmjs.org/cherio
21 http 304 https://registry.npmjs.org/cherio
22 verbose headers { date: 'Fri, 05 May 2017 21:21:49 GMT',
22 verbose headers via: '1.1 varnish',
22 verbose headers 'cache-control': 'max-age=300',
22 verbose headers etag: 'W/"563ce344-190"',
22 verbose headers age: '0',
22 verbose headers connection: 'keep-alive',
22 verbose headers 'x-served-by': 'cache-hhn1525-HHN',
22 verbose headers 'x-cache': 'HIT',
22 verbose headers 'x-cache-hits': '1',
22 verbose headers 'x-timer': 'S1494019310.995540,VS0,VE2',
22 verbose headers vary: 'Accept-Encoding' }
23 silly get cb [ 304,
23 silly get { date: 'Fri, 05 May 2017 21:21:49 GMT',
23 silly get via: '1.1 varnish',
23 silly get 'cache-control': 'max-age=300',
23 silly get etag: 'W/"563ce344-190"',
23 silly get age: '0',
23 silly get connection: 'keep-alive',
23 silly get 'x-served-by': 'cache-hhn1525-HHN',
23 silly get 'x-cache': 'HIT',
23 silly get 'x-cache-hits': '1',
23 silly get 'x-timer': 'S1494019310.995540,VS0,VE2',
23 silly get vary: 'Accept-Encoding' } ]
24 verbose etag https://registry.npmjs.org/cherio from cache
25 verbose get saving cherio to /home/pi/.npm/registry.npmjs.org/cherio/.cache.json
26 verbose correctMkdir /home/pi/.npm correctMkdir not in flight; initializing
27 verbose stack TypeError: Cannot convert undefined or null to object
27 verbose stack at pickVersionFromRegistryDocument (/usr/lib/node_modules/npm/lib/fetch-package-metadata.js:125:29)
27 verbose stack at /usr/lib/node_modules/npm/node_modules/iferr/index.js:13:50
27 verbose stack at /usr/lib/node_modules/npm/lib/utils/pulse-till-done.js:20:8
27 verbose stack at saved (/usr/lib/node_modules/npm/lib/cache/caching-client.js:174:7)
27 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:241:18
27 verbose stack at FSReqWrap.oncomplete (fs.js:123:15)
28 verbose cwd /home/pi/MagicMirror/modules/MMM-mvgmunich
29 error Linux 4.9.24-v7+
30 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "cherio"
31 error node v6.10.3
32 error npm v3.10.10
33 error Cannot convert undefined or null to object

module spams errors in mm log

Hi,
thanks for the module. great Work!
It works for me on the surface, but.. :)
I have configured two stations like this:

 modules: [{
                module: "mvgmunich",
                position: "bottom_left",
                header: "Harras",
                config: {
                        haltestelle: "Harras",
                        maxEntries: 10, // 10 items on screen
                        updateInterval: 30000, // 30 s
                        showIcons: true, // Show transport type icon
                        transportTypesToShow: {
                                "ubahn": true, // show ubahn route
                                "sbahn": true, // show sbahn route
                                "bus": false, // show bus route
                                "tram": false // show tram route
                        },
                        ignoreStations: [], // destination not to be shown
                        timeToWalk: 10, // 10 min walking time to station. Default is 0
                        showWalkingTime: true, // if the walking time should be included and the starting time is displayed
                        showTrainDepartureTime: true, // show tran departure time
                        trainDepartureTimeFormat: "relative", // format of the train departure time
                        walkingTimeFormat: "relative", // format of the walking time
                }
        },
        {
                module: "mvgmunich",
                position: "bottom_right",
                header: "Johann-Clanze-Straße",
                config: {
                        haltestelle: "Johann-Clanze-Straße",
                        maxEntries: 10, // 10 items on screen
                        updateInterval: 30000, // 30 s
                        showIcons: true, // Show transport type icon
                        transportTypesToShow: {
                                "ubahn": false, // show ubahn route
                                "sbahn": false, // show sbahn route
                                "bus": true, // show bus route
                                "tram": false // show tram route
                        },
                        ignoreStations: [], // destination not to be shown
                        timeToWalk: 5, // 10 min walking time to station. Default is 0
                        showWalkingTime: true, // if the walking time should be included and the starting time is displayed
                        showTrainDepartureTime: true, // show tran departure time
                        trainDepartureTimeFormat: "relative", // format of the train departure time
                        walkingTimeFormat: "relative", // format of the walking time
                }
        }]

This results in tons of the same error in the log

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/home/pi/MagicMirror/modules/mvgmunich/node_helper.js:56:27)
    at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:182:13)
    at IncomingMessage.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1090:12)
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/home/pi/MagicMirror/modules/mvgmunich/node_helper.js:56:27)
    at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:182:13)
    at IncomingMessage.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1090:12)

Maybe it makes sense to create a catch here or to fix the issue.
Thanks for any help

MMM-mvgmunich plugin displays: undefined on Android full-screen browser fully

Dear @mrVragec,

the module is up and running on a rpi3 as server-only.

Accessing via Chrome browser (from PC or Android devices) displays everything as expected:
image

However, using a variety of full-screen browsers on Android machines (eg. fully) just gives the module header and a "undefined" notification right underneath:
image

On a side note:
The compliments module as well never displayed on this browser. It did on any other browser though. Basically a very similar behavior which seems to be browser specific.

Any idea or hint what goes wrong with this specific browser?
Thanks!

multiple stations

hi
When configuring multiple stations the content for the same station is displayed for all configured stations
Except the name of the station the displayed content is identical
mvgmunich

Add "Xpressbus" as transport Type

It would be great to get the option to seperate between an Express-Busline and a normal Busline. Alternatively you could add an option to ignore certain line numbers.

For excample at the Olympiaeinkaufszentrum I want to see departures of the X50 but not the other buslines...I still might be interested in the "normal" line 50 but that's less important.

S-bahn problem

Hi
There seems to be a problem related to s bahns. with the following configuration it displays everything except s-bahns. The problem reproduces for other stations as well. I believe something has changed at MVG side. It seems sbahn is treated differently than the rest.

{
module: "mvgmunich",
position: "top_bar",
header: "MVG",
config: {
haltestelle: "Hauptbahnhof",
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showUbahn: true, //show ubahn route
showBus: true, // show bus route
showTram: true, // show tram route
showSbahn: true // show sbahn route
}
},

Module does not load

Since a couple of days your cool module does not load the stations anymore. Is there a problem with the API?

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.