ianperrin / MMM-Formula1

A MagicMirror Module for displaying Formula 1 driver and constructor standings.
MIT License
33 stars 14 forks source link

how to display race schedule #10

Closed issagak closed 7 years ago

issagak commented 7 years ago

HI Ian Thank so much for creating this for us fans of Formula one

i'm not a programmer at all. I followed all the directions to implement this module but it is not working. The issue I'm having is with this code below. When I add that to my calendar module it says syntax error. (WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration. ) I also looked at schedule.ics but do not find it under MMM-Formual1. Is that normal?

symbol: ' flag-checkered',
url: 'http://localhost:8080/MMM-Formula1/schedule.ics',
PredaZoR commented 7 years ago

Hi,

I got nearly the same issue. I can't find a "schedule.ics" in any folder. When I add the "calendar" to the normal calendar part, i get nothing - if I create a 2nd calendar just for this I get the message: "No upcoming events."

Paultie commented 7 years ago

@PredaZoR I have it working however i do get the same message No upcoming events. This is because the 2017 schedule is not yet been made available as far as I can see. Only way to test if everything works is to use your own web browser and go to your magic mirror's ip and put the MMM_Formula1/schedule.ics in the url. if you are able to download the ics file you know it works. If you then view this file you will see that it only contains the 2016 schedule. So the real issue there is that there is no 2017 schedule available yet.

issagak commented 7 years ago

The 2017 calendar has been out for monthsome now. I'm using the Magic Mirror default calendar for F1. I pointed that to an .ics I found online and i'missed very happy with that.

ianperrin commented 7 years ago

@issagak - here's a couple of things you can check:

ianperrin commented 7 years ago

@issagak , @Paultie - Unfortunately we are in the hands of the API provider as to when the 2017 data is considered 'current'. Browse to http://ergast.com/api/f1/current and you'll see it still shows the 2016 data

If you're keen, you may notice that the 2017 data is available from the API through http://ergast.com/api/f1/2017. I'll see if I can apply a workaround...

ianperrin commented 7 years ago

I pushed an update which makes the Race Schedule use the season option set in config.js

The following config could be temporarily used until the API switches 'current' to '2017'

        {
            module: 'MMM-Formula1',
            position: 'top_right',
            header: 'F1 Standings',
            config: {
                season: '2017',
                calendar: true,
            }
        },
Paultie commented 7 years ago

this seems to do the trick. Thanks for implementing a fix

issagak commented 7 years ago

Thanks a lot Ian - The is the best module out here. at least for me. I'm a huge fan of F1