This module is an updated version with appropriate image to display current weather condition using OpenWeatherMap API. This module displays the current weather, including the windspeed, the sunset or sunrise time, the temperature and an color icon as image to display the current conditions.
Note: MMM-OpenmapWeather is a modified version of the default currentweather
module.
Clone this repository in your ~/MagicMirror/modules/
folder ( $ cd ~MagicMirror/modules/ )
:
git clone https://github.com/sathyarajv/MMM-OpenmapWeather.git
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: "MMM-OpenmapWeather",
position: "top_left", // This can be any of the regions. Best results in left or right regions.
header: "Current Weather", //Location is the default value if header is empty or not defined.
config: {
// See 'Configuration options' for more information.
location: "Phoenix,USA",
locationID: "", //Location ID from http://openweathermap.org/help/city_list.txt
appid: "abcde12345abcde12345abcde12345ab", //openweathermap.org API key
colorIcon: true
}
}
]
The following properties can be configured:
Option | Description |
---|---|
location |
The location used for weather information. Example: 'Phoenix,USA' Default value: false Note: When the location and locationID are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. |
locationID |
Location ID from OpenWeatherMap This will override anything you put in location. Leave blank if you want to use location. Example: 1234567 Default value: false Note: When the location and locationID are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. |
appid |
The OpenWeatherMap API key, which can be obtained by creating an OpenWeatherMap 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 |
roundTemp |
Round temperature value to nearest integer. Possible values: true (round to integer) or false (display exact value with decimal point) Default value: false |
degreeLabel |
Show the degree label for your chosen units (Metric = C, Imperial = F, Kelvins = K). Possible values: true or false Default value: false |
updateInterval |
How often does the content needs to be fetched? (Milliseconds) Possible values: 1000 - 86400000 Default value: 600000 (10 minutes) |
animationSpeed |
Speed of the update animation. (Milliseconds) Possible values: 0 - 5000 Default value: 1000 (1 second) |
timeFormat |
Use 12 or 24 hour format. Possible values: 12 or 24 Default value: uses value of config.timeFormat |
showPeriod |
Show the period (am/pm) with 12 hour format Possible values: true or false Default value: true |
showPeriodUpper |
Show the period (AM/PM) with 12 hour format as uppercase Possible values: true or false Default value: false |
showWindDirection |
Show the wind direction next to the wind speed. Possible values: true or false Default value: true |
showWindDirectionAsArrow |
Show the wind direction as an arrow instead of abbreviation Possible values: true or false Default value: false |
showHumidity |
Show the current humidity Possible values: true or false Default value: false |
showIndoorTemperature |
If you have another module that emits the INDOOR_TEMPERATURE notification, the indoor temperature will be displayed Default value: false |
onlyTemp |
Show only current Temperature and weather icon without windspeed, sunset, sunrise time and feels like. Possible values: true or false Default value: false |
showFeelsLike |
Shows the Feels like temperature weather. Possible values: true or false Default value: true |
useKMPHWind |
Uses KMPH as units for windspeed. Possible values: true or false Default value: false |
useBeaufort |
Pick between using the Beaufort scale for wind speed or using the default units. Possible values: true or false Default value: true |
lang |
The language of the days. Possible values: en , nl , ru , etc ... Default value: uses value of config.language |
decimalSymbol |
The decimal symbol to use. Possible values: . , , or any other symbol.Default value: . |
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 |
apiVersion |
The OpenWeatherMap API version to use. Default value: 2.5 |
apiBase |
The OpenWeatherMap base URL. Default value: 'http://api.openweathermap.org/data/' |
weatherEndpoint |
The OpenWeatherMap API endPoint. Default value: 'weather' |
appendLocationNameToHeader |
If set to true , the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather. Default value: true |
calendarClass |
The class for the calender module to base the event based weather information on. Default value: 'calendar' |
iconTable |
The conversion table to convert the weather conditions to weather-icons. Default value: view tabel below. |
colorIcon |
If set to true , then the current weather displayed as color image else it will display as an icon. Default value: false |
showDewpoint |
Show the Air DewPoint Possible values: true or false Default value: false |
showPressure |
Show the Atmospheric Pressure Possible values: true or false Default value: false |