External Extra Sensors

Revision as of 16:25, 27 March 2022 by HansR (talk | contribs) (Created page with "== Introduction == {|align=right |__TOC__ |} Sensors which the user has available but which are not logged by CumulusMX, CumulusUtils has an option available to integrate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

Sensors which the user has available but which are not logged by CumulusMX, CumulusUtils has an option available to integrate these sensors with the standard CMX sensors and plot them in whatever combination you want. As an example I use the Geiger Counter which caused this addition to be implemented.

Operation

  1. All conditions for the Extra Sensors module must be met.
  2. CumulusUtils must be run once with the command ExtraSensors or Website to create the required parameter in the section [ExtraSensors] in the inifile.
  3. Set the name (or names) for External Extra Sensor in the parameter ExternalExtraSensors in the section ExtraSensors in cumulusutils.ini (e.g. ExternalExtraSensors=GeigerCounter).
  4. Make sure you have a datafile(s) available in the data directory of CMX with the following name: <sensor name>yyyyMM e.g. GeigerCounter202203.txt
  5. Make sure you run UserAskedData to make sure the External Sensor Data are available for the website in the known JSON format.

The datafile(s) have the following plain text format:

 datetime,value


Output

The output is completely integrated in the Extra Sensor module and can not be separated from it.

Inifile Parameters

The External Extra Sensor module has the following inifile parameter (see cumulusutils.ini):

 [ExtraSensors]
 See Extra Sensors
 
 ExternalExtraSensors=GeigerCounter[, sensor2 [,sensor3]]  => A comma separated list of strings naming one or more External Extra Sensors the user wishes to use)

Inner Working

When all conditions for the Extra Sensors are met and an External sensor is defined, the External Sensor is added to the internal lists of both the Extra Sensors as the ChartsCompiler and the internal datastructures of the fixed names as defined in CDL are expanded. When using the plotvariable for the external sensor the same name is used as in the definition in the inifile. So for ExternalExtraSensors=GeigerCounter, the user would e.g. see a chart definition appear (when the automatic mode is selected) as follows:

 Chart External Title Trend chart of Extra External Sensors
   Plot Extra GeigerCounter
 EndChart

If more than one external sensor, in automatic mode all would be plotted in the one chart named External. If that is not what you want then switch to manual mode - i.e set UserModificationExtraSensorCharts=true - modify your CutilsCharts.def and run again. All other working is the same as in the standard Extra Sensors module.