Author Topic: Purpleair PHP Retrieval script  (Read 23419 times)

0 Members and 1 Guest are viewing this topic.

Offline staccermaccer

  • Senior Member
  • **
  • Posts: 72
    • Weather in Ekeren and Port of Antwerp
Re: Purpleair PHP Retrieval script
« Reply #125 on: July 13, 2022, 01:09:08 AM »
Hi Ken,

Yes it works also with a JSON-file, i will include a screenshot!

Marc,

PS: THX for giving it a stab!
« Last Edit: July 13, 2022, 05:19:32 AM by staccermaccer »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8843
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Purpleair PHP Retrieval script
« Reply #126 on: July 13, 2022, 10:46:32 AM »
I'm not sure that JSON has enough details to use.. I see SDS_P1 and SDS_P2 values (along with temperature, humidity), but I don't know if either SDS_P1 or SDS_P2 is a PM2.5 value that the script needs.

Looking more into it .. the SDS_P1 is the PM10 reading and SDS_P2 is the PM2.5 reading.  The firmware JSON return only returns the instantaneous value at the time of the local query -- no trending/historical data such as returned by the PurpleAir JSON query, so I think the PurpleAir script is not directly adaptable to the Luftdaten due to lack of extra data needed by the script.  Sorry...
« Last Edit: July 13, 2022, 11:07:40 AM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything