Skip to content

PierreGode/MMM-airquality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-airquality

ko-fi Open Issues Open PRs Visitor Count

A module for the MagicMirror² to display air quality and Pollen information using data from the ambee API. This module provides real-time air quality index (AQI), other pollutants and pollen related data.

Screenshots

image image

Installation

Just clone the module into your modules directory:

cd ~/MagicMirror/modules
git clone https://github.com/PierreGode/MMM-airquality

Update

Just enter the module's directory and pull the update:

cd ~/MagicMirror/modules/MMM-NHL
git pull

Configuration

To use this module, you need to configure it in your config.js file of MagicMirror.

You can obtain an API key from ambee API

Configuration Example

Here is an example of the configuration:

{
  module: "MMM-airquality",
  position: "bottom_right",            // Choose any position you´d like
  config: {
    apiKey: "YOUR_AMBEE_API_KEY",      // Replace with your Ambee API Key
    latitude: "59.3293",               // Latitude of your location (Stockholm in this example)
    longitude: "18.0686",              // Longitude of your location
    showPM10: true,                    // Show PM10 data
    showPM25: true,                    // Show PM2.5 data
    updateInterval: 3600000,           // Update every hour ( ambee has 100 calls a day. and app uses 3 endpoints so lowest updateInterval is : ~2,618,181 milliseconds (about 43.6 minutes). )
    animationSpeed: 1000,              // 1 second for DOM animations
    showPollenForecast: true,          // Control pollen forecast display
    showGrassPollen: true,             // Option to show or hide Grass pollen
    showTreePollen: true,              // Option to show or hide Tree pollen
    showWeedPollen: true,              // Option to show or hide Weed pollen
    debug: false                       // Set to true to enable logging for debugging
  },
},

Configuration Options

Option Description
apiKey Required: Your AirVisual API key. Get it from here.
latitude Required: Your location's latitude. Example: "59.3293" for Stockholm.
longitude Required: Your location's longitude. Example: "18.0686" for Stockholm.
showPM10 Show or Hide ( true : false ) PM10 data.
showPM25 Show or Hide ( true : false ) PM10 data.

Errors

[ERROR] [MMM-airquality] Error fetching pollen data: 422:

This will mean that you have reached your 100 daily API call limmit. try setting updateInterval: to a higher number.

About

MMM-airquality from ambee AQI and Pollen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published