Luftdaten Air Quality Sensor

download again…as before
should be much better now #-o

Ah ha! :smiley: View menu screen shows correct PM2 reading now and an AQI level, the main screen graph now shows the AQI and it is being plotted (see attached). I will need to investigate how AQI is being calculated so can’t vouch for that but will assume correct as PM2.5 is correct.

The AQI charts are being updated in the webfiles folder but don’t seem to change their timestamp, properties shows to have been modified rather than rewritten so I assume that is normal?

I’m off to bed now but will check again first thing, it certainly looks ok :slight_smile:

Thanks Brian

Cheers
Nick


forgot to say PM10 looks like it is being correctly recorded too :slight_smile:

Hi Brian,

Been running 12 hours now and seems fine as far as I can see. Sensor readings and graphs seem fine. This is a quick and dirty web page using the WD gifs https://www.sunwharf.com/willingdon/aq.html

I’d like to create a rolling 30day graph, which log file has the data in please?

Thank you very much, lovely job :slight_smile:

Cheers
Nick

you can create custom log files with WD using custom tags

Ok, great thanks Brian. I

Hello,

I did also constructing this Air Quality sensor and its operational now however still waiting for my ID from luftdaten admins. and Im glad its already added to WD settings. But I have a request that maybe it can be also added as optional settings

I have my AQI sensor operational but also has Temperature and humidity sensor I added as featured optional on the circuit when making luftdaten AQI sensor, my current weather station can send temperature and humidity for outside temps to WU except its INDOOR temps and Humidity, since my version of ambient weather ws-2902 cannot send Indoor data to WU, so this is my request to Sir Brian, I hope this can be help also to those who desnt have Davis products that can send INDOOR temp/humid to WU.

can you put optional settings on air quality setings under luftdaten sensor settings on WD that if theres a temperature and humidity installed, can you put those as optional for OUTDOOR or for INDOOR temperature data which can be put into WD’s dashboard and added to clientraw, so that we can have indoor temperature recorded on our website dashboards? or you can add some selection option for those EXTRA sensors to be added when adding extra temperature sensor, it can be selected as INDOOR or OUTDOOR.

Thank You and More power.

Regards

Mike


I guess adding option to use the temp/hum data for either indoor or outdoor data I can add
but I will need a sample raw data file (the airquality.txt file) that has that data in it

Every luftdaten sensor has its own ID.
With my sensor the temp/hum is: http://api.luftdaten.info/v1/sensor/8994/

[{"location":{"country":"BE","longitude":"4.7000","id":4532,"latitude":"50.8860","altitude":"16.4"},"sampling_rate":null,"timestamp":"2018-11-06 18:58:51","sensor":{"pin":"7","id":8994,"sensor_type":{"name":"DHT22","manufacturer":"various","id":9}},"id":2250811468,"sensordatavalues":[{"value":"97.10","value_type":"humidity","id":4791415464},{"value":"15.40","value_type":"temperature","id":4791415463}]},{"location":{"country":"BE","longitude":"4.7000","id":4532,"latitude":"50.8860","altitude":"16.4"},"sampling_rate":null,"timestamp":"2018-11-06 19:01:20","sensor":{"pin":"7","id":8994,"sensor_type":{"name":"DHT22","manufacturer":"various","id":9}},"id":2250822945,"sensordatavalues":[{"value":"97.10","value_type":"humidity","id":4791439622},{"value":"15.40","value_type":"temperature","id":4791439621}]}]

The AQ sensor (SDS) is http://api.luftdaten.info/v1/sensor/8993/

[{"location":{"country":"BE","longitude":"4.7000","id":4532,"latitude":"50.8860","altitude":"16.4"},"sampling_rate":null,"timestamp":"2018-11-06 18:58:50","sensor":{"pin":"1","id":8993,"sensor_type":{"name":"SDS011","manufacturer":"Nova Fitness","id":14}},"id":2250811409,"sensordatavalues":[{"value":"18.37","value_type":"P1","id":4791415340},{"value":"9.80","value_type":"P2","id":4791415341}]},{"location":{"country":"BE","longitude":"4.7000","id":4532,"latitude":"50.8860","altitude":"16.4"},"sampling_rate":null,"timestamp":"2018-11-06 19:01:19","sensor":{"pin":"1","id":8993,"sensor_type":{"name":"SDS011","manufacturer":"Nova Fitness","id":14}},"id":2250822883,"sensordatavalues":[{"value":"12.70","value_type":"P1","id":4791439491},{"value":"9.17","value_type":"P2","id":4791439492}]}]

Wim

Hi
Could I ask where to get the hardware - I followed the shopping list from the Luftdaten site but did not find it easy to understand not having any German and as far as I could tell some very long delivery dates.
Regards
Alan

If you click on the flag at the top of their page there is an English option and also instructions in English. Pretty much all is available on Ebay and Amazon. The pipe they use is hard to get as it is German but any housing large enough should work just as well.

Many thanks - google finds them quite easily - mainly ebay.
Do you think there would be the right drivers etc for Win 7 pro.
It would be interesting to do air quality checks here in rural West Cornwall where we ASSUME we have nice clean Atlantic air.
Regards
Alan

