Skip to content

HACS World's Air Quality Index integration from waqi.info

Notifications You must be signed in to change notification settings

Norbator/worlds-air-quality-index

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

worlds-air-quality-index

A Home Assistant custom Integration for World's Air Quality Index (waqi.info).

Integration supports below sensors of WAQI station:

  • Air Quality Index
  • Carbon monoxide (CO)
  • Nitrogen dioxide (NO2)
  • Ozone (O3)
  • Particulate matter (PM10)
  • Particulate matter (PM2,5)
  • Sulphur dioxide (SO2)
  • Atmospheric pressure
  • Humidity
  • Temperature
  • Rain
  • Wind speed
  • Wind direction

Diffrent stations support diffrent data, "World's Air Quality Index" integration will recognise all parameters (availible in station) according to list of integration's supported sensors.

WAQI supports diffrents API from

There are 2 supported integration methods:

  • using geolocalized coordinates (it works with WAQI internal stations only),
  • using station ID.

Notice: WAQI API supports 2 diffrend methods of providing station ID. It depends on the station is internal WAQI station or downloaded from other source by their API. Intenal stations needs to put just a number of station ID (without @ char). For external stations it needs to put station ID number with 'A' char prefix. If you want to integrate some station using ID, but you don't know what method you need to use, you can always check it using web browser. You just need to copy one of below link, paste to the URL of web browser, change number of interested station, and paste your token insted {{token}}

https://api.waqi.info/feed/@13837/?token={{token}} or https://api.waqi.info/feed/A254464/?token={{token}}

Web browser will receive some data, if station is supported or "Unknown ID" message, if it doesn't, but one of above link types should work.

Installation

Use HACS to install this repository. You can also copy worlds_air_quality_index folder into /config/custom_components of Home Assistant instance, then restart HA.

Adding Integration

To add integration use "Add Integration" button in section Settings->Devices&Services section, and choose "World's Air Quality Index". In popup window choose method of station adding:

  • using geographic localization (NOTICE: it works with WAQI internal stations only),
  • using station ID (NOTICE: it works with all API types available in WAQI:
    • WAQI internal stations,
    • stations from CanAir.IO,
    • stations from Citizen Science project luftdaten.info.

In case of geographic localization, there will be shown next window, where you need to put:

  • your waqi.info account token (required),
  • latitude of WAQI station (required),
  • longitude of WAQI station (required),
  • your own name of station (optional).

In case of station ID, there will be shown next window, where you need to put:

  • your waqi.info account token (required),
  • ID of WAQI station (required) - WAQI Internal stations it is needed to put just a number (without @ char), for stations from other sources it needs to put 'A' char as a prefix(eg. A67564),
  • your own name of station (optional).

To get WAQI token you need to sign up here. As a default your home coordinates (set in HA) are putten in latitude and longitude fields in geographic localization method. This integration will find the clostest station, what is supported by waqi.info API. If you won't put your own name it will take name of found station. You can add more than 1 station.

About

HACS World's Air Quality Index integration from waqi.info

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%