Author Topic: personal air pollution sensor  (Read 4836 times)

0 Members and 1 Guest are viewing this topic.

Offline azchrisf

  • Cobra Weather Dominator Operator
  • Senior Contributor
  • ****
  • Posts: 225
    • Copperwood WX
Re: personal air pollution sensor
« Reply #75 on: February 01, 2018, 06:02:16 PM »
Wonder what's going on, they've been down a couple times in the last week.
And they offer a model with a SD Card so you can have local data too.

Also, I've found it pretty good at sensing pollution. For what it is, I think it's pretty good.
Also, I think the inventor was working on getting those numbers down, but of course a $250 item will never compare in accuracy to a $25K machine. It's one of those "good enough" thing I guess.
« Last Edit: February 01, 2018, 06:15:40 PM by azchrisf »

Offline Toxic

  • Senior Contributor
  • ****
  • Posts: 205
  • #conligwx
    • conligwx.org
Re: personal air pollution sensor
« Reply #76 on: February 05, 2018, 05:57:43 PM »
Is it possible to get any data from the unit itself?
Yes it is possible - as long as you know the IP address of the sensor. Unfortunately, locally, only the data from one channel is available (I have not found a way to access the second channel locally, even after writing many unanswered messages to Adrionics Llc for assistance).

For example, if the PurpleAir sensor local IP address is '192.168.1.15', then, (using PHP) a cURL download or a 'file_get_contents' at 'http://192.168.1.15/json' will produce a JSON file (that JSON file should be saved to disk). The data from that JSON file can then be extracted using the 'json_decode()' function - the data will be in an array.

The values in the array are 'particulate matter' numbers - the useful numbers are those found at 'pm2_5_atm' (2.5 ug/m3) and at 'pm10_0_atm' (10.0 ug/m3).

Then, those numbers have to be processed in order to calculate the air quality index. More information on how the air quality index is calculated can be found on the Wikipedia Air quality index page.

looking at the local ip/json looks like it has both channel values listed.

Regards Simon


Offline R_o_B

  • WxElement panel
  • Member
  • *****
  • Posts: 37
    • Tzouhalem-Maple Bay Weather
Re: personal air pollution sensor
« Reply #77 on: February 06, 2018, 03:51:22 AM »
looking at the local ip/json looks like it has both channel values listed.
Could you please tell me how you have reached that conclusion? The local data is accessed by using the following link:
Code: [Select]
http://{sensor IP address on the local/internal network}/jsonsuch as:
Code: [Select]
http://192.168.1.###/jsonThe resulting JSON file contains only the data from channel #1.

If you have another way of getting the data for both channel #1 and channel #2 directly from the PurpleAir sensor (and NOT downloaded from the Thingspeak database), please, pass along your secret - I have asked the designer behind the PurpleAir sensor that exact question about six months ago and I have yet to received a reply...  :roll:
R_o_B
---
eMail: weather@tzweather.org

Offline azchrisf

  • Cobra Weather Dominator Operator
  • Senior Contributor
  • ****
  • Posts: 225
    • Copperwood WX
Re: personal air pollution sensor
« Reply #78 on: February 06, 2018, 04:03:26 AM »
R_o_B I believe Toxic or Forever answered this question by providing a sub-script of mine in the PHP/Website subforum.

Offline Toxic

  • Senior Contributor
  • ****
  • Posts: 205
  • #conligwx
    • conligwx.org
Re: personal air pollution sensor
« Reply #79 on: February 06, 2018, 05:18:28 AM »
Could you please tell me how you have reached that conclusion? The local data is accessed by using the following link:

the json data: just the pm values:

Code: [Select]
"pm1_0_atm_b":0.32,
"pm2_5_atm_b":0.24,
"pm10_0_atm_b":0.08,
"pm1_0_cf_1_b":0.32,
"pm2_5_cf_1_b":0.24,
"pm10_0_cf_1_b":0.08,
"p_0_3_um_b":50.53,
"p_0_5_um_b":12.37,
"p_1_0_um_b":1.24,
"p_2_5_um_b":0.05,
"p_5_0_um_b":0.08,
"p_10_0_um_b":0.08,
"pm1_0_atm":0.22,
"pm2_5_atm":0.02,
"pm10_0_atm":0.02,
"pm1_0_cf_1":0.22,
"pm2_5_cf_1":0.02,
"pm10_0_cf_1":0.02,
"p_0_3_um":86.28,
"p_0_5_um":23.57,
"p_1_0_um":4.33,
"p_2_5_um":0.24,
"p_5_0_um":0.43,
"p_10_0_um":0.26,

are you telling me the _b are not b channel?
« Last Edit: February 06, 2018, 05:23:13 AM by Toxic »
Regards Simon


Offline Eno

  • Senior Member
  • **
  • Posts: 70
Re: personal air pollution sensor
« Reply #80 on: February 10, 2018, 06:50:36 PM »