AQI Testtags are not working

I’ve just finished with a new Weather Display install from scratch. After the update for some reason my AQI testtags no longer work.

All the rest of testtags.php are fine. The testtags.txt is just not converting the AQI data. The AQI tags look the same as in testtags.php because it is not converting them. See the whole list below. I sure need help on this!

Here is the code for testtags.txt

// Davis AirLink Air Quality
$aqiplacerville = '%purpleairaqidavis%';
$aqiplacerville1_0 = '%purpleair1_0davis%';
$aqiplacerville2_5 = '%purpleair2_5davis%';
$placerville10_0 = '%purpleair10_0davis%';
$aqi = '%purpleairaqi%';
$aqidescription = '%purpleairaqidescription%';
$nowcast2_5 = '%purpleair2_5nowcast%';
$nowcast10_0 = '%purpleair10_0nowcast%';
$pct_pm_data_nowcast = '%pct_pm_data_nowcast%';
$min60mean10_0 = '%60minmeanpurpleair10_0%';
$min60mean2_5 = '%60minmeanpurpleair2_5%';
$hour24mean10_0 = '%24hourmeanpurpleair10_0%';
$hour24mean2_5 = '%24hourmeanpurpleair2_5%';
$min60min10_0 = '%60minminpurpleair10_0%';
$hour24min10_0 = '%24hourminpurpleair10_0%';
$min60min2_5 = '%60minminpurpleair2_5%';
$hou24rmin2_5 = '%24hourminpurpleair2_5%';
$min60max10_0 = '%60minmaxpurpleair10_0%';
$hour24max10_0 = '%24hourmaxpurpleair10_0%';
$min60max2_5 = '%60minmaxpurpleair2_5%';
$hour24max2_5 = '%24hourmaxpurpleair2_5%';

Here is the code for testtags.php:

// Davis AirLink Air Quality
$aqiplacerville = '%purpleairaqidavis%';
$aqiplacerville1_0 = '%purpleair1_0davis%';
$aqiplacerville2_5 = '%purpleair2_5davis%';
$placerville10_0 = '%purpleair10_0davis%';
$aqi = '%purpleairaqi%';
$aqidescription = '%purpleairaqidescription%';
$nowcast2_5 = '%purpleair2_5nowcast%';
$nowcast10_0 = '%purpleair10_0nowcast%';
$pct_pm_data_nowcast = '%pct_pm_data_nowcast%';
$min60mean10_0 = '%60minmeanpurpleair10_0%';
$min60mean2_5 = '%60minmeanpurpleair2_5%';
$hour24mean10_0 = '%24hourmeanpurpleair10_0%';
$hour24mean2_5 = '%24hourmeanpurpleair2_5%';
$min60min10_0 = '%60minminpurpleair10_0%';
$hour24min10_0 = '%24hourminpurpleair10_0%';
$min60min2_5 = '%60minminpurpleair2_5%';
$hou24rmin2_5 = '%24hourminpurpleair2_5%';
$min60max10_0 = '%60minmaxpurpleair10_0%';
$hour24max10_0 = '%24hourmaxpurpleair10_0%';
$min60max2_5 = '%60minmaxpurpleair2_5%';
$hour24max2_5 = '%24hourmaxpurpleair2_5%';

Any help would be much appreciated.

What AQ sensor do you have? I use PurpleAir and my testtags.txt file for AQI look like this and see the note I included in the first comment about the setup in WD:

// Air Quality (PurpleAir) added by Bill Bauman (see in WD under setup, advanced/misc)
// 23 June 2023
// First Sensor
$purpleair2_5 = '%purpleair2_5%'; //Value of 2.5 micron particle measure from purple air sensor 
$purpleair1_0 = '%purpleair1_0%'; //Value of 1.0 micron particle measure from purple air sensor
$purpleair10_0 = '%purpleair10_0%'; //Value of 10.0 micron particle measure from purple air sensor
$purpleairaqi = '%purpleairaqi%'; //AQI (air quality index) value from purple air sensor
$purpleairvoc = '%purpleairvoc%'; //VOC (volatile ogranic compounds) value from purple air sensor
$purpleairaqidescription = '%purpleairaqidescription%'; //AQI description (e.g Good, moderate)

// Second Sensor
$purpleair2_52 = '%purpleair2_52%'; //2nd sensor 2.5 reading
$purpleair1_02 = '%purpleair1_02%'; //2nd sensor 1.0 reading
$purpleair10_02 = '%purpleair10_02%'; //2nd sensor 10 reading 
$purpleairaqi2 = '%purpleairaqi2%'; //2nd sensor aqi reading
$purpleairaqidescription2 = '%purpleairaqidescription2%'; //2nd sensor aqi description

// end of testtags.txt/testtags.php

