Giacomo Balli profile picture
Giacomo Balli
Tech Entrepreneur | Advisor | Consultant

Over a decade of mobile experience at your service.
I help business owners navigate and leverage technology.

Let's Chat

How to add PurpleAir AQI to your Apple Watch

PurpleAir air quality index on your Apple Watch.


Do you like your Apple Watch? Do you like PurpleAir?
I certianly do and was bummed when I found out there was no way to add the current AirQualityIndex (AQI) to my watchface.
I made this for myself and am happy to share it with others who might be interested.
It's a prototype therefore the setup is not oversimplified but it gets the job done.

Update: Curious to know where to drive for clean air?
Check this out.

Air Quality Index (AQI) scale

AQIHealthColor
0-50GoodGreen
51-100ModerateYellow
101-150Unhealthy for SensitiveOrange
151-200UnhealthyRed
201-300Very UnhealthyPurple
301-500HazardousMaroon

Implementation

Sensor ID

Update: PurpleAir removed the Get this Widget button as detailed below.
Click here to find the sensor closest to you.

The beauty of PurpleAir is quantity of sensors placed around the city to provide the most accurate reading for your location.
The widget will query the sensor closest to you therefore you need to figure out which one it is.
To do this:
・head over to PurpleAir
・allow it to use your location
・turn off inside sensors from the control panel in the bottom left corner

・zoom in to your location and click on the closest sensor (a popup window will open)
・move your mouse over Get this Widget, click on "JSON" (a new window will open)

・in the new window copy the number after "ID": (53269 is mine for example)

・save this number, we will need it later

Download App

I tried several apps to add custom complications but the easiest one was Simple Complications.
・Download the app to your iPhone.

Setup App

The UI is very barebones but it reflects the simplicty of the app.
・in the top field (URL) type BigBalli.com/purpleAir.php?id=53269 (replace 53269 with the sensor ID you copied earlier)
・select JSON and Often
・tap on Setup Data Source in the top right corner
・type aqi in the top field

Add Complication

On your iPhone, open the Watch App add Simple Complications as a complication on your watch face.



Need help or have comments? Let me know!