Bangee44 / MMM-swisstransport

Additional Module for MagicMirror² https://github.com/MichMich/MagicMirror/tree/v2-beta
MIT License
7 stars 6 forks source link

Departures not loading #4

Open DentateG opened 6 years ago

DentateG commented 6 years ago

Hi Bangee44,

I "git cloned" your mmm-swisstransport directory into the /MagicMirror/Modules directory. I then copied your example to the module array in config.js file. When I run the MagicMirror it loads the header and the message "Loading trains...", however it doesn't load even after 10 minutes.

Could you suggest a fix for this please? Im very new to programming and so its likely ive missed something simple. Also I am currently working from UK, im not sure if that affects the connection to the swiss servers...

Thanks for your help!

BenGig commented 6 years ago

You can check if it works from outside CH with this URL in the browser:

http://transport.opendata.ch/v1/connections?from=Luzern&to=Zug

Should give you a JSON containing connections - or an error message if geoblocked.

DentateG commented 6 years ago

Hey BenGig, I didnt get an error message (see attached image), so i guess its not because its geoblocked. Do you have any other ideas?

screen shot 2017-12-28 at 21 53 50

Thanks a lot!

BenGig commented 6 years ago

Any errors in the output on the terminal if started with npm start? And paste the config with at least one line before and after the MMM-swisstransport part.

DentateG commented 6 years ago

No errors on the terminal and running jshint on the config.js doesnt return any errors. I think the module runs as the header appears (see the image) but cant find trains. All other modules run perfectly.

screen shot 2017-12-28 at 23 23 32
    },
    {
        module: "MMM-swisstransport",
        position: "bottom_right",
        header: "Zugverbindungen",
        config: {
            id: "008503203",
            maximumEntries: "10"
            }
    },
    {

Do you need another programme to fetch the data for with the mmm-swisstransport or should it be able to work on its own?