Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by saratogaWX »

It appears they shut off the old queries like [nobbc]http://www.purpleair.com/json?show=4299[/nobbc] and now redirect to a server that won't respond to the query.

https://community.purpleair.com/t/disco ... n-urls/713 says
adrian
13h

After a few years of grace period, we are now redirecting these two URLs (www.purpleair.com/json and www.purpleair.com/data.json ) to a server that will not respond.

Please contact us if you have any questions or need any help getting going on our new API, at https://api.purpleair.com .
Sigh.. I've sent an email to request a READ key, and will rework my scripts to use it instead. Meanwhile, the realtime query script(s) are very broken.. no data available.

For weather software developers that support realtime queries, they'll have to obtain keys and rewrite that portion of their software.
Grumble.
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by ConligWX »

yep they are changing quite a bit

https://api.purpleair.com/

https://community.purpleair.com/t/purpl ... iq9ur6D0OQ

in the meantime you can grab code to display realtime widget just click on the "get this widget" and put it on a webpage for now.
Screenshot 2022-05-27 184853.png

like so: https://www.conligwx.org/wxairquality.php
You do not have the required permissions to view the files attached to this post.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by saratogaWX »

I've reworked the purpleair-inc.php script to use the new API. Seems to be working on my page now.

They were fairly fast in providing an API key, but stunningly, the process was via email... The FAQ on their site needs to be changed now that the old method is turned off.

It may be easier for folks to just use the widget from them instead...
You do not have the required permissions to view the files attached to this post.
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by ConligWX »

Thanks once again Ken for your work. Much appreciated :clap:
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
BeaumarisWX
Posts: 356
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by BeaumarisWX »

Hi Ken,
What script uses the "purpleair-inc.php" ?
Kind Regards,
Tony
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by ConligWX »

BeaumarisWX wrote: Sat 28 May 2022 11:32 pm Hi Ken,
What script uses the "purpleair-inc.php" ?
Kind Regards,
Tony
You do not have the required permissions to view the files attached to this post.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by ConligWX »

Ken

I found I had to add a second <br/> on line 395 (purpleair-inc.php) otherwise the $Description and $Message were on the same line or at least overlapping.

Code: Select all

<td class="auto-style9" style="width: 85%"><strong>' . $Description . '</strong><br/><br/>
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
BeaumarisWX
Posts: 356
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by BeaumarisWX »

Ah OK thanks Simon, appreciated.
I was hoping for the old wim or beteljuice one.
Cheers,
Tony
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by ConligWX »

BeaumarisWX wrote: Sun 29 May 2022 12:16 am Ah OK thanks Simon, appreciated.
I was hoping for the old wim or beteljuice one.
Cheers,
Tony
no worries, got mine up and running now.

https://www.conligwx.org/wxpurpleair.php
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
BeaumarisWX
Posts: 356
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by BeaumarisWX »

Yep,
I'll use it for know till I can find a fix for the other one : https://beaumaris-weather.com/wxpurpleair_api.php
Also adapted a Dashboard one for the ajax-dashboard : https://beaumaris-weather.com/index.php
Also adjusted as best I could for Tasmanian Category Calcs / Colors / Descriptions. etc.
Kind Regards,
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Heads-up: PurpleAir JSON query now requires an API key... grrrrr.

Post by ConligWX »

Ken there maybe changes to the api soon, not sure if they will affect your script however.


As far as I can tell the is will add the ability to poll for history too.
BA6654CE-304D-4D5E-B29A-79B9A1F7C6E6.png


https://community.purpleair.com/t/previ ... istory/853
You do not have the required permissions to view the files attached to this post.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
Post Reply