This a module for the MagicMirror to show surf conditions using the Magic Seaweed API.
Data for this module is kindly provided by Magic Seaweed.
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/nigel-daniels/MMM-Magic-Seaweed
. A new folderMMM-Magic-Seaweed
will appear, navigate into it. - Execute
npm install
to install the node dependencies.
Prior to creating the config you will need an API key to access the data, you can apply for an ID from the Magic Seaweed website.
to locate the spot_id
of the surf you want to monitor. This can be found by visiting the Magic Seaweed website and locating the surf you want to track, once you have the locations page you can find the spots ID in the URL. For example if you want to get surf data for Steamer Lane in Santa Cruz, USA the URL is:
https://magicseaweed.com/Steamer-Lane-Surf-Report/163/
The URL contains the ID 163 which is the number you need in the config.
The entry in config.js
can include the following options:
Option | Description |
---|---|
api_key |
Required This is the API key assigned to you by Magic Seaweed (see above). Type: string |
spot_name |
This is the name you want shown on your mirror that tells you the spot you are monitoring. Type: string |
spot_id |
Required This the id of the location you are monitoring (see above).Type: string |
units |
This is units of measure you want to use in the desplay, this can be:eu = (m, kph, c)uk = (ft, mph, c)us = (ft, mph, f)Type: string Default value: us |
interval |
How often the status is updated. Be sure to follow the API usage guidelines when setting this. Type: integer Default value: 300000 // 5 minutes |
Here is an example of an entry in config.js
{
module: 'MMM-Magic-Seaweed',
position: 'top_left',
header: 'Surf Report',
config: {
api_key: 'xxxxxxxxxxxxxxxxxxxx',
spot_name: 'Pleasure Point',
spot_id: '644',
units: 'us',
interval: 300000
}
},
Feel free to submit pull requests or post issues and I'll do my best to respond.
- Michael Teeuw for the MagicMirror2 framework that made this module possible.
- Magic Seaweed for the guides and information they publish on their API.