MagicMirror Project on Github | Air Quality Index
To use this module, create a new folder airquality
in the modules subfolder of your mirror and copy the content of this repository this this folder.
To run the module, you need to add the following data to your config.js file.
{
module: 'airquality',
position: 'top_center', // you may choose any location
config: {
location: 'beijing' // the location to check the index for
}
}
Use the part behind http://aqicn.org/city/ for your location. For example http://aqicn.org/city/netherland/utrecht/griftpark/ would be:
location: 'netherland/utrecht/griftpark/'
You may want to set the following options in the config section as well:
Option | Description |
---|---|
location |
The location for that you you want to show the air quality. This is REQUIRED. |
lang |
change the language This is OPTIONAL. Default value: en |
updateInterval |
change the update period in minutes This is OPTIONAL. Default value: 30 (minutes) |
showLocation |
toggle location printing This is OPTIONAL. Default value: true |
showIndex |
toggle index printing This is OPTIONAL. Default value: true |
Due to the AQI rendering script it is not possible to have multiple instances of this module running.
There is a bug in the skript that prevent some locations from being displayed (e.g. 'Mannheim').
Not all languages may be supported (see: http://aqicn.org/faq/2015-07-28/air-quality-widget-new-improved-feed/).