This is a module for MagicMirror².
This module will show you upcoming rocket launches based on TheSpaceDevs API. Unauthenticated users have access to 15 api calls per hour.
- Navigate to your MagicMirror's modules folder, and run the following command:
git clone https://github.com/AlexMNet/MMM-TheSpaceDevs
- Add the module and a valid configuration to your
config/config.js
file
This is an example configuration for your config/config.js
file:
let config = {
modules: [
// TABLE VIEW CONFIG
{
module: 'MMM-TheSpaceDevs',
position: 'bottom_right',
config: {
updateInterval: (60 * 60 * 1000) / 15,
records: 5,
type: 'table',
locationIds: [11],
headerText: 'Vandenberg Space Force Base - Launches',
},
},
// DETAIL VIEW CONFIG
{
module: 'MMM-TheSpaceDevs',
position: 'middle_center',
config: {
updateInterval: (60 * 60 * 1000) / 15,
type: 'detail',
locationIds: [11],
width: 500,
},
},
],
};
Option | Description |
---|---|
records |
# of launches you want returned from the api for table view. Between 1 - 7 looks best |
updateInterval |
How often you want to fetch data from the API in ms. Default is 15 times per hour |
apiKey |
Add apiKey for increased API rate limits visit TheSpaceDevs for more info |
type |
Template to view. "detail" or "table" |
locationIds |
An array of locationId integers you want data from. If no location is provided you will recieve launch data from all locations |
headerText |
Text you want to add to your header for table view |
width |
Width is used for the detail template. |
- TheSpaceDevs API is free to use but capped at 15 api calls per hour for unauthenticated users. This is important if you want to add both the detail view and table view to your magic mirror. Each module will make its own API call so set your updateIntervals accordingly. The default for this module is 15 api calls per hour which assumes you will only be using the table or detail view.