Skip to content
Module for MagicMirror2. Display the air quality index from aqicn website
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
translations Added MMM-aqicn Jan 19, 2019
.gitignore Added MMM-aqicn Jan 19, 2019
LICENSE Initial commit Jan 19, 2019
MMM-aqicn.css Added MMM-aqicn Jan 19, 2019
MMM-aqicn.js Update MMM-aqicn.js Apr 25, 2019
README.md Added aqicn demo website to test token and location May 6, 2019
String.format.js Added MMM-aqicn Jan 19, 2019

README.md

MMM-aqicn

This is a module for the MagicMirror².

Display the air quality index from aqicn website (World Air Quality Index project).

This module is inspired by MMM-Looko2-aq

img

Using the module

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

var config = {
    modules: [
        {
        module: "MMM-aqicn",
        position: "top_right",
        header: "Air Quality Index",
        config: {
            token: "XYZ",
            stationName: "Bangkok University Rangsit Campus, Pathum Thani",
            showDetails: true
            }
        }
    ]
}

You might need to specify the country in the stationName if your station is not found. In our examply, it would be Bangkok University Rangsit Campus, Pathum Thani, Thailand.

You can test your token and your location by visiting http://aqicn.org/json-api/demo/.

Configuration options

Option Description
token Required Token to access the aqicn API. Can be retrieved from https://aqicn.org/data-platform/token/.
stationName Required Name of the station. For example Bangkok University Rangsit Campus, Pathum Thani for http://aqicn.org/city/thailand/bangkok/bodindecha-sing-singhaseni-school/.
showDetails Optional Toggle PM10, PM2.5, O3 values printing.
showLocationName Optional Show location label.
updateInterval Optional How often the module should reload the air quality data (in minutes).
You can’t perform that action at this time.