Recent history: Difference between revisions

791 bytes removed ,  12:52, 29 September 2022
m
Line 35: Line 35:


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 ]] .
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
#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.


=What happens when I need to stop and restart Cumulus?=
=What happens when I need to stop and restart Cumulus?=