Giter VIP home page Giter VIP logo

mmm-forecast-io's Introduction

This fork is based on the good work from dmcinnes/MMM-forecast-io and rklueber/MMM-forecast-io

screenshot

MMM-Forecast-IO

This an extension for MagicMirror that adds localized weather using Openweathermap (migrated from Darksky formerly known as forecast-io).

This module uses white icons by default. If you prefer color coded icons, merge the contents of the "Color-icons.md" file into your "css\custom.css" file.

I only tested the graph part of it, there might be some migration-problems in the forecast.

Using the module

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

modules: [
  {
    module: 'MMM-forecast-io',
    position: 'top_right',  // This can be any of the regions.
    config: {
      // See 'Configuration options' for more information.
      apiKey: 'abcde12345abcde12345abcde12345ab', // Dark Sky API key.

      updateInterval: 900000,  // 15 minutes

      showWind: true,
      showSunrise: true, 
      showSummary: true,
      showPrecipitationGraph: true,
      showForecast: true,

      // Only required if geolocation doesn't work:
      latitude:   16.77532,
      longitude: -3.008265
    }
  }
]

Configuration options

Option Description
apiKey The Dark Sky API key, which can be obtained by creating an Dark Sky 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
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: 300000 (5 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'
showForcast Toggles display of the seven-day weather forecast list.

Default value: true
showPrecipitationGraph Toggles display of the precipitation graph.

Default value: true
precipitationGraphWidth Width of the precipitation graph element in pixels.

Default value: 400
precipitationGraphHeight Height of the precipitation graph element in pixels.

Default value: 400
showWind Toggles display of current wind speed next.

Default value: true
showSunrise Toggles display of next sunrise or sunset time.

Default value: true
showSummary Toggles display of next hour's weather summary text.

Default value: true
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-cloudy',
      'hail':                'wi-hail',
      'thunderstorm':        'wi-thunderstorm',
      'tornado':             'wi-tornado'
    }

mmm-forecast-io's People

Contributors

dmcinnes avatar rklueber avatar andurii avatar flatpepsi17 avatar randomstring avatar arx237 avatar pyrosmiley avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.