Skip to content

jclarke0000/MMM-MyWeather

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module: Weather Underground Forecast

This is a module for MagicMirror, forked from RedNax67's MMM-WunderGround https://github.com/RedNax67/MMM-WunderGround.git (MMM-WunderGround is a modified version of the default weatherforecast module.)

This is nearly identical to the MMM-WunderGround module with a couple of tweaks and style changes.

Five additonal configurations are added:

  • currentweather: 1 or 0
  • currentweatherdetails: 1 or 0
  • forecasttable: 1 or 0
  • forecasttablecolumnheadericons: 1 or 0
  • forecasttableheadertext: Whatever title you would like above the forecast table.

The Weather Icons used in this module are created and maintained by Erik Flowers. v1.0 artwork by Lukas Bischoff. v1.1 - 2.0 artwork by Erik Flowers www.weathericons.io

Installing the module

Clone this repository in your ~/MagicMirror/modules/ folder ( $ cd ~MagicMirror/modules/ ):

git clone https://github.com/jclarke0000/MMM-MyWeather.git

Using the module

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

modules: [
  {
    module: 'MMM-MyWeather',
    position: 'top_right',
    config: {
      apikey: 'xxxxxxxxxxxxx', // private; don't share!
      pws: 'pws:IGELDERL219', //culemborg
      hourly: '1',
      fctext: '1',
      fcdaycount: "5",
      fcdaystart: "0",
      hourlyinterval: "3",
      hourlycount: "2",
      alerttime: 10000,
      alerttruncatestring: "english:",
      roundTmpDecs: 1,
      UseCardinals: 0,
      layout: "horizontal",
      sysstat: 0
    }
  },
]

Configuration options

The following properties can be configured:

Option Description
pws Can be any WU api location info.

US Example: NY/New_York
Example: locid:NLXX8014;loctype:1

This value is REQUIRED
apikey The Weather Underground API key, which can be obtained by creating an OpenWeatherMap account. You need either Cumulus or Anvil plan for this module. As long as you make less than 500 queries a day, this is free.

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
coloricon show Current Weather Icon in color

Possible values: true, false
Default value: false
fcdaycount How many days of forecast to return. Specified by config.js

Possible values: 1 - 10
Default value: 7 (7 days)
This value is optional. By default the wunderground module will return 7 days.
fcdaystart On which day to start the forecast. Specified by config.js

Possible values: 1 - 10
Default value: 0 (Today)
This value is optional. By default the forecast will start today.
fctext Display human readable forecast text. Specified by config.js

Possible values: 0 - 1
Default value: 1 (Will display text)
This value is optional. By default the forecast text will be displayed.
scaletxt Scale forecast text when over 3 lines. Specified by config.js

Possible values: 0 - 1
Default value: 1 (Will scale text)
This value is optional. By default the forecast text will be scaled when needed.
daily Display daily forecasts. Specified by config.js

Possible values: 0 - 1
Default value: 1 (Will display daily forecasts)
This value is optional. By default the daily forecast will be displayed.
hourly Display hourly forecasts. Specified by config.js

Possible values: 0 - 1
Default value: 1 (Will display hourly forecasts)
This value is optional. By default the hourly forecast will be displayed.
hourlycount How many hourly forecasts. Specified by config.js

Possible values: 0 - 24
Default value: 2
This value is optional. By default 2 hourly forecasts will be displayed.
hourlyinterval Hours between hourly forecasts. Specified by config.js

Possible values: 1 - 24
Default value: 3 (Will display hourly forecasts with 3 hour interval)
This value is optional.
updateInterval How often does the content needs to be fetched? (Milliseconds)
Note that Wunderground updates every 15 minutes maximum. Also free version of API only allows 500 calls per day.
Possible values: 1000 - 86400000
Default value: 900000 (15 minutes)
animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 2000 (2 seconds)
lang The language of the days.

Possible values: en, nl, ru, etc ...
Default value: uses value of config.language
fade Fade the future events to black. (Gradient)

Possible values: true or false
Default value: true
fadePoint Where to start fade?

Possible values: 0 (top of the list) - 1 (bottom of list)
Default value: 0.25
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
alerttime The amount of time the alert is duisplayed. (Milliseconds)

Possible values: 1000 - 60000
Default value: 10000
alerttruncatestring Truncates the aletr text at the defined word (Milliseconds)

Possible values: any string
Default value:
roundTmpDecs Rounds off the current temperature display

Possible values: number
Default value: 1
windunits Which units to use for windspeed

Possible values: "mph", "kph", or "bft"
Default value: "bft"
UseCardinals Toggles the use of winddirection arrow or cardinals

Possible values: 0 or 1
Default value: 0
layout Chooses the layout option

Possible values: "horizontal" or "vertical"
Default value: "vertical"
iconset Selects the style of icons to show

Possible values: "colourful", "dark", "flat_black", "flat_colourful", "flat_white", "light", "novacon", "sketchy", "VCloudsWeatherIcons", "weezle"
Default value: "VCloudsWeatherIcons"
sysstat Toggle sysinfo display

Possible values: 0 or 1
Default value: 0
debug Toggle debug logging

Possible values: 0 or 1
Default value: 0
currentweather Toggle current conditions (large temperature and icon display)

Possible values: 0 or 1
Default value: 1
currentweatherdetails Toggle detailed current conditions (wind speed, humidity, sunrise, moon phase)

Possible values: 0 or 1
Default value: 1
forecasttable Toggle forecast table

Possible values: 0 or 1
Default value: 1
forecasttablecolumnheadericons Toggle icons above forecast table (thermometer, umbrella)

Possible values: 0 or 1
Default value: 1
forecasttableheadertext Text you would like above the Forecast table

Default value: Forecast
timeFormat How to format the time for hourly forecast. Use Moment.js supported formats (https://momentjs.com/docs/#/displaying/)

Default value: "h a"

About

Upgraded weather forecast module using WeatherUnderground

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 86.0%
  • Python 8.8%
  • CSS 5.2%