Author Topic: purpleair weewx  (Read 1323 times)

0 Members and 1 Guest are viewing this topic.

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
purpleair weewx
« on: March 23, 2019, 11:21:04 PM »
Has anybody got the purple air plugin working with weewx?

I got it to collect the data but I am a bit lost on how to configure the skin.conf and how to add it to the .tmpl

https://github.com/bakerkj/weewx-purpleair


TIA!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline vinceskahan

  • Senior Contributor
  • ****
  • Posts: 181
    • home site
Re: purpleair weewx
« Reply #1 on: March 24, 2019, 02:41:22 PM »
The same way you add any custom data to a skin in weewx.

The readme file for the PA extension looks right to me.  If you have it collecting data you need to:
  • add the block to skin.conf so it generates whatever image(s) you want
  • create or edit a .tmpl file to have it display that image
  • similarly create or edit a .tmpl file to have it display a text value of the element(s) you want

You have the extension installed and it's collecting data so you're 95% of the way there.

So using the https://github.com/bakerkj/weewx-purpleair readme info as an example, I'd suggest you just try the examples in the 'Display the data' section on that page. The github page shows an example of:

   [[[daypurpleair]]]
       data_binding = purpleair_binding
       [[[[pm2_5_cf_1]]]]


What you want to do is add that somewhere in the [[day_images]] section of your skin.conf file, similarly to where you'll see [[dayrain]] or the like already, if you're editing the StandardReport (for this example).  The result is you will generate a pm2_5_cf_1.png output file when the reports run periodically.

You'd then just reference it in your .tmpl file by adding the html like the other graphs use.   Something like:
            <img src="pm2_5_cf_1.png"      alt="PM 2.5" />
Again use 'dayrain' as your example for where you need to add a line, suitably edited of course.

For making the numerical values appear in the .tmpl you would similarly edit his example into the .tmpl of your choosing.    His readme shows multiple examples.





WeeWX sites:
  Davis VP2+DFARS to a pi4
  EcoWitt GW1000, WH32 outdoor T+H, multiple WH31 indoor T+H, WH51 soilMoisture (docker)
  Davis AirLink (inside)
  PurpleAir (outside)
Home site:        https://www.skahan.net/
Wunderground: KWAFEDER15
PWS:                KWFEDER15
CWOP:              CW6881

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: purpleair weewx
« Reply #2 on: March 24, 2019, 04:30:57 PM »
Thank you for your detail reply!


:D

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: purpleair weewx
« Reply #3 on: March 24, 2019, 05:39:13 PM »
Is there some confusion in the process because WeeWX changed the default templates between v3.8 and v3.9?  Just curious, since I have not installed the update yet.....
WU Gold Stars for everyone! :lol:

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: purpleair weewx
« Reply #4 on: March 24, 2019, 06:00:33 PM »
Is there some confusion in the process because WeeWX changed the default templates between v3.8 and v3.9?  Just curious, since I have not installed the update yet.....


No, My I was just lost... I started using weewx way back in the days when I first started PWS.... But I changed to Meteohub/Bridge and forgot everything about weewx. I am a visual guy... Once you give me the visual I can pick it up.
I am starting to use weewx again due to its powerful plug/extensions
 
Thanks again!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline vinceskahan

  • Senior Contributor
  • ****
  • Posts: 181
    • home site
Re: purpleair weewx
« Reply #5 on: March 25, 2019, 06:54:57 PM »
Is there some confusion in the process because WeeWX changed the default templates between v3.8 and v3.9?  Just curious, since I have not installed the update yet.....

Don't worry 3.8 vs. 3.9 - you can run 3.9 with the new Seasons skin disabled and the old Standard skin enabled if you want.  It's a simple upgrade, just be sure to check your weewx.conf to run the one(s) you want.
WeeWX sites:
  Davis VP2+DFARS to a pi4
  EcoWitt GW1000, WH32 outdoor T+H, multiple WH31 indoor T+H, WH51 soilMoisture (docker)
  Davis AirLink (inside)
  PurpleAir (outside)
Home site:        https://www.skahan.net/
Wunderground: KWAFEDER15
PWS:                KWFEDER15
CWOP:              CW6881

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: purpleair weewx
« Reply #6 on: March 25, 2019, 07:20:30 PM »
I'm not too worried about my setup, since I'm using the Belchertown skin.  I was wondering of the OP was following directions for the v3.8 and earlier skin on a new v3.9 install.

The big reason why I didn't do the upgrade yet is because I also want to swap out the SD card on the Pi, because it has been online for a year now and I don't like to run them more than a year due to the write cycle lifetime limits in Flash RAM.....
WU Gold Stars for everyone! :lol: