KristjanESPERANTO / MMM-PublicTransportHafas

This is a module for MagicMirror² to display public transport departures.
MIT License
21 stars 6 forks source link

No information is shown - "Just" Loading... #28

Closed TrueMophisto closed 2 years ago

TrueMophisto commented 2 years ago

Hi, I set-up the MagicMirror and installed the MMM-PublicTransportHafas module as outlined. Unfortunately no information are shown. Do you have an idea why the module is not working? Please find attached different screenshots:

1) Working Mirror 2) Logfile 3) Config.js

MagicMirror Log Config

I also deinstalled Chromium-Browser but that hasn't fixed the issue.

Kind regards

TrueMophisto commented 2 years ago

Sorry,` I saw a comment too late, here also the config file. As you can see only one module is "deactivated":

var config = {
    modules: [
        {
            module: "clock",
            position: "top_left"
        },
        {
            module: "currentweather",
            position: "top_right",
            config: {
                location: "Rosenheim",
                locationID: "2844988",
                appid: "******************************",
                units: "metric",
                maxNumberOfdays: "3",
                updateInterval: "600000",
                animationSpeed: "5000"
            }
        },
//      {
//              module: "MMM-COVID19-AMPEL",
//              position: "bottom_center",
//              config: {
//                  header: "COVID-19 Inzidenzwert", // Header Title of Display on MagicMirror
//                  cityID: ["224"], // City ID from  https://npgeo-corona-npgeo-de.hub.arcgis.com/datasets/917fc37a709542548cc3be077a786c17_0/data
//                  infoRowClass: "small", // small, medium
//                  showUpdateDateInHeader: true, //Show update date in header
//                  showUpdateDateInRow: false, //Show update date in each row
//                  showStatusLightLeft: true, //Show left status light
//                  showStatusLightRight: true, // Show right status light
//                  showTitle: true, //Show Title row with headlines if you want to display more than one information
//                  showSKLK: true, //Show the Region information if the Pace displayed is the city or regional area (Stadt or Land) 
//                  showCases: true, //Show amount of active cases in city
//                  showCasesPerPeople: true, //Show Percentage of active cases per inhabitant
//                  showDeathRatePerPeople: true, //show death rate in % of infected people
//                  show7DayIncidence: true, // Show 7 day incidence value for your location
//              landModeOnly: false, // Shows Bundesland instead of City in Bundesland (Thos who want to display only the Bundesland)
//              showVaccinations: true, //Shows the total quota of fist shots people got in the whole country in header 
//              numberOfDigits: 2, //Round the Percentage and incidence value to number of digits
//                  updateInterval: 3600000, // update interval in milliseconds // 1 Hour - Values are only refreshed every 24 H on Server
//              fadeSpeed: 4000
//              }
//      },
        {
            module: "MMM-PublicTransportHafas",
            position: "bottom_center",
            config: {
                    stationID: "008000326",                   // Replace with your stationID!
                    stationName: "Rosenheim",   // Replace with your station name!
                    direction: "",                    // Show only departures heading to this station. (A station ID.)
                    ignoredLines: [],                 // Which lines should be ignored? (comma-separated list of line names)
                    excludedTransportationTypes: [],  // Which transportation types should not be shown on the mirror? (comma-separated list of types) possible values: StN for tram, BuN for bus, s for suburban/
                timeToStation: 10,                // How long do you need to walk to the next Station?
                    showColoredLineSymbols: true,     // Want colored line symbols?
                    useColorForRealtimeInfo: true,    // Want colored real time information (timeToStation, early)?
                    showTableHeadersAsSymbols: true,  // Table Headers as symbols or text?
                    maxUnreachableDepartures: 0,      // How many unreachable departures should be shown?
                    maxReachableDepartures: 7,        // How many reachable departures should be shown?
                    customLineStyles: "",             // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
                    showOnlyLineNumbers: false        // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
                }
        },

    ]
}
KristjanESPERANTO commented 2 years ago

Glad you shared the whole config file. The last line was just missing. With this line it should work. I corrected the config and adjusted it a little. Attention: I removed the appid for the weather module. This id shouldn't be made public.

So here is the config:

"use strict";

let config = {
    language: "de",
    modules: [
        {
            module: "clock",
            position: "top_left"
        },
        {
            module: "currentweather",
            position: "top_right",
            config: {
                location: "Rosenheim",
                locationID: "2844988",
                appid: "******************************",
                units: "metric",
                maxNumberOfdays: "3",
                updateInterval: "600000",
                animationSpeed: "5000"
            }
        },
//      {
//              module: "MMM-COVID19-AMPEL",
//              position: "bottom_center",
//              config: {
//                  header: "COVID-19 Inzidenzwert", // Header Title of Display on MagicMirror
//                  cityID: ["224"], // City ID from  https://npgeo-corona-npgeo-de.hub.arcgis.com/datasets/917fc37a709542548cc3be077a786c17_0/data
//                  infoRowClass: "small", // small, medium
//                  showUpdateDateInHeader: true, //Show update date in header
//                  showUpdateDateInRow: false, //Show update date in each row
//                  showStatusLightLeft: true, //Show left status light
//                  showStatusLightRight: true, // Show right status light
//                  showTitle: true, //Show Title row with headlines if you want to display more than one information
//                  showSKLK: true, //Show the Region information if the Pace displayed is the city or regional area (Stadt or Land) 
//                  showCases: true, //Show amount of active cases in city
//                  showCasesPerPeople: true, //Show Percentage of active cases per inhabitant
//                  showDeathRatePerPeople: true, //show death rate in % of infected people
//                  show7DayIncidence: true, // Show 7 day incidence value for your location
//              landModeOnly: false, // Shows Bundesland instead of City in Bundesland (Thos who want to display only the Bundesland)
//              showVaccinations: true, //Shows the total quota of fist shots people got in the whole country in header 
//              numberOfDigits: 2, //Round the Percentage and incidence value to number of digits
//                  updateInterval: 3600000, // update interval in milliseconds // 1 Hour - Values are only refreshed every 24 H on Server
//              fadeSpeed: 4000
//              }
//      },
        {
            module: "MMM-PublicTransportHafas",
            position: "bottom_center",
            config: {
                    stationID: "8000326",
                    stationName: "Rosenheim",
                    timeToStation: 10,
                    showColoredLineSymbols: true,
                    showTableHeadersAsSymbols: true,
                    maxUnreachableDepartures: 0,
                    maxReachableDepartures: 7,
                    showAbsoluteTime: false,
                    showOnlyLineNumbers: false,
                    tableHeaderOrder: ["line", "direction", "time", "platform"]
                }
        },

    ]
}

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") { module.exports = config; }

And this is how the module should look like: Rosenheim

TrueMophisto commented 2 years ago

Dear KristjanESPERANTO! You made my day and solved the issue. Thank you and also thank you for removing the appid!

TrueMophisto commented 2 years ago

Dear Kristjan,

one other funny thing. While everywhere on the MM is the time shown in the 24h format except in the departure time. Do you have maybe an idea?

Kind regards,

Am 09.01.2022 um 23:09 schrieb Kristjan ESPERANTO @.***>:

Glad you shared the whole config file. The last line was just missing. With this line it should work. I corrected the config and adjusted it a little. Attention: I removed the appid for the weather module. This id shouldn't be made public.

So here is the config:

"use strict";

let config = { language: "de", modules: [ { module: "clock", position: "top_left" }, { module: "currentweather", position: "top_right", config: { location: "Rosenheim", locationID: "2844988", appid: "**", units: "metric", maxNumberOfdays: "3", updateInterval: "600000", animationSpeed: "5000" } }, // { // module: "MMM-COVID19-AMPEL", // position: "bottom_center", // config: { // header: "COVID-19 Inzidenzwert", // Header Title of Display on MagicMirror // cityID: ["224"], // City ID from https://npgeo-corona-npgeo-de.hub.arcgis.com/datasets/917fc37a709542548cc3be077a786c17_0/data // infoRowClass: "small", // small, medium // showUpdateDateInHeader: true, //Show update date in header // showUpdateDateInRow: false, //Show update date in each row // showStatusLightLeft: true, //Show left status light // showStatusLightRight: true, // Show right status light // showTitle: true, //Show Title row with headlines if you want to display more than one information // showSKLK: true, //Show the Region information if the Pace displayed is the city or regional area (Stadt or Land) // showCases: true, //Show amount of active cases in city // showCasesPerPeople: true, //Show Percentage of active cases per inhabitant // showDeathRatePerPeople: true, //show death rate in % of infected people // show7DayIncidence: true, // Show 7 day incidence value for your location // landModeOnly: false, // Shows Bundesland instead of City in Bundesland (Thos who want to display only the Bundesland) // showVaccinations: true, //Shows the total quota of fist shots people got in the whole country in header // numberOfDigits: 2, //Round the Percentage and incidence value to number of digits // updateInterval: 3600000, // update interval in milliseconds // 1 Hour - Values are only refreshed every 24 H on Server // fadeSpeed: 4000 // } // }, { module: "MMM-PublicTransportHafas", position: "bottom_center", config: { stationID: "8000326", stationName: "Rosenheim", timeToStation: 10, showColoredLineSymbols: true, showTableHeadersAsSymbols: true, maxUnreachableDepartures: 0, maxReachableDepartures: 7, showAbsoluteTime: false, showOnlyLineNumbers: false, tableHeaderOrder: ["line", "direction", "time", "platform"] } },

] }

/ DO NOT EDIT THE LINE BELOW / if (typeof module !== "undefined") { module.exports = config; } And this is how the module should look like: https://user-images.githubusercontent.com/35647502/148702848-c7c2b286-49e1-4e7b-a71a-fe41b68f69f0.png — Reply to this email directly, view it on GitHub https://github.com/KristjanESPERANTO/MMM-PublicTransportHafas/issues/28#issuecomment-1008433323, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKORQ3PAPPJ2XOGO3PDWRLUVIBRHANCNFSM5LSHR7WQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

KristjanESPERANTO commented 2 years ago

Nice that we found the cause of the problem :slightly_smiling_face:

That time issue is interesting. Try adding the lines with the language and the timeFormat:

let config = {
    language: "de",
    timeFormat: 24,
    modules: [
...

Then it should look like this: Ekrankopio de 2022-01-10 21-04-35

TrueMophisto commented 2 years ago

Perfect! These lines solved the issue perfectly! Have a great day and thank you!

Am 10.01.2022 um 21:09 schrieb Kristjan ESPERANTO @.***>:

Nice that we found the cause of the problem 🙂

That time issue is interesting. Try adding the lines with the language and the timeFormat:

let config = { language: "de", timeFormat: 24, modules: [ ... Then it should look like this: https://user-images.githubusercontent.com/35647502/148831832-c3ceca63-3c04-4310-b191-29bf2fb69ae9.png — Reply to this email directly, view it on GitHub https://github.com/KristjanESPERANTO/MMM-PublicTransportHafas/issues/28#issuecomment-1009301013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKORQ4QBZIMEMTOAIYPHI3UVM4IBANCNFSM5LSHR7WQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you modified the open/close state.