Extra Sensors: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
295 bytes removed ,  26 November 2022
m
When run it is first checked if anything has to be done through the parameters ''ExtraSensors'' (in cumulusutils.ini) and ''LogExtraSensors'' (in Cumulus.ini).
 
When both parameters are true then sensors are checked from the parameters and the names of the extra sensors in ''strings.ini'' are fetched.
When both parameters are true then the names of the extra sensors in ''strings.ini'' are checked if they deviate from the default. If they deviate it means the user has changed the name which is taken as a proof of presence of an ''Extra Sensor''. NOTE: the sensors are intended to be defined in a contiguous order, so defining ''sensor 1'' and ''sensor 3'' would leave open ''sensor 2''. If ''sensor 2'' is not connected you would need to give it a name (e.g. ''Not Connected''). It will be displayed but always have a value 0. This may change in future versions.
 
A sensor present means the realtime data and a corresponding chart will be created for presentation. The only sensor where thea name in ''strings.ini''parameter is not determinant for its presence is the Ecowitt CO2 sensor. Those names may be changed by the user, but only a value in the logfile for the CO2 value is taken as proof of presence. Currently a CO2 is always shown on the website. This may change in future when requested.
 
A structure is created for each sensor present. Each AirQuality sensor is automatically coupled with an AirQualityAvg sensor (which is not a physical sensor by itself) for presentation. For each CO2 sensor all seven successive sensors (see strings.ini) are also created.
 
With the list of sensors the extrasensorsrealtime.txt is generated, followed by extrasensors.txt (the code) and the charts are added to CutilsCharts.def. The last line of the userdefined charts is:
; DO NOT CHANGE ANYTHING BELOW THIS INDICATOR LINE
; ExtraSensorCharts
After this line no changes may be made unless the parameter ''UserModificationExtraSensorCharts=true''. This line marks the beginning of the ''Extra Sensor Chart definitions''.
The actual charts code is generated by the compiler. The compiler runs implicitly when generating the website or when generating ExtraSensors as a module.

Navigation menu