Webtags (preserving history): Difference between revisions

m
→‎Recent History: Update for 3.12.0
m (→‎Today.ini: Rewrite of text before table)
m (→‎Recent History: Update for 3.12.0)
Line 864: Line 864:
==Recent History==
==Recent History==


There are a set of web tags for 'recent historical data', based on an array stored by Cumulus giving data values from 1 minute ago, up to 1 week ago, in 1 minute intervals. As Cumulus runs it will add the latest values to the array with full resolution, and shift existing values along so those older than 7 days fall off.   
While Cumulus is left running, from version 1.9.3 (beta build 1033 release 10 April 2012), every minute a set of current spot values is stored.  This '''high resolution data''' is kept for seven days, with the oldest set being discarded each time a new set is added.
*The input modification parameters available are listed at [[Webtags/Parameters#Input Modification Parameters for Recent History]].
 
**To save you looking up the details, these input parameters specify how many minutes ago is required. Instead of entering a very large number for minutes, you can include separate input parameters for days, hours, and minutes, ago.
There is one tag name listed in the table below for each weather derivative available at the release you are runningYou pick the time in minutes ago using an input modification parameter choosing from those listed at [[Webtags/Parameters#Input Modification Parameters for Recent History]]. You can specify 1 to 10 079 minutes ago, and (to save dealing with large numbers) you can specify this using a combination of input parameters representing integer days, integer hours, and integer minutes.
**Examples appear in the table below, with explanations
 
===What happens when I need to stop and restart Cumulus?===
 
This depends on the release you are running.
 
The graph images that Cumulus 1 generates, the data for the detailed charts that MX can plot, and various internal calculations that MX makes, and indeed the recent history web tags themselves, all access data for the recent past.  That data is available at one minute intervals, since you started Cumulus, because of this recent history functionality. But if those charts, or calculations, need to include a period before Cumulus was started, then they might be using archive data obtained from your weather station.
 
====MX release 3.12.0 (beta build 3134) onwards====
 
The recent history is stored in a SQLite3 database table [[cumulusmx.db#Release 3.12.0 onwards|RecentData]] and therefore if you stop MX, the recent history data up to the time MX stopped has become persistent, and is available when MX starts again. Thus the charts, and internal calculations, mentioned above can make use of recent history data from the previous time Cumulus was running.
 
When you do restart MX, if your weather station can store historic data, then its logger is read during the restart as archive data for the period since MX was last running until the time of restart, and obviously only available at the resolution of that historic data (be it every 10 minutes, or every 30 minutes or whatever).
 
If MX was stopped for a short period, then on restarting MX, the '''RecentData''' table will be updated by discarding any rows over 7 days old, and for the times during the '''short period''' adding that archive data at whatever station logging interval resolution is available.
 
If Cumulus MX is offline for a prolonged period, (and when you first run 3.12.0, as the '''RecentData''' table does not yet exist) then all the data for the previous just over 10 thousand minutes will be at this lower station logging interval resolution.
 
====Legacy release 1.9.3 to MX 3.11.4====
 
The 'recent historical data' is based on an array stored by the Cumulus code.  Therefore, if Cumulus stops, all the high resolution data is lost.
 
When you do restart MX, if your weather station can store historic data, then its logger is read during the restart as archive data for the period from 7 days ago until the time of restart, and obviously only available at the station logging interval resolution of that historic data (be it every 10 minutes, or every 30 minutes or whatever).
 
===If the derivative you want is not available in your Cumulus release===
 
As Cumulus has developed, it has been able to calculate more [[Feels Like|weather derivatives]] and more recent history tag names have become available (sometimes recent history tag names have been added in a later release than the release that started calculated the derivative).


Following the table giving the tag names actually available, there is a section on how to derive a few more weather derivatives using a combination of the tag names shown.
Following the table giving the tag names actually available, there is a section on how to derive a few more weather derivatives using a combination of the tag names shown.


===Warning when Daylight Saving Time starts or ends===
===Warning when Daylight Saving Time starts or ends===


Note that Cumulus uses current time, read from the computer, to determine which array element it stores each value in.  
Note that Cumulus uses current time, read from the computer, for recent history records.


Hence ''when clocks go back'' the value stored for winter time overwrites the value previously stored for same time during summer time for the relevant repeating hour.  
For version 1.9.3 to release 3.11.4, current time determines which array element is used for storing the set of values. Hence ''when clocks go back'' the value stored for winter time overwrites the value previously stored for same time during summer time for the relevant repeating hour.  


Hence even if you use 10am for your rollover time in summer, you will not have access to a whole hour worth of data when the clocks change
Hence even if you use 10am for your rollover time in summer (so all your days, even when clock changes happen, are 24 hours long), you will not have access to a whole hour worth of data when the clocks change
* ''when the clocks go back'', one hour has been overwritten; or
* ''when the clocks go back'', one hour has been overwritten; or
* ''when the clocks go forward'', one hour in the array simply does not exist.
* ''when the clocks go forward'', one hour in the array simply does not exist.
One assumes the same applies from release 3.12.0, but it depends how MX has been coded, as a SQLite3 database uses row numbers as its primary key, and could technically therefore retain the missing hour.


=== Table of Recent History web tags available ===
=== Table of Recent History web tags available ===
5,838

edits