AirLink: Difference between revisions

188 bytes added ,  13:27, 20 August 2021
m
no edit summary
m (HansR moved page AirQuality to AirLink: All references (vaiables, filenames etc...) to AirQuality have been moved to AirLink because that was it is actually.)
mNo edit summary
Line 3: Line 3:
   |__TOC__
   |__TOC__
   |}
   |}
In 2020 support for the [https://www.davisinstruments.com/airlink/ Davis Airlink] device was introduced in CumulusMX. Although AirQuality sensors had been supported by CumulusMX as Extra Sensors - which are not supported by  CumulusUtils - this Davis device had specific tables and support incorporated and as such could be supported by CumulusUtils. The Davis Airlink is supported by a Table view and by graphing the measured values. Future AirQuality devices will need a consistent use of an underlying data structure and interface to be supported.
'''''NOTE: Before version 6.1 this section was named AirQuality'''''


AirQuality in the context of the AirLink is about Particulate Matter or fine dust particles of size of less then 10<math>\mu{m}</math> and less than 2.5<math>\mu{m}</math>. Duration of exposure of a certain average value gives an AQI which differs per country. On the forum information about this is available and linked below.
In 2020 support for the [https://www.davisinstruments.com/airlink/ Davis Airlink] device was introduced in CumulusMX. Although Air Quality sensors had been supported by CumulusMX as Extra Sensors - which are not supported by  CumulusUtils - this Davis device had specific tables and support incorporated and as such could be supported by CumulusUtils. The Davis Airlink is supported by a Table view and by graphing the measured values. Future Air Quality devices will need a consistent use of an underlying data structure and interface to be supported.
 
Air Quality in the context of the AirLink is about Particulate Matter or fine dust particles of size of less then 10<math>\mu{m}</math> and less than 2.5<math>\mu{m}</math>. Duration of exposure of a certain average value gives an Air Quality Index which differs per country. On the forum information about this is available and linked below.


== Operation ==
== Operation ==
The operation requires two steps:
The operation requires two steps:
#creating the AirQuality page to be used by the user (or in the generated website)
#creating the Airlink page to be used by the user (or in the generated website)
#creating the datafile to be used by the AirQuality page. Although CumulusMX is able to produce an AirQuality.JSON datafile, that file is not used because it uses only the direct measured data. CumulusUtils produces its own datafile to be able to display all possible averages produced by the AirLink (and which are stored but not used by CumulusMX). These values are: raw data, one hour running average, three hour running average, 24 hour running average and the [https://en.wikipedia.org/wiki/NowCast_%28air_quality_index%29 nowcast average].
#creating the datafile to be used by the Airlink page. Although CumulusMX is able to produce an AirQuality.JSON datafile, that file is not used because it uses only the direct measured data. CumulusUtils produces its own datafile to be able to display all possible averages produced by the AirLink (and which are stored but not used by CumulusMX). These values are: raw data, one hour running average, three hour running average, 24 hour running average and the [https://en.wikipedia.org/wiki/NowCast_%28air_quality_index%29 nowcast average].


The commands for the above named steps are:
The commands for the above named steps are:
   ''utils/bin/cumulusutils.exe AirQuality''        => this command includes the following step to create the first datafile
   ''utils/bin/cumulusutils.exe Airlink''        => this command includes the following step to create the first datafile


and:
and:
   ''utils/bin/cumulusutils.exe [[UserAskedData]]''  => this command produces the AirQuality datafiles with only those data required for the user wanted display.
   ''utils/bin/cumulusutils.exe [[UserAskedData]]''  => this command produces the Airlink datafiles with only those data required for the user wanted display.


== Output ==
== Output ==
The output is the file: ''airquality.txt'' and contains the ''TableView'' and the ''GraphView'' of the data. Beside that the file ''airlinkrealtime.txt'' is used to be processed by CumulusMX for support of realtime behaviour (see Inner working).
The output is the file: ''airlink.txt'' and contains the ''TableView'' and the ''GraphView'' of the data. Beside that the file ''airlinkrealtime.txt'' is used to be processed by CumulusMX for support of realtime behaviour (see Inner working, the user has to add this to the section ''Extra Web Files'' of CumulusMX).


The output for the datafiles is: ''airlinkdataOut2p5.json'' and ''airlinkdataOut10.json''
The output for the datafiles is: ''airlinkdataOut2p5.json'' and ''airlinkdataOut10.json''


== Inifile Parameters ==
== Inifile Parameters ==
The AirQuality module has the following inifile parameters (see [[cumulusutils.ini]]):
The Airlink module has the following inifile parameters (see [[cumulusutils.ini]]):
 
(Before version 6.1 this section was named ''AirQuality'')


   [AirQuality]
   [Airlink]
   CountrySelected=EU            => Determines the country for which the AQI must be calculated. This value must be identical to what is entered in CMX
   CountrySelected=EU            => Determines the country for which the AQI must be calculated. This value must be identical to what is entered in CMX
   WantToSeeNow=true            => If true will show the raw data
   WantToSeeNow=true            => If true will show the raw data
Line 40: Line 44:
For each sensor (In and Out) similar code is produced with similar coding of variable names.
For each sensor (In and Out) similar code is produced with similar coding of variable names.


Then, for facilitating realtime behaviour, the file ''airlinkrealtime.txt'' is generated which the user has to enter in the ''Extra Webfiles'' section in the settings of CumulusMX. The target directory must be the webroot (where the AirQuality page is activated). Tick: ''Process'', ''Realtime'' and ''FTP''.
Then, for facilitating realtime behaviour, the file ''airlinkrealtime.txt'' is generated which the user has to enter in the ''Extra Webfiles'' section in the settings of CumulusMX. The target directory must be the webroot (where the Airlink page is activated). Tick: ''Process'', ''Realtime'' and ''FTP''.


Then the menu is generated, creating two buttons to enable the user to switch between Table view and Graph view. In case of the Website Generator there is also a help button displaying information about the AirQuality. This help button is not available when running as a module.
Then the menu is generated, creating two buttons to enable the user to switch between Table view and Graph view. In case of the Website Generator there is also a help button displaying information about the Airlink. This help button is not available when running as a module.


=== TableView ===
=== TableView ===
Line 61: Line 65:
   for (i = 0; i < 5; i++) { (i+1 == nowcastPM10_OutAQIint ? $('#nowcastPM10ArrowOut'+i).html('▲') : $('#nowcastPM10ArrowOut'+i).html(' ') );  }  
   for (i = 0; i < 5; i++) { (i+1 == nowcastPM10_OutAQIint ? $('#nowcastPM10ArrowOut'+i).html('▲') : $('#nowcastPM10ArrowOut'+i).html(' ') );  }  


Where the coding of the fields and variables is rigid and should not be played with. There have been inventive modification spotted in the wild (e.g. disabling the graph) which though highly appreciated of course will get no support. Modifying generated code leaves you on your own.
Where the coding of the fields and variables is rigid and should not be modified. There have been inventive modification spotted in the wild (e.g. disabling the graph) which though highly appreciated of course will get no support. Modifying generated code leaves you on your own.


=== GraphView ===
=== GraphView ===
Line 73: Line 77:


=== The Help Button ===
=== The Help Button ===
Because the Help button is not available in the the modular use of the AirQuality module its content is given here.
Because the Help button is not available in the the modular use of the Airlink module its content is given here.


In Air Quality (with either the cheap sensors or the government published data) it is important to know about the Air Quality Indices (AQI) and PM concentrations. Those are very different things. The AQI differ very much per country, per period (1 hr, 3 hr or 24 hr averages) and in scales (6 divisions or 10 divisions with subdivisions). To make it even more complex, some countries did combine the fine dust (PM) AQIs with indices for SO2 and NO2. That is ignored here. These graphs only deal with Particulate Matter sensors. <b>Please be aware that the scaling of the graphs is dynamic.</b>
In Air Quality (with either the cheap sensors or the government published data) it is important to know about the Air Quality Indices (AQI) and PM concentrations. Those are very different things. The AQI differ very much per country, per period (1 hr, 3 hr or 24 hr averages) and in scales (6 divisions or 10 divisions with subdivisions). To make it even more complex, some countries did combine the fine dust (PM) AQIs with indices for SO2 and NO2. That is ignored here. These graphs only deal with Particulate Matter sensors. <b>Please be aware that the scaling of the graphs is dynamic.</b>