8000 GitHub - Sickboy78/MMM-pirateweather-hourly: Pirate Weather Module for MagicMirror
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Sickboy78/MMM-pirateweather-hourly

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MMM-pirateweather-hourly

This an extension for MagicMirror that adds localized weather using the Pirate Weather API (based off of MMM-darksky-hourly, which is the same but used Dark Sky API (originally Forecast.io)).

screenshot

This is a heavily modified version of MMM-forecast-io that aims to present current and hourly information on temperature and likelihood of rain.

Using the module

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

modules: [
  {
    module: 'MMM-pirateweather-hourly',
    position: 'top_right',  // This can be any of the regions.
    config: {
      // See 'Configuration options' for more information.
      apiKey: 'abcde12345abcde12345abcde12345ab', // Pirate Weather API key.
      latitude:   16.77532,
      longitude: -3.008265
    }
  }
]

Configuration options

< 6670 /a>
Option Description
apiKey The Pirate Weather API key, which can be obtained by creating an Pirate Weather API account.

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

Possible values: config.units = Specified by config.js, default = Kelvin, metric = Celsius, imperial =Fahrenheit
Default value: config.units
twentyFourHourTime Whether to use 24-hour format time or not

Possible values: true = Time presented as XX:00, false = Time present as XXam/pm
Default value: true
showPrecipitationPossibilityInRow Show chance of precipitation at each hour

Possible values: true = Display precipitation possibility, false = Do not display precipitation details
Default value: true
showDayInRow Show day that hour occurs in

Possible values: true = Display day in row, false = Do not display day in row
Default value: true
showIconInRow Show weather icon in each hourly row

Possible values: true = Display icon in row, false = Do not display icon in row
Default value: true
fadeForecast Toggles fading of the last two forecast rows.

Default value: true
showCurrentWeather Toggles display of current weather (icon + temperature).

Default value: true
showTextSummary Toggles display of weather text summary.

Default value: true
language The language of the weather text.

Possible values: en, nl, ru, etc ...
Default value: uses value of config.language
updateInterval How often does the content needs to be fetched? (Milliseconds)

Forecast.io enforces a 1,000/day request limit, so if you run your mirror constantly, anything below 90,000 (every 1.5 minutes) may require payment information or be blocked.

Possible values: 1000 - 86400000
Default value: 600000 (10 minutes)
animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 2000 (2 seconds)
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
latitude The latitude location in decimal. Set this (and longitude) as the location for the forecast. If this is not set, the module will attempt to approximate using browser geolocation.

Example value: 16.77532
Default value: null
longitude The longitude location in decimal. Set this (and latitude) as the location for the forecast. If this is not set, the module will attempt to approximate using browser geolocation.

Example value: -3.008265
Default value: null
apiBase The Dark Sky API base URL.

Default value: 'https://api.darksky.net/forecast'
maxHoursForecast Limit how many hours of weather forecast.

Default value: 8
skipHours Set how many hours should be skiped between two rows.

Example value: 1
This will show every other hour (e.g. 3, 5, 7 ...)
Default value: 0
iconTable The conversion table to convert the weather conditions to weather-icons.

Default value:
iconTable: {
      'clear-day':           'wi-day-sunny',
      'clear-night':         'wi-night-clear',
      'rain':                'wi-rain',
      'snow':                'wi-snow',
      'sleet':               'wi-rain-mix',
      'wind':                'wi-cloudy-gusts',
      'fog':                 'wi-fog',
      'cloudy':              'wi-cloudy',
      'partly-cloudy-day':   'wi-day-cloudy',
      'partly-cloudy-night': 'wi-night-alt-cloudy',
      'hail':                'wi-hail',
      'thunderstorm':        'wi-thunderstorm',
      'tornado':             'wi-tornado'
    }

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.7%
  • CSS 13.3%
0