Weather Underground’s Next Frontier: Air Quality

Jachym, the data from the PurpleAir sensor (as I wrote above, there are two sensors) is sent to the ThingSpeak site (cloud storage). From there, the designer/reseller of the PurpleAir sensor processes the raw data and displays the AQI information on the Google map - you will probably notice there are not too many PurpleAir sensors outside North America.

Clicking on a marker on the Google map opens an information window that is produced with the data uploaded by the PurpleAir sensor.

As I mentioned previously, the temperature (the humidity and the pressure) values displayed on that information screen are completely wrong (the values do not represent in any way the ‘real’ temperature outside the PurpleAir sensor) as the temperature (the humidity and the pressure) sensors are located inside a unit with very little air change/movement (I have asked the designer/reseller of the PurpleAir sensor, at least a dozen times, to remove those values, as well as their Highcharts graphics, as they are not representative of ‘near-real-time’ temperature (humidity and pressure) values).

this looks easy to support Rob
I will get you a test program to see if that can get the json output to a file

Rob
try
http://www.weather-display.com/downloadfiles/cronairquality.zip
and set the url like 192.168.0.1/json/
i.e like you do in the browser, but without the http://

and click test
and then see if a file called airquality.txt is created in c:\wdisplay
and email me that (if it has valid data in it)

Brian, when I enter the URL link as ‘192.168.200.145/json’, I get an error window with the message ‘152: No server specified in URL.’.

If I enter the URL link as ‘http://192.168.200.145/json’, I get an error window with the message ‘302: Can’t open local file for writing.’ but I also get a three lines message in the ‘Cron Air Quality’ window:



OK
OK
Can't open local file for writing.

No new file is created in the Weather Display directory - the file ‘airquality.txt’ is not created.

Without closing the ‘Cron Air Quality’ window, if I replace the URL simply with ‘192.168.200.145/json’ then I get a different new error window with the message ‘276: Server disconnected before handshake completion ()0xffffffff).’.

I even tried running ‘cronairquality.exe’ with administrative privilege without any change in the results.

In all situations/tests, the file ‘airquality.txt’ is never created.

do you have WD installed and running from c:\wdisplay ?

Not on my test computer nor on my online weather computer - on both computers, Weather Display is installed on drive ‘E’ in the ‘WeatherDisplay’ sub-directory (all weather related software are installed on drive ‘E’).

ah, hence the error
this test program assumed you had a directory c:\wdisplay
if you could create that, for now, for this test program …

I have just created an empty ‘C:\wdisplay’ directory into which I have placed (extracted) ‘cronairquality.exe’.

I first tried running ‘cronairquality.exe’ using the URL ‘192.168.200.145/json’ as first suggested and got the error window with the message ‘152: No server specified in URL.’!

Then I tried running ‘cronairquality.exe’ using the full URL ‘http://192.168.200.145/json’ and, low-and-behold, the data file ‘airquality.txt’ was produced. :wink:

Note: File ‘airquality.txt’ should be attached to this message.


airquality.txt (827 Bytes)

good
so it does need the http:// ( I was not sure if it would)
lots of data in the xml json type data
which is the data that is the air quality ?
it must be this data
“pm1_0_atm_b”:3.95,“pm2_5_atm_b”:5.47,“pm10_0_atm_b”:5.53,“pm1_0_cf_1_b”:3.95,“pm2_5_cf_1_b”:5.47,“pm10_0_cf_1_b”:5.53,“p_0_3_um_b”:817.95,“p_0_5_um_b”:235.60,“p_1_0_um_b”:31.86,“p_2_5_um_b”:1.81,“p_5_0_um_b”:0.07,“p_10_0_um_b”:0.26,“pm1_0_atm”:4.45,“pm2_5_atm”:6.25,“pm10_0_atm”:6.80,“pm1_0_cf_1”:4.45,“pm2_5_cf_1”:6.25,“pm10_0_cf_1”:6.80,“p_0_3_um”:1152.00,“p_0_5_um”:267.05,“p_1_0_um”:34.42,“p_2_5_um”:2.40,“p_5_0_um”:0.77,“p_10_0_um”:0.28}

