Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Render Dashboard, then select Add new > Web Service.
  2. Select Public Git Repository, enter https://github.com/smartthings-aqi/air-quality-light, then select Connect.
  3. In the newly created project, add an environment variable named WAQI_TOKEN and set its value to your WAQI token, and configure the rest of the settings as needed.
  4. Select Deploy Web Service and 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 Render 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.

Verify and deploy the SmartApp

  1. Go to Render Dashboard, then navigate to the web service previously created.
  2. Navigate to Monitor > Logs, then look for an log entry similar to SmartThings confirmation URL is ***.
  3. Submit a GET requeat to the confirmation URL to verify the SmartApp.
  4. Go to Developer Workspace, then navigate to the Automation previously created.
  5. In Overview, Select Deploy to test.

Create the routine

  1. In the SmartThings app, go to Routines.
  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.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages