A MagicMirror Module for displaying the driver standings from the current Formula 1 season.
JavaScript CSS
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
translations
.gitignore First commit Aug 5, 2016
ErgastAPI.js
LICENSE
MMM-Formula1.css
MMM-Formula1.js
README.md
flags.png
node_helper.js
package.json

README.md

MagicMirror Module: MMM-Formula1

A MagicMirror Module for displaying Formula 1 standings and race schedule.

Example

The module displays the standings from the current Formula 1 season including:

  • The flag for the driver or constructor.
  • The drivers name (when the drivers standings are displayed).
  • The constructor name.
  • The current points total.
  • The current number of wins.

In addition you can configure the following options

  • Which season to display the standings for season
  • Whether to show the drivers or constructors standings type
  • How many drivers/constructors to display in the standings table maxRows
  • Display the upcoming race schedule using the standard calendar module

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/ianperrin/MMM-Formula1.git

Configure the module in your config/config.js file.

Updating

If you want to update your MMM-Formula1 module to the latest version, use your terminal to go to your MMM-Formula1 module folder and type the following command:

git pull

If you haven't changed the modules, this should work without any problems. Type git status to see your changes, if there are any, you can reset them with git reset --hard. After that, git pull should be possible.

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
    {
        module: 'MMM-Formula1',
        position: 'top_right',
        header: 'F1 Standings',
        config: {
            // Optional configuration options - see https://github.com/ianperrin/MMM-Formula1#configuration-options
        }
    },
]

Configuration options

The following properties can be configured:

Option Description
season Optional - The season to display.

Possible values:1950 - 2016
Default value: 'current'
type Optional - The type of standings to display.

Possible values:'DRIVER' or 'CONSTRUCTOR'
Default value: 'DRIVER'
maxRows Optional - The maximum number of drivers/constructors to show in the standings table.

Possible values: false or a number.
Default value: false
calendar Optional - Whether the module should publish the upcoming Race Schedule as an ical.

Possible values: true or false.
Default value: false
fade Optional - Whether to fade the activities to black. (Gradient)

Possible values: true or false
Default value: false
fadePoint Optional - Where to start fade?

Possible values: 0 (top of the list) - 1 (bottom of list)
Default value: 0.4
reloadInterval Optional - How often does the data needs to be reloaded from the API? (Milliseconds). See the Terms & Conditions for responsible use of the API.

Possible values: 7500 - 86400000
Default value: 1800000 (30 minutes)
animationSpeed Optional - The speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 2500 (2.5 seconds)
grayscale Optional - Whether to show the flags in grayscale (true) or colour (flase)

Possible values: true or false
Default value: true
showFooter Optional - Whether to show the footer below the table with information about the season and round.

Possible values: true or false
Default value: true

Displaying the Race Schedule

Stop your Magic Mirror (your exact method may vary)

pm2 stop mm

Install ical-generator in your MMM-Formula1 module directory.

cd ~/MagicMirror/modules/MMM-Formula1
npm install ical-generator

Set the calendar option for your MMM-Formula1 module to true.

        config: {
            // Optional configuration options - see https://github.com/ianperrin/MMM-Formula1#configuration-options
            calendar: true,
        }

Add the Formula 1 Race Schedule calendar to the calendar module to your configuration (config/config.js).

{
    symbol: ' flag-checkered',
    url: 'http://localhost:8080/MMM-Formula1/schedule.ics',
}

Restart your Magic Mirror (your exact method may vary)

pm2 start mm