what relates to what re what you see on the web site?

also new update of the test program
http://www.weather-display.com/downloadfiles/cronairquality.zip

it will remember the url now and you can run it from where you have WD installed and the output file will get created there now

I would say that
pm1_0_atm_b
is partical measure 1 (channel a?)

pm2_5_atm_b
is partical measure 2 (channel b?)

I think you will need to compare what the data is in that file, compared to what shows for your actual data at purpleair.com and try and work out what is what?

I am wondering what the difference is between pm10_0_atm_b and pm1_0_atm_b
maybe one is a 10 minute average?

I think this is a big clue

PurpleAir sensors use a fan to draw air past a laser, causing reflections from any particles in the air. These reflections are used to count particles in six sizes between 0.3μm and 10μm diameter.

Using one second particle counts, estimated total mass for PM1.0, PM2.5 and PM10 is averaged by the PurpleAir Internet of Things (IOT) control board.

Right, it says “Using a new generation of laser particle counters to provide real time measurement of (amongst other data), PM1.0, PM2.5 and PM10.”

so I think the first 3 numbers are the important ones
i.e to get PM1, 2.5 and 10
PM must stand for particle measure
and atm might stand for total mass ?

the data point on the map is just one number
which looks to be for the PM2.5 value ?
and 2.5 is the micron

PM2.5 is the particulate value the sites here use for AQI.

yup, that just dawned on me too (2.5 micron)

I have added support now to this update of WD
http://www.weather-display.com/downloadfiles/weatherdisplaytest.zip

see under setup,advanced/misc

custom tag is
%purpleair%
or the 2.5 micron particle measure value

Wow! You are really ‘super-active’ when you are awake… :lol:

Indeed, there are six ug/m3 values (particulate matter) being provided in the JSON data file: 0.3um particles/deciliter, 0.5um particles/deciliter, 1.0um particles/deciliter, 2.5um particles/deciliter, 5.0um particles/deciliter, and 10.0um particles/deciliter.

I am wondering what the difference is between pm10_0_atm_b and pm1_0_atm_b maybe one is a 10 minute average?
No, the JSON data file from the PurpleAir sensor does not contain average values - the 10 minute, 30 minute, 1 hour, 6 hour, 24 hour, and one week average values are only available from a JSON data file that can be downloaded from the ThingSpeak (cloud) storage.

The value mostly used is the PM2.5 - although two other values should also be considered important, PM1.0 and PM10.

In the JSON data file, the important value is the one found after the tag ‘pm2_5_atm’ - but I just wrote above, the values found after the tags ‘pm1_0_atm’ and ‘pm10_0_atm’ sould also be considered important.

Note: The values you see in the JSON data file are only for the PurpleAir sensor channel #1 - I do not think the values the PurpleAir sensor channel #2 are available using the aforementioned URL ‘http://192.168.200.145/json’ (lately, I have not been able to get any information, any technical support from the designer/reseller of the PurpleAir sensor).

Brian, where did you get the following information:

PurpleAir sensors use a fan to draw air past a laser, causing reflections from any particles in the air.
To my knowledge (and my ears), I knew that there was a small fan inside the PurpleAir PA-II sensor installed at my home but I could not find that information (about the fan) on the PurPleAir web site.
so I think the first 3 numbers are the important ones i.e to get PM1, 2.5 and 10 PM must stand for particle measure and atm might stand for total mass ?
Indeed, as mentioned above, the important values are PM2.5, PM1.0 and PM10. The PM usually stands for 'particulate matter' - unfortunately, I am not too sure for the 'atm' but it could easily mean 'at the moment' such as 'in-near-real-time'... :?
PM2.5 is the particulate value the sites here use for AQI. ... yup, that just dawned on me too (2.5 micron)
Indeed, you are both right, it is 2.5

I found that info on the purple air web site itself
yes, good idea re changing the tag names and adding 2 more
I also will make it where you can plot the 2.5 value (gathered every minute via the cronpurpleair.exe) on the main screen (which graph ?)

Rob
download another update (same URL as above)
as I have WD now saving the data to a data file so it can be graphed