Webtags (preserving history): Difference between revisions

m
→‎Recent History: add rc=y mention
m (→‎Recent History: add rc=y mention)
Line 899: Line 899:
==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.  Following the table giving the tags actually available, there is a section on how to derive a few more tags.
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.   
*The input modification parameters available are listed at [[Web_Tag_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.


(Note that Cumulus uses current time read from the computer to determine which array element it stores each value in. 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 as either the hour has been overwritten or ''when the clocks go forward'' it simply does not exist).
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.


[[#No_Commas]] versions of the array are available for use in script.


=== Input Parameters ===
===Warning when Daylight Saving Time ends===


You specify which value you want from the array by using parameters on the web tags for number of days ago, hours ago, and minutes ago. The same d, h, and m, parameters are used by Cumulus 1 and MX.
Note that Cumulus uses current time, read from the computer, to determine which array element it stores each value in.  


All values supplied for parameters must be whole numbers.  
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.  


If you don't supply any parameters, the result is undefined for Cumulus 1, and an illegal web tag for MX.  
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 as either the hour has been overwritten or ''when the clocks go forward'' it simply does not exist.


<#RecentOutsideTemp m=1> will give the temperature one minute ago, <#RecentOutsideTemp h=1> will give the temperature one hour ago (as will <#RecentOutsideTemp m=60>).


<#RecentOutsideTemp d=1> will give the temperature one day ago. '''Please note:''' Some Cumulus users say that using <#RecentOutsideTemp  d=1 m=1> is more reliable at getting the temperature at a similar time the day before, the extra minute apparently gives better results when you might not be using Cumulus all the time, or your weather station might have some drift on when it supplies readings. See which works best for you.
<#RecentOutsideTemp d=1 h=1 m=1> will give the temperature one day, one hour and one minute ago.
'''Please note that parameters specify time-stamped array element to retrieve based on counting back from current local time''' so the result for ''any period including when clocks change'' may not be quite what you anticipated.


=== Table of Recent History web tags available ===


=== During catch-up ===
When Cumulus is re-started the array it sets up will be based on reading the logs, so the contents will initially have a resolution according to the logger interval you have set in Cumulus and/or your station.  You'll get the nearest value if you ask for a time for which there is currently no exact match, and the first tag listed tells you that nearest time.


=== Variations between Builds/Versions ===
[[#No_Commas]] versions of the array are available for use in script. If you use MX, the tag names in this table can take a [[Web_Tag_Parameters#Output Modification Parameter for Removing Commas|rc=y]] parameter.
Before build 1098, the recent history array did not initialise correctly from the station logger for the period since Cumulus was last run.
 
The input parameters are same for Cumulus 1 and Cumulus MX, they always use lower case d, h or m.
 
The list of tags available has not changed between last Cumulus 1 release and any MX release. Any new derivatives reported elsewhere have not resulted in equivalent new recent history tags.
 
=== Table of Recent History web tags available ===


{| class="wikitable" border="1"
{| class="wikitable" border="1"
5,838

edits