Recent history: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
There are a number of internal calculations, such as calculating [[Average temperature]], [[Heat/cold degree days and Chill hours]], which use the recent history data stored in the Recent History Database for CumulusMX. These data are also used for the standard [[MX_Administrative_Interface#Charts|charts]] and the JSON data for the charts on the standard website and many other websites. See: [[:Category:JSON_Files#Uploading_data_to_a_web_server_outside_MX:|Uploading data to a webserver outside CumulusMX ]] .
 
= How does Cumulus update the data? =
 
While Cumulus is left running,, every minute:
# The oldest set of records, in database table row number 0, (in legacy 1.9.3 or 1.9.4, in array element 0), is discarded
# Cumulus then works through subsequent table rows (or array elements), as it reads each one, it moves it to the previous (now empty) row (or array element)
# The number of table rows, or array elements, is actually variable, this is because of two reasons:
#* Table rows, or array elements, will be less frequent (or even missing) for the period before Cumulus is started
#* Cumulus uses current time, read from the computer, in its decision as to where to store each new recent history value set, so it can overwrite existing table rows, or array elements, if date-time matches one that already exists, such as in the hour after when clocks go back.
 
While Cumulus is left running,, every minute:
# The oldest set of records, in database table row number 0, (in legacy 1.9.3 or 1.9.4, in array element 0), is discarded
# Cumulus then works through subsequent table rows (or array elements), as it reads each one, it moves it to the previous (now empty) row (or array element)
# The number of table rows, or array elements, is actually variable, this is because of two reasons:
#* Table rows, or array elements, will be less frequent (or even missing) for the period before Cumulus is started
#* Cumulus uses current time, read from the computer, in its decision as to where to store each new recent history value set, so it can overwrite existing table rows, or array elements, if date-time matches one that already exists, such as in the hour after when clocks go back.
 
=How are recent history values stored?=

Navigation menu