the data is via TCP/IP , so will be compatible with any windows version

I don’t know about windows drivers. Mine is constructed as per their design using the simple Arduino and Luftdaten software. It’s easily accessed using the IP address, which is how WD accesses it. The unit doesn’t store data but samples every minute and will transmit it to a web site of choice. Mine sends to the Lufdaten site and my own web site.

Thanks for adding Luftdaten to WD.

The AQI is US based?
How is that number calculated?

Different countries, different Indexes.
UK has a 10 colored band/bandings index.
https://uk-air.defra.gov.uk/air-pollution/daqi?view=more-info&pollutant=pm25#pollutant

Belgium has a 10 band/banding index.
https://weer.sluispark.be/index.php?p=mnu_aqhi_luft2&lang=en#data-area

Netherlands even has eleven bands/bandings
NL AQI

Any chance that could be added.
So for instance that users can choose the number of bands/bandings, their colors and values themselves for the AQI image.

That’s probably a lot of coding, if even possible and you are willing to.

Anyway, great you added Luftdaten

someone should have developed an industry standard me thinks

For “worldwide” use the US EPA standard is used.
That is the one most often used to compare pollution levels in different areas/countries.

BUT every country or region such as Canada or European ones can use their own local standard for their own measurements.
Not to compare with others but to stress the airquality changes / risks.

Based on user requests I added those calculations for Ierland, Belgium, Netherlands as an extra to the US.
Trying to cope with those local “standards” becomes tricky when a country does not use PM2.5 but solely PM10 as a PM10 level often shows a better AQ compared to PM2.5

As long as a weather-program supplies the AQ-EPA and the particle count anyone can do the calculations at their website.
Be aware, the colours used are also very different.
At least all countries use the average 24 hour values for the health effects.
Never ever one should use the realtime measurement to give health effects texts or an “officially looking” AQindex.
I post the arrays used for different countries and the links to their documentation.

# Belgium       http://www.irceline.be/nl/luchtkwaliteit/metingen/belaqi-luchtkwaliteitsindex/informatie
        $thrshld_aq     = array (0,  1,  2,  3,  4,  5,  6,  7,  8,  9,   10, 99999);
        $thrshld_pm10   = array (0, 10, 20, 30, 40, 50, 60, 70, 80, 100, 500, 99999);
        $thrshld_pm25   = array (0,  5, 10, 15, 25, 35, 40, 50, 60,  70, 500, 99999);

# Ierland       http://www.epa.ie/air/quality/
        $thrshld_aq     = array (0,  1,  2,  3,  4,  5,  6,  7,  8,  9,   10, 99999);
        $thrshld_pm10   = array (0, 16, 33, 50, 58, 66, 75, 83, 91, 100, 500, 99999);
        $thrshld_pm25   = array (0, 11, 23, 35, 41, 47, 53, 58, 64,  70, 500, 99999);

# Netherlands   https://www.luchtmeetnet.nl/uitleg   
        $thrshld_aq     = array (0,  1,  2,  3,  4,  5,  6,   7,   8,   9,  10, 11, 99999);
        $thrshld_pm10   = array (0, 10, 20, 30, 45, 60, 75, 100, 125, 150, 200, 99999);
        $thrshld_pm25   = array (0, 10, 15, 20, 30, 40, 50,  70,  90, 100, 140, 99999);

# default US    https://www.airnow.gov/index.cfm?action=aqibasics.aqi
        $thrshld_aq     = array (0,   50,  100,  150,   200,   300,   500,   99999);
        $thrshld_pm10   = array (0,   54,  154,  254,   354,   424,   604,   99999);
        $thrshld_pm25   = array (0.0, 12.0, 35.4 ,55.4, 150.4, 250.4, 500.4, 99999);

Here you can check my realtime measurements: AQ Luftdaten sensor - Leuven-Sluispark
Wim

P.S. The complete script which can be used stand-alone and in most templates. Check it here: https://leuven-template.eu/luftdaten/

yes, that was what I was thinking, a web based way to show it how it needs to be for local settings etc
good work wim

Hi,

These tags were posted in the purpleair strangeness thread.
I got the the first 3 working using the luftdaten sensor.

The others do not work.
Are they for the purple air sensor only?

$purpleair2_5 = ‘32.0’; //Value of 2.5 micron particle measure from purple air sensor (see in WD under setup, advanced/misc)
$purpleair10_0 = ‘282.3’; //Value of 10.0 micron particle measure from purple air sensor
$purpleairaqi = ‘94.7’; //AQI (air quality index) value from purple air sensor

$purpleair24hourmean10_0 = ‘282.3’; //Last 24 hours average PM 10.0 value
$purpleair24hourmean2_5 = ‘48.1’; //Last 24 hours average PM 2.5 value
$purpleair24hourmin10_0 = ‘0.0’; //Min value in last 24 hours PM 10.0 value
$purpleair24hourmin2_5 = ‘-1.0’; //Min value in last 24 hours PM 2.5 value
$purpleair24hourmax10_0 = ‘282.3’; //Max value in last 24 hours PM 10.0 value
$purpleair24hourmax2_5 = ‘96.1’; //Max value in last 24 hours PM 2.5 value

how do you mean not working exactly?