My testtags.php file looks like this:

// Air Quality (PurpleAir) added by Bill Bauman (see in WD under setup, advanced/misc)
// 23 June 2023
// First Sensor
$purpleair2_5 = '15.3'; //Value of 2.5 micron particle measure from purple air sensor 
$purpleair1_0 = '11.8'; //Value of 1.0 micron particle measure from purple air sensor
$purpleair10_0 = '16.2'; //Value of 10.0 micron particle measure from purple air sensor
$purpleairaqi = '57.6'; //AQI (air quality index) value from purple air sensor
$purpleairvoc = '67.7'; //VOC (volatile ogranic compounds) value from purple air sensor
$purpleairaqidescription = 'Moderate'; //AQI description (e.g Good, moderate)

// Second Sensor
$purpleair2_52 = '0.0'; //2nd sensor 2.5 reading
$purpleair1_02 = '0.0'; //2nd sensor 1.0 reading
$purpleair10_02 = '0.0'; //2nd sensor 10 reading 
$purpleairaqi2 = '0.0'; //2nd sensor aqi reading
$purpleairaqidescription2 = 'Good'; //2nd sensor aqi description

Thank you so much for looking into this! I would love to read your note, but I don’t see where your note is? Could you direct me?

I use the Davis AirNow AQI. I ran your code and I still have the same problem.

I ran your code with the same results.

Here is your testtags.txt:

$purpleair2_5 = '%purpleair2_5%'; //Value of 2.5 micron particle measure from purple air sensor 
$purpleair1_0 = '%purpleair1_0%'; //Value of 1.0 micron particle measure from purple air sensor
$purpleair10_0 = '%purpleair10_0%'; //Value of 10.0 micron particle measure from purple air sensor
$purpleairaqi = '%purpleairaqi%'; //AQI (air quality index) value from purple air sensor
$purpleairvoc = '%purpleairvoc%'; //VOC (volatile ogranic compounds) value from purple air sensor
$purpleairaqidescription = '%purpleairaqidescription%'; //AQI description (e.g Good, moderate)

Here is your testtags.php:

$purpleair2_5 = '%purpleair2_5%'; //Value of 2.5 micron particle measure from purple air sensor 
$purpleair1_0 = '%purpleair1_0%'; //Value of 1.0 micron particle measure from purple air sensor
$purpleair10_0 = '%purpleair10_0%'; //Value of 10.0 micron particle measure from purple air sensor
$purpleairaqi = '%purpleairaqi%'; //AQI (air quality index) value from purple air sensor
$purpleairvoc = '%purpleairvoc%'; //VOC (volatile ogranic compounds) value from purple air sensor
$purpleairaqidescription = '%purpleairaqidescription%'; //AQI description (e.g Good, moderate)

Thanks again kind sir!

i think you should be using these for the Davis AirNow
%purpleair2_5davis%…Value of 2.5 micron particle measure from Davis air sensor
%purpleair1_0davis%…Value of 1.0 micron particle measure from Davis air sensor
%purpleair10_0davis%…Value of 10.0 micron particle measure from Davis air sensor
%purpleairaqidavis%…AQI reading from Davis Air sensor

which are in the taglist,txt

Hey hcorrin thanks so much for taking the time to reply!

I know I have posted a lot of what looks like to me gobbaly Gook (sp?) but believe it or not all the values you posted are all listed in our code above.

Thanks again,
Xootneg

I should have said the comment line in the code:

// Air Quality (PurpleAir) added by Bill Bauman (see in WD under setup, advanced/misc)

It was a reminder to myself where I needed to look in WD for the AQI settings.

ISSUE SOLVED:

novawx
I know just the page. I’ve used it to render all of my Davis aqi data with my local API address.
Goto Setup >> Advanced/Settings >> Purpleair/Davis Air Quality tab.

The purpose for this thread is that my air quality testtags are fixed. I built a new WD instance and now they all work. So clearly my WD got corrupted which is what killed the aqi testags.

Just and FYI:
There are several other ways to make Davis AirLink AQI public, but a lot more difficult that having testtags (Thanks Brian). You can use Port forwarding which is super easy for my webcam but to make your Local API Davis data public has a high learning curve. Still having fun playing with that.

At least for PurpleAir, my data is displayed publicly via my webpages based on scripts by Chris Formeister and modified by Ken at Saratoga Weather:

Clayton, NC Weather - PurpleAir Realtime Air Quality
Clayton, NC Weather - Air Quality Map

Yes, that’s a little bit of a sore subject. Had I known that Davis basically owns your AQI data, I’ll just say I’'m real big fan of that.
Ken and I go back to the early Southwestern weather forum “maybe” about 16 years ago. The first one of its kind, now its world wide.