Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karlsplatz is undefined #43

Closed
onewaypub opened this issue Mar 6, 2020 · 14 comments
Closed

Karlsplatz is undefined #43

onewaypub opened this issue Mar 6, 2020 · 14 comments
Assignees
Labels

Comments

@onewaypub
Copy link

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.

@ipien
Copy link
Contributor

ipien commented Mar 7, 2020

Try "Karlsplatz (Stachus)"

@onewaypub
Copy link
Author

Same problem with Karlsplatz (Stachus). Undefined. As described: With Karlsplatz it should work. I don't know why it is not working.

@onewaypub
Copy link
Author

onewaypub commented Mar 7, 2020

Information: When I use "Karlsplatz" the display correct this to "Karlsplatz (Stachus)". So it seems, that the first request work (https://www.mvg.de/api/fahrinfo/location/queryWeb?q=Karlsplatz). But the second do not work. I also correct the lineFiltering. Which is display in the exmaple above.

@mrVragec mrVragec self-assigned this Mar 10, 2020
@mrVragec mrVragec added the bug label Mar 10, 2020
@mrVragec
Copy link
Owner

@onewaypub I was able to reproduce this, fix on the way.

@mrVragec
Copy link
Owner

mrVragec commented Mar 15, 2020

@onewaypub would be possible to test if the implementation in branch 43_check_ignored_or_include_line is working for you?

@HaszarT88
Copy link

@onewaypug I had the same problem, UNDEFINED and then nothing
It worked out for me to set: the lineFiltering-> "active": false,
BUT do not delete the lineFiltering, then again nothing was shown

lineFiltering: {
"active": false, // 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
},

mrVragec added a commit that referenced this issue Apr 27, 2020
…ude_line

#43 fix the bug in the comparison of values for line filtering.
@SirFiChi
Copy link

Doesn't work for me.
"Neuperlach Süd" and "Neuperlach Sued" doesn't work with activated and deactivated lineFiltering.

@SirFiChi
Copy link

I had to restart the docker container with the magic mirror installation on my Hassio.
Now it works. Thanks.

@magic21nrw
Copy link

magic21nrw commented Aug 22, 2020

Unfortunately. With a fresh install, I get the same UNDEFINED error with this plugin.

Config is the same as written on the sample page:

{
module: "mvgmunich",
position: "bottom_left",
header: "MVG",
config: {
haltestelle: "Hauptbahnhof",
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
}
},

Also tried line filtering from true to false and nothing changed for me.
I also tried to disable other plugins without effect.
Plugins remaining:
updatenotification
alert
clock

I have no further idea why it is not resolving the Hauptbahnhof correctly.

Any further ideas?

@SirFiChi
Copy link

SirFiChi commented Jan 8, 2021

I have no further idea why it is not resolving the Hauptbahnhof correctly.

Any further ideas?

@magic21nrw Try to add

haltestelleID: "de:09162:100",

after

haltestelle: "Hauptbahnhof",

@SirFiChi
Copy link

SirFiChi commented Jan 8, 2021

@onewaypub
Try to add

haltestelleID: "de:09162:1",

after

haltestelle: "Karlsplatz",

@mrVragec
Copy link
Owner

mrVragec commented Jan 10, 2021

@magic21nrw
I tried to reproduce your problem with following steps:

and I got the 2 records for HBF on screen (U1 for OEZ and Mangfallplatz).
Would be possible to check for any logs in console?

@magic21nrw
Copy link

Hi,

I deinstalled the module. Hence I cannot test anymore.

If it is working on your side it might have something to do with conflicting plugins or the api is not working properly. MVG Munich has a bad history of outtakes.

If nobody else has the problem - you may close this issue.

Daniel

@mrVragec
Copy link
Owner

Closing as no activity on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants