Coder Social home page Coder Social logo

mmm-airnow's Introduction

MMM-AirNow

Air now

This is a module for the MagicMirror. This module shows air quality based on the US AirNow API.

Installation

  1. Navigate into your MagicMirror's modules folder and execute git clone https://github.com/nigel-daniels/MMM-AirNow. A new folder MMM-AirNow will appear, navigate into it.
  2. Execute npm install to install the node dependencies.

Config

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'
                }
},

Dependencies

  • request (installed via npm install)

Notes

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.

Thanks To...

mmm-airnow's People

Contributors

nigel-daniels avatar plm avatar

Stargazers

Travis Hardiman avatar  avatar Amaya avatar  avatar  avatar  avatar  avatar Graham McIntire avatar Ankur Tyagi avatar

Watchers

 avatar  avatar

mmm-airnow's Issues

Data never loads

The AirNow API has likely changed since the last commit. There are no errors, it just displays "Loading air quality data..."

Config based threshold to display

I only want the air quality if it not the usual "good" quality for my area. To achieve this I added a config variable threshold that only displays values that are above that threshold and hides the whole module if there are no values above that threshold.

It's working fine for more locally, I wanted to see if this is something you would want to have merged in.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.