Purple Air data?

Posted on
Sat Sep 19, 2020 8:32 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Purple Air data?

It appears the existing Purple Air plugin no longer works, and the developer has not replied to forum posts or GitHub issues in quite a while. How many people are using, or would like to use, this data?

I looked at the so-called API for downloading data, and you can access any publicly listed Purple sensor with no authentication, so getting the data from the cloud servers doesn't seem to be very difficult. Private sensors look to be very difficult from a plugin. There's no published method for getting data directly from the sensor, only from the cloud servers. There might be a back door, I just haven't looked for it yet.

If I do a plugin, it's going to be pretty minimalistic. No geo-location, no "nearby" sensor lists, no AQI calculations. Just the raw data for sensors specified by ID number.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Sep 19, 2020 9:38 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Purple Air data?

I’m interested - question - if I had an outdoor sensor I understand it would work - but if I also had an indoor sensor (marked private) could I still see it with your proposed approach?

_______
Norm

Posted on
Sat Sep 19, 2020 9:53 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Purple Air data?

norcoscia wrote:
I’m interested - question - if I had an outdoor sensor I understand it would work - but if I also had an indoor sensor (marked private) could I still see it with your proposed approach?


No, you would not. Here's the relevant section of the FAQ on fetching the data:

If you want to access data from a private sensor the Owner's Email for the sensor must be a Google account and you must login with that Google account on purpleair.com before navigating to purpleair.com/json. To update the Owner's Email on a sensor that was previously registered contact us.


So the browser has to have cookies identifying the user as logged in to Google in order to fetch private data associated with that Google account. The plugin doesn't use a browser, and there's no good way for me to add the appropriate cookies to the request.

It's actually a pretty horrible pseudo-API. Basically it allows you to download data that they use to build their map. You either get a list of all known sensors, or you specify a specific sensor by ID number (which isn't obviously defined anywhere). And the actual JSON data you get is very poorly defined.

I've got the data fetching working. I'm trying to figure out how to deal with the outdoor units that have two sensor channels. Create two devices? Create one device with twice as many states for all the duplicated data?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Sep 19, 2020 10:58 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Purple Air data?

So the part about getting a link to share with family / friends does not help?

_______
Norm

Posted on
Sat Sep 19, 2020 10:59 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Purple Air data?

norcoscia wrote:
So the part about getting a link to share with family / friends does not help?


Oh, maybe. Can you DM me the link so I can test it?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Sep 19, 2020 11:02 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Purple Air data?

I don’t have the sensor(s) yet - I wanted to make sure I could integrate them with Indigo before I purchased them :-(

_______
Norm

Posted on
Sat Sep 19, 2020 11:03 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Purple Air data?

Well, maybe someone who does have the sensors can send me a link.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests