Post data to wunderground from terminal

I’ve noticed my WU data is blanked out because it’s being uploaded from 2 different sources. WD uploads weather values, a bash script uploads OZONE and PM2.5 fields only.
Hmm … could WD read my OZONE and PM2.5 text files? I can adapt the content to any format required.

WD does currently read data from a purple air sensor
via a text file
if you have the PM2.5 data in that file in the same format that WD will read it in

Downloaded and installed. I see the PurpleAir tab. Could you please advise where should the file be placed to? What is the file format and name? Could I upload the O3 data as well?

there is a thread about the purpleair sensor in WD
there are 2 files
airquality.txt and airquality2.txt
that thread has examples of what is in those files :wink:

if you can create a file called airquality2.txt, where WD is installed, and have in it format like
“PM2_5Value”:“2.5”
then WD will pick up that value

I could also make WD look for a ozone value in that file
e.g use format
“OZONEValue”:“2.5”

You are genious. Thanks! I suppose it uploads to WU as well?

it does
make sure you have ticked that you have the purple air sensor under setup, advanced/misc
and make sure you have the latest update

I’ve been sending the PM2.5 data to WU for a week but I can’t see it in their records. WD (under WU setup) shows that it does send the AqPM2.5 tag so I suppose this should be OK?

yeah, same problem here
so what was all this about wunderground in partnership with purple air etc but they do not actually show the air quality data you send them as per their own api?

Agree. If I find time, I’ll set up another station ID tomorrow and send only PM2.5 and Ozone to it. Let’s see then.

Just to follow up on this; I’ve looked at the data log today and I see that WD is not taking the file content reliably. I get lots of zero (0) readings even if file content is different (it is a floating point value, e.g. 5.6789). I compared WD’s day log with raw plot (with gnuplot) to confirm my raw data is OK.
It’s not urgent but I thought to ask you here. I’ve checked for file permissions and should be OK.

Any opinion to the thing I’m observing?

the latest update (.zip) WD will not not use a value if picked up as zero (hopefully)

Hmm… I did use the latest (Oct.9) build but there are still 0 readings even if the actual airquality2.txt contains a value greater than 0. I’ve been monitoring for a couple of days.
With Purple Air, it is probably more reliable? I’m trying to avoid the cost of the Purple Air and just use this cheap dust sensor :slight_smile:

if you could email me the file used when WD picks up a zero reading?

I think I have resolved the issue. Arduino was sending the 20-second average data to a RPi. Here, the data was further averaged by 3 samples (=1 min in total) and then written to an airquality2.txt file. It was a floating point number with no restriction in the decimal places. When there were only 2 ( I think), WD picked the number OK and calculated the AQI. When there were more than 2 decimal places, it took 0. I changed my script to limit the decimal places to 2 and now it works OK.

that will be it

Coming back to this. Is there a limitation in the WD for the maximum AQI? My sensor is very sensitive to fog and it currently reads very high values (AQI >170). In WD I see values drop to 0. When it comes back to <160, it is OK.

BTW: WU is showing my data now.

if above 500 PM2_5 then that will happen
I can fix that (and so just set a ceiling)

Don’t do that just for me. It could also be my sensor. I just wanted to verify if there is a such limitation (by accident) that would limit the AQI calculation to 170. I’ll keep an eye what is going on. Right now we have conditions for such readings (fog + smoke from heating).