Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paphko/mmm-weatherchart
Weather chart module for the magic mirror 2 project
https://github.com/paphko/mmm-weatherchart
Last synced: 22 days ago
JSON representation
Weather chart module for the magic mirror 2 project
- Host: GitHub
- URL: https://github.com/paphko/mmm-weatherchart
- Owner: paphko
- License: mit
- Created: 2016-08-16T20:12:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T07:11:00.000Z (about 2 years ago)
- Last Synced: 2024-04-14T05:29:47.025Z (8 months ago)
- Language: JavaScript
- Size: 251 KB
- Stars: 30
- Watchers: 3
- Forks: 19
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mmm - **MMM-WeatherChart**
README
# Magic Mirror Module: mmm-weatherchart
This [MagicMirror2](https://github.com/MichMich/MagicMirror) module allows you to show a weather diagram provided by http://www.yr.no![Screenshot](Screenshot1.png "Screenshot")
## Installation
In your terminal, go to your MagicMirror's Module folder:
````
cd ~/MagicMirror/modules
````Clone this repository:
````
git clone https://github.com/paphko/mmm-weatherchart.git
````Install module:
````
cd mmm-weatherchart
npm install
````Configure the module in your `config.js` file.
## Using the module
To use this module, you must first determine country, area, and city:
1. go to http://www.yr.no
2. Search for the location you want forecast for
3. Navigate to the bottom of the table to find the link for "Forecast as SVG"
4. Click the link to open in it in a new tab, and copy the url., e.g.: /en/content/2-3196359/meteogram.svgNow add the module to the modules array in the `config/config.js` file:
````javascript
modules: [
{
module: 'mmm-weatherchart',
position: 'bottom_left', // this can be any of the regions
config: {
locationPath: "/en/content/2-3196359/meteogram.svg",
updateInterval: 60 * 60 * 1000, // update every hour
hideBorder: true, // whether or not a border with city name should be shown
negativeImage: true, // whether or not the default white image should be inverted
hoursToShow: 24, // Cut the image down to show less than the full 48 hour forecast. -1 to show everything.
// mmDirectory: "/home/pi/MagicMirror/" // required for caching; adjust if it differs
}
},
]
````## Configuration options
The following properties can be configured:
Option
Description
Location path
Your url link (after www.yr.no) which determines your location to be shown.
updateInterval
Update interval of the diagram.
Default value:60 * 60 * 1000
(once every hour)
hideBorder
Whether or not a border with city name should be shown.
Default value:true
negativeImage
Whether or not the white image should be inverted.
Default value:true
hoursToShow
Cut the forecast down to this many hours (for a narrower picture).
Default value:-1
(show full forecast)
mmDirectory
To avoid the image to be cached by the browser (issue #5), it is downloaded into the magic mirror / modules / mmm-weatherchart / cache folder.
I couldn't find a way to ask MM for this path, so I just hard-coded it here with the possibility to adjust it in case your installation looks different.
Default value:/home/pi/MagicMirror/