This fork incorporates the following changes.
- The O3 and PM2.5 metrics use subscripts for better readability.
- The custom css styling that is mostly inconsistent with the default MagicMirror CSS styling is removed.
- Table alignment has been adjusted to what I feel is better overall.
- Emoji icons are now displayed along with the textual description of the air quality. Pictorial elements are recognized and parsed faster than text.
- A new showLocation boolean has been added to the config which defaults to false. I expect the vast majority of users are displaying the air quality where they live and do not need to waste space displaying that location. In addition, it's arguably better and more space efficient to just hardcode the location text in the header.
This is a module for the MagicMirror. This module shows air quality based on the US AirNow API.
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/nigel-daniels/MMM-AirNow
. A new folderMMM-AirNow
will appear, navigate into it. - Execute
npm install
to install the node dependencies.
The entry in config.js
can include the following options:
Option | Description |
---|---|
api_key |
Required This is the API key you need to use to request Air Quality Index (AQI) data from the AirNow site. To request an API key visit the AirNow API site here Type: string Default Value: null |
zip_code |
Required The US location about which you are requesting AQI data. Type: string Default value: null |
interval |
How often the weather is updated. Type: integer Default value: 900000 // 15 minutes |
Here is an example of an entry in config.js
{
module: 'MMM-AirNow',
position: 'top_left',
config: {
api_key: 'your-api-key',
zip_code: '20500'
}
},
- request (installed via
npm install
)
Enjoy this module it's a port of one I had in a home-brew mirror project I had prior to moving to using MM2.
- Michael Teeuw for the MagicMirror2 framework that made this module possible.
- Sam Lewis whose MMM-Traffic module I use and whose code I learnt a great deal from.
- AirNow API Site for the helpful guides and information they publish on their APIs.