Read the statement by Michael Teeuw here.
RMV module issue (no live data)
-
@drfukc those variables are documented as needing entries in the config section in config.js
Station ID and apiKey An apiKey has to be requested at RMV - opendata. The stationId can be found in file 'StationID.txt' or at RMV - opendata. The correct station name is in column 'E'. Note: The stations have to be added in german only. Config Options fDestination1 'Frankfurt (Main) Hauptbahnhof' The final stop of the train line has to be added here! (station name) default value: 'Frankfurt (Main) Hauptbahnhof' fDestination2 'Frankfurt (Main) Flughafen Regionalbahnhof' The final stop of the train line has to be added here! (station name) default value: 'Frankfurt (Main) Flughafen Regionalbahnhof'
note that dest 3,4,5 are marked optional, where 1 and 2 are not
maybe doc update
-
@sdetweil
I am unsure if we are talking about the same thing.
I understand you are referring to this file:/home/pi/MagicMirror/config/config.js
I see the issue in this file:
/home/pi/MagicMirror/modules/MMM-RMV/MMM-RMV.js
To get it to work, both files need to be edited in the current version.
-
@drfukc i looked at the source for the module u described, I see your pull request…
fDest: 'true', fDestination1: 'Frankfurt (Main) Hauptbahnhof', fDestination2: 'Frankfurt (Main) Flughafen Regionalbahnhof', fDestination3: '', fDestination4: '', fDestination5: '', lines: '', // "S1, U1,Tram 11"
because they are in the defaults section of the code, all u have to do is set them in the config entry for this module in config.js
that will override the defaults{ module: "MMM-RMV", position: "center", config: { fDestination1: 'Frankfurt (Main) Hauptbahnhof', fDestination2: 'Frankfurt (Main) Flughafen Regionalbahnhof', fDestination3: 'something', fDestination4: 'something else', fDestination5: 'and even more', } }
-
and the MMM-MRV.js code says (for example)
else if (trains.direction === this.config.fDestination1 || trains.direction === this.config.fDestination2 || trains.direction === this.config.fDestination3 || trains.direction === this.config.fDestination4 || trains.direction === this.config.fDestination5) { if (trains.Product.catOutL == "S-Bahn" || trains.Product.catOutL == "Niederflurstraßenbahn") { countedLinesTram = countedLinesTram + 1; } else if (trains.Product.catOutL == "U-Bahn") { countedLinesSub = countedLinesSub + 1; } else if (trains.Product.catOutL == "Niederflurbus" || trains.Product.catOutL == "Bus") { countedLinesBus = countedLinesBus + 1; } else if (trains.Product.catOutL == "RB" || trains.Product.catOutL == "RE" || trains.Product.catOutL == "IC" || trains.Product.catOutL == "ICE" || trains.Product.catOutL == "R-Bahn" || trains.Product.catOutL == "EC") { countedLinesTrain = countedLinesTrain + 1; } else { countedLines = countedLines + 1; } }
you should not have to edit the code
-
@sdetweil
I have not edited the code, I have created a pull-request.
All I can see it that it is working in my environment with my proposed change but not with the default values.
In case other users have a similar issue, I suggest to give it a try. -
@drfukc said in RMV module issue (no live data):
I have not edited the code, I have created a pull-request.
well, you edited the source file, which is the same…
it doesn’t matter what the defaults are (what u changed)…
just set the values in config (as the deverloper expects you to do), and all is good…
your ‘’ vs the original produce the same results… it doesn’t work…
it was expected that you would put values in config, they override the defaults…
-
@sdetweil
if you are the author of the RMV module its perfect, if you are not the author of this module it is perfect as well.
However, please accept that in my case the “MMM-RMV.js” requires auditing, otherwise it will not work.
I would be more than pleased if all editing can be done in the “config.js”, at least in my case it does not work.
The default values do not seem to be overriden.
Any idea why?