Web Weather > Custom Website Templates
PurpleAir Integration with Saratoga-Weather Template
tlambert:
Hey Gang!
I have a PurpleAir Classic which I would like to integrate my Saratoga-Weather template. Could some one advise which additional scripts are necessary to a) pull the data from PurpleAir (I understand I'll need to get an API Key) and b) to display the information?
I'm running two stations a RainWise III and a Tempest using WeeWX.
Thanks for your guidance!
- Tim
joshua40:
Hi Tim,
To integrate PurpleAir with your Saratoga-Weather template:
API Key: Request it from PurpleAir API.
Pull Data: Use a script (e.g., Python or PHP) to fetch JSON data from the API.
Display: Add the data to your template where sensor info is shown—JavaScript can help for live updates.
Let me know if you need example scripts or further help!
Cheers,
-Joshua
Vasco:
AFAIK you don't need additional scripts, they are included in the distribution: wxpurpleair.php and purpleair-inc.php
ConligWX:
Script:
https://www.wxforum.net/index.php?topic=33482.0
here's mine as an example:
https://www.conligwx.org/wxpurpleair.php
tlambert:
Thanks Simon!
Unfortunately, I'm a bit lost as to which scripts I would need given several are being referenced.
I'm looking to replicate your AQI page -- could you possibly share the scripts to pull the PurpleAir data and the php script to render the data to the web page?
Thanks in Advance!
Tim
Navigation
[0] Message Index
[#] Next page
Go to full version