Skip to content
Magic Mirror Module displaying the current marine weather and using Storm Glass API
JavaScript CSS
Branch: master
Clone or download
Latest commit 662e142 Sep 1, 2019

README.md

Module: MMM-MarineWeather

This module displays the current marine weather, including the water temperature, the air temperature, the current wind conditions (speed and direction) and current wave conditions (height, direction and period).

The wave period display may be enabled or disabled.

MMM-MarineWeather Screenshot #1 MMM-MarineWeather Screenshot #2 MMM-MarineWeather Screenshot #3

MagicMirror Project on Github | StormGlass

Installation:

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

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/grenagit/MMM-MarineWeather

Configure the module in your config.js file.

Update:

In your terminal, go to your MMM-MarineWeather's Module folder:

cd ~/MagicMirror/modules/MMM-MarineWeather

Incorporate changes from this repository:

git pull

Configuration:

Basic configuration

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

modules: [
	{
		module: "MMM-MarineWeather",
		position: "top_right",
		config: {
			latitude: 0, // Latitude 
			longitude: 0, // Longitude
			appid: "abcde12345abcde12345abcde12345ab" // StormGlass API key (docs.stormglass.io)
		}
	}
]

You can use the special 414492aa-c717-11e9-a3da-0242ac130004-4144953e-c717-11e9-a3da-0242ac130004 API Key for your tests but it has much lower rate limits !

Options

The following properties can be configured:

Option Description
latitude The latitude of the desired point

This value is REQUIRED
longitude The longitude of the desired point

This value is REQUIRED
appid The StormGlass API key, which can be obtained by signing up on StormGlass portal. It's free for 50 requests per day!

This value is REQUIRED
units What units to use. Specified by config.js

Possible values: config.units = Specified by config.js, metric = Celsius, imperial = Fahrenheit
Default value: config.units
updateInterval How often does the content needs to be fetched? (Milliseconds)

Possible values: 1000 - 86400000
Default value: 60 * 60 * 1000 (1 hour)
animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 1000 (1 second)
showWindDirectionAsArrow Show the wind direction as an arrow instead of abbreviation

Possible values: true or false
Default value: false
showWavePeriod Show the wave period

Possible values: true or false
Default value: false
useBeaufort Use the Beaufort scale for wind speed and wave speed or using the default units.

Possible values: true or false
Default value: false
useKMPH Use KMPH as units for wind speed.

Possible values:true or false
Default value: true
roundTemp Round temperature value to nearest integer.

Possible values: true (round to integer) or false (display exact value with decimal point)
Default value: false
initialLoadDelay The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds)

Possible values: 1000 - 5000
Default value: 0
retryDelay The delay before retrying after a request failure. (Milliseconds)

Possible values: 1000 - 60000
Default value: 2500 (2,5 seconds)
apiBase The StormGlass API base URL.

Default value: 'https://api.stormglass.io/'
apodEndpoint The StormGlass API endPoint.

Default value: 'v1/weather/point'
params The comma separeted list of params for the StormGlass API response.

Default value: 'airTemperature,waterTemperature,windSpeed,windDirection,waveHeight,waveDirection,wavePeriod'
dataSource The StormGlass API information source.

Possible values: 'sg' or 'noaa'
Default value: 'sg' (StormGlass).

Todo

  • Add a coloured legend depending on the water temperature
  • Convert data to the selected unit system with config.units
  • Add the Air temperature

License

This module is licensed under the MIT License

You can’t perform that action at this time.