Jump to content

PurpleAir Charges for API Calls


Scott847
Go to solution Solved by bpwwer,

Recommended Posts

PurpleAir is starting to charge for API usage and sent me an email to let me know this would take effect for me on 11/28/2023. There is a cost per point and the number of points used is based on the number of API calls as well as the fields that are returned for each call.

In looking at the code I realized that the current PG3x PurpleAir plugin isn't specifying the "fields" parameter, which defaults to returning all data fields for the sensor even though most aren't sent to IoX. As a result each API call is currently using 155 points.

I've been pulling data from seven PurpleAir sensors at the default short poll time of 600 seconds, which means I would be getting charged for about 4,700,000 points per month. PurpleAir will be charging $1 per 100,000 points so this means my monthly charge if nothing changes would be about $47.00.

@bpwwer, could you look into using the "fields" parameter in the API calls to reduce points usage?

FYI PurpleAir support also provided this link that had more info about efficiently using their API calls: https://community.purpleair.com/t/how-to-make-efficient-api-calls/6906

Also FYI they'll be giving points credits to owners of PurpleAir sensors to offset any usage for API access to their devices. In an email to me they said "We don't want sensor owners to pay for API access for purchased sensors if the point use is reasonable and the API pulls are optimized."

I originally obtained an API key from them by email but since then they've created an API account management system where you can manage API keys and monitor usage at https://develop.purpleair.com/

Link to comment

They've been using the points system for quite a while now.  Seems like a good way to annoy customers to me.

There's a way to access the sensors locally without using their API and cloud services, it's on my list to change the plug-in to use local access instead of the API access.  Not sure yet when I'll get to it though.

Link to comment
  • Solution

Version 2.1.0 of the PurpleAir plug-in is now in the plug-in store.

This version adds the ability to configure the plug-in to query the sensor directly instead of using the API to query the cloud servers.   

I also optimized the API call to just request the fields being used.

Link to comment
On 11/14/2023 at 4:10 PM, bpwwer said:

Version 2.1.0 of the PurpleAir plug-in is now in the plug-in store.

This version adds the ability to configure the plug-in to query the sensor directly instead of using the API to query the cloud servers.   

I also optimized the API call to just request the fields being used.

Wow, thanks for the quick work!

I started using the new version and am also using the new direct local query for a PurpleAir sensor.

For a couple of locations I'm using the median of three nearby sensors so don't have a local sensor to query. It's great that the API call is now using 25 points per API call instead of 155.

When I let PurpleAir know about the change they said they're "working on a process to automatically assign points to sensor owners but we are not quite there" and to email them in the meantime as I need more free points.

Not sure if it's unique to my system but FYI I had to update a program line that uses the plugin perhaps because a "μg/m3" unit of measure was added at some point.

Link to comment

I did update some of the UOM's now that UDI added them to more recent IoX firmware.

I sent a message back to PurpleAir too.  I was kind of annoyed that they implemented the points system, then after a few months say oh, by the way, we're going to start charging for points now that you've used half of the "free" points we gave you to start.  Oh and did we forget to tell you about how optimize you're queries?

It feels like this points system is overly complex and I can't really see it generating much income if sensor owners really won't have pay for points.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...