The API Key seems to be working on my wxpurpleair.php page that gets my PurpleAir Sensor ID and API key from Ken’s purpleair-inc.php.
Where does PWS get the API key? In PWS_easyweathersetup.php, in the Devices tab, it has my PurpleAir Sensor ID, the same Sensor ID as in the purpleair-inc.php file. I don’t see a location to enter my Sensor ID in the Api&Keys tab in PWS_easyweathersetup.php.
Line 4 of the new PWS_load_files.php. Comment line 3:
2 # test version purpleair API NOT a general update
3 #$purpleairAPI = '72F1 . . . 242'; // OLD obtain a developer key by e-mail at purpleiar
4 $purpleairAPI = 'X34 . . . 009'; // latest api key # 2023-09-04
5 # test version for the paid for purpleair API
I had the same problem as @novawx. I updated my PWS_load_files.php based on the information provided by @bitsostring and it’s working once again. Thank you @bitostring and Wim for (once again) updating the dashboard files due to a change driven by a data provider.
I’m not happy with the way PurpleAir has implemented their APIs, but they have made a few comments that they don’t want to charge to get your own data and that their API implementation will continue to evolve, so I’m hopeful.
So, the issue isn’t that I’ve run out of points, it’s the implementation of PWS_load_files.php? That file on my server is dated 2023-09-09. Looks like I need my current API on line 3 and then I have to request a new one and enter it on line 4?
If I get a new key, then I have to update my WD and Saratoga Weather implementation I assume with the new key. Ugh!
It’s also interesting my AQI has been near zero for almost 48 hours, along with all the others in my area, due to Tropical Storm Ophelia. I always thought it was the clean Canadian air that helped our air quality. I guess the tropics can help too.
AFAIK the new version of PWS_load_files,php referenced here is only for users that have a new, paid API key from PurpleAir. Users with an old, free API key do not need to change: I think that still works.
One has to put the user API which one got from Purpleair, ( either last year or a few weeks/ months ago) in the script n the first few lines.
Multiple old (test) versions of the scripts use one of my development keys which were only valid for the development to adapted the scripts to use an API-key.
But the validity those development keys are or will all end shortly.
Just make sure that you enter your API key in settings or the script.
As soon as I can acces the scripts I will add exemaples were and how to add.