Post data to wunderground from terminal

I’m collection air quality data with my Raspberry Pi and would like to do uploads directly from it. I went through instructions in the WU but it’s not clear to me how could I send data to WU. Does anyone has an example for it? Ideally I’d do it with a bash script.
Thanks.

Found a solution, it’s pretty easy. Here is a sample code if anyone finds it useful:

curl "https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=<station_id>&PASSWORD=<password>&dateutc=now&AqOZONE=11&AqPM2.5=8&action=updateraw"

Check WU’s wiki for other fields.

now that WD supports the purpleair sensor, I can send that data (the PM2.5 data)
does it then show up on your wunderground data?

I have my own sensors (PM2.5 and O3) not the purpleair. I’d be interested if WD could read my textfile with air quality data and post it for me :slight_smile: (Same for the lightning)
I only did 2 uploads so far to test it. When I have more time, I’ll write a script. I just don’t have a measure to say what is 20 ppb or 10 ug/m3 . I want to let it run for a while to see if the sensors read reliably.

does your PM2.5 data actually show on your WU data ?

No, not yet. I only tested for 2 uploads in the afternoon. When I set up a script to do 5 min uploads, I’ll tell you.

OK, the script is posting the data now. It calculates the average of last 300 seconds and pushes the PM2.5 and ozone data to my WU. It is not calibrated but it should show a trend. We’re going into Autumn/Winter so the PM should increase gradually.
You can check my WU ID if you want but I don’t know when they accept my source. I’m ITOLMINT6
Thanks.

https://www.wunderground.com/personal-weather-station/dashboard?ID=ITOLMINT6

its not obvious where they will show that PM2.5 data?

I think (?) it shows only when selecting a city, not exact ID (correct me if I’m wrong). There is a field “Air Quality”

https://www.wunderground.com/weather/si/tolmin/ITOLMINT6?cm_ven=pwsdash_cityforecast

Does anyone send the air quality data to WU already (with purpleair)? What does it look like on the WU?

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

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.