smartthings-aqi / air-quality-light

A SmartThings SmartApp that changes light color according to air quality data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Air Quality Light

A SmartThings SmartApp that changes light color according to air quality data.

AQI Table

AQI Air Pollution Level Light
0 - 50 Good Off
51 - 100 Moderate Yellow
101+ Unhealthy Red

Prerequisites

Create the hosting service

  1. Go to Glitch, select New project, select Import from GitHub, and enter https://github.com/smartthings-aqi/air-quality-light in the pop-up dialog.
  2. In the newly created project, set the desire project name or custom domain.
  3. Select the .env file, and set the value of WAQI_TOKEN to your WAQI API token.
  4. Wait for the project the be built and deployed.

Create the SmartApp

  1. Go to Developer Workspace, create a new project, choose Automation for the SmartThings App as the project type, and give the project a name.
  2. In the newly created project, select Register App.
  3. In the Hosting tab, select WebHook Endpoint, and enter the Glitch project URL as the Target URL.
  4. In Name & Scope tab, enter a name and a description for the app, and select r:devices:* and x:devices:* as required permissions.
  5. In the Advanced Settings tab, select Save.

Create the routine

  1. In the SmartThings app, go to Automations, select the + sign, then select Create routine.
  2. Select the Discover tab, scroll to the bottom, then select the SmartApp.
  3. In Location, enter the coordinate to check for air quality in the format of LATITUDE,LONGITUDE, select a checking interval, select which light to change color, then select Done.

About

A SmartThings SmartApp that changes light color according to air quality data.

License:Apache License 2.0


Languages

Language:JavaScript 99.2%Language:Shell 0.8%