boghammar / MMM-SL-PublicTransport

Magic Mirror module - Display public transport in Stockholm/Sweden.
MIT License
12 stars 6 forks source link

Getting uncaught exception without highUpdateInterval parameters #21

Closed Sukram-89 closed 6 years ago

Sukram-89 commented 6 years ago

It says in the documentation that these parameters are optional, but you need to set them otherwise you get a uncaught exception complaining about highUpdateInterval.times not set.

boghammar commented 6 years ago

Please provide your module configuration, dont forget to take out your API-key ;) so that I can have a look at what's happening.

Sukram-89 commented 6 years ago

Another thing, without a comma after highUpdateInterval it will fallback to default config (It doesn't have a comma in your documentation)

My config has the default values, haven't changed anything. { module: 'MMM-SL-PublicTransport', position: 'top_right', header: 'Busses', config: { apikey: '...', stationid: [...], stationname: ['...'], direction: 1, displaycount: 10, lines: [], showdisturbances: false, fade: true, fadePoint: 0.2, delayThreshhold: 60, updateInterval: 5601000, highUpdateInterval: {}, uiUpdateInterval: 1000, SSL: false, debug: false, ignoreSanityCheck: false } },

I've added your documentations highUpdateInterval parameters and it works like a charm.. Sorry for the formatting

boghammar commented 6 years ago

Ok I see where you are ...

My bad (again) if you don't need the highUpdateInterval it should not be defined at all.

I have updated the readme with a comma ',' after the highUpdaterInterval and changed the checks so that if you use the configuration from the readme as is you will get a log message saying what you should do but the module does not crash with an exception.

So what you can do if you do not need the highUpdateInterval is to remove it completely from the config.

Closing this issue now. Thanks for the feedback :)