Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
m (→‎Davis: updated link to date output format modifiers (as now on separate page))
(11 intermediate revisions by 2 users not shown)
Line 55: Line 55:


If you are using your own web templates, or other [[Customised templates|own Cumulus template files]] such as [[Php_webtags|XML or PHP data files]], then you make the decision on which tag names are used for the data to your web server.
If you are using your own web templates, or other [[Customised templates|own Cumulus template files]] such as [[Php_webtags|XML or PHP data files]], then you make the decision on which tag names are used for the data to your web server.
====Getting release 3.12.0 or later to list tag names when it starts====
Please use the admin interface.
Go to '''Program settings → General options'''
Tick ''List web tags''.
The next time that MX is restarted,  it will create a file called WebTags.txt in the same folder as where the executable is found. That file will list all the tags your build of Cumulus can currently generate. This list only contains the tag_names, it does not indicate what parameters they can take, nor does it include the brackets the tag name is surrounded by when you quote it in a template file for Cumulus to process.
Go to '''Program settings → General options''', untick ''List web tags'' to stop Cumulus continuing to produce new versions of that file next time it is restarted.


====Getting legacy Cumulus, or MX releases up to 3.11.4, to list tag names when starting====
====Getting legacy Cumulus, or MX releases up to 3.11.4, to list tag names when starting====
Line 69: Line 83:


[[File:Badge vMx.png]] MX bug: The inclusion of a web tag in the list produced by this instruction, does not mean that web tag is actually populated with valid information. See https://cumulus.hosiene.co.uk/viewtopic.php?p=153096#p153096 for an example.
[[File:Badge vMx.png]] MX bug: The inclusion of a web tag in the list produced by this instruction, does not mean that web tag is actually populated with valid information. See https://cumulus.hosiene.co.uk/viewtopic.php?p=153096#p153096 for an example.
====Getting release 3.12.0 or later to list tag names when it starts====
Please use the admin interface.
Go to '''Program settings → General options'''
Tick ''List web tags''.
The next time that MX is restarted,  it will create a file called WebTags.txt in the same folder as where the executable is found. That file will list all the tags your build of Cumulus can currently generate. This list only contains the tag_names, it does not indicate what parameters they can take, nor does it include the brackets the tag name is surrounded by when you quote it in a template file for Cumulus to process.
Go to '''Program settings → General options''', untick ''List web tags'' to stop Cumulus continuing to produce new versions of that file next time it is restarted.


==What is a web tag? ==
==What is a web tag? ==
Line 120: Line 121:
=====Inconsistency in use of "Y"=====
=====Inconsistency in use of "Y"=====


The character "Y" has been selected to denote yesterday in tag names.  The inconsistency is where it appears.  In his oldest tag names (e.g. <#rfallY>, <#windrunY>, <#avgtempY>), Steve used this Y as a suffix. In newer tag names (e.g. <#Ybeaufort>, <#YSunshineHours>, <#Ychillhours>), Steve changed to using Y as a prefix.
The character "Y" has been selected to denote yesterday in tag names.  The inconsistency is where it appears.   


=====Consistency becomes inconsistency for this month and this year=====
* Steve used Y as a suffix for most, not all, Cumulus 1 yesterday tags (e.g. <#rfallY>, <#windrunY>,  <#YSunshineHours>,  <#avgtempY>)
* Mark uses Y as a prefix, in most, not all, the extra Cumulus MX tags (e.g. <#Ybeaufort>, <#Ychillhours>, <#windAvgY>)
 
=====Consistency in Cumulus 1, becomes inconsistency in MX, for this month and this year=====


The legacy tag names for this year and this month were all introduced together by Steve in one release, with consistency in how they were named then, "Month" or "Year" was used as a prefix (this was after he had started using "Y" as a prefix for his new yesterday tag names) e.g. <#YearLongestDryPeriod>.
The legacy tag names for this year and this month were all introduced together by Steve in one release, with consistency in how they were named then, "Month" or "Year" was used as a prefix (this was after he had started using "Y" as a prefix for his new yesterday tag names) e.g. <#YearLongestDryPeriod>.


The development of MX broke this consistency, as Mark adds "Year" as a suffix, e.g. <#SunshineHoursYear>, instead of following Steve by using a prefix.
The development of MX however, broke this consistency, as Mark adds "Year" as a suffix, e.g. <#SunshineHoursYear>, instead of following Steve by using a prefix.


=====Inconsistency in use of "T"=====
=====Inconsistency in use of "T"=====


I said above, that early versions of Cumulus only had tag names for current values and for today-so-far.  Therefore it could be assumed that <#beaufort>,  <#temp> and <#press> all represented current values while <#avgtemp> and <#rfall> represented today-so-far values just by looking at their names.
I said above, that early versions of Cumulus only had tag names for current spot values and for today-so-far daily means/extremes/totals.  Therefore it could be assumed that <#beaufort>,  <#temp> and <#press> all represented current spot values while <#avgtemp> and <#rfall> represented today-so-far values just by looking at their names.


The current value tag names could be used as the basic part of tag names with  "TH" and "TL" added as suffixes to represent daily highs and daily lows, (e.g. <#tempTH>, <#tempTL> and <#pressTH>, <#pressTL>), which made a lot of sense.
The current value tag names formed the basic part of tag names, extended for daily extremes with  "TH" and "TL" added as suffixes (to represent daily highs and daily lows), (e.g. <#tempTH>, <#tempTL> and <#pressTH>, <#pressTL>), which made a lot of sense. Adding a "T" for related times, made some sense, except that use of "T" was not done in a consistent manner (e.g. <#TpressTH>, <#Tbeaufort>,  <#TtempTH>, <#YearTempHT>).
 
But that naming convention was broken when the extreme <#Tbeaufort> used "T" as a prefix, not suffix, and did not include a "H". Continuing looking at today-so-far tag names, we discover a prefix "T" is not just used for values, it is also used for time-stamps e.g. <#TtempTH>.
 
The use of "T" as a prefix for time-stamps continues in the tag names for all-time extreme records. However, when you look at time-stamps for extremes in this-year, the time-stamp denoting "T" is added as a suffix e.g. <#YearTempHT>.




Line 174: Line 174:


'''For other weather stations''', the main outdoor temperature sensor is used for what is reported for current value, daily extremes, and longer period extreme records.  This temperature is also used for calculation of derived values such as Australian Apparent Temperature, Canadian Humidity Index, and USA Heat Index.
'''For other weather stations''', the main outdoor temperature sensor is used for what is reported for current value, daily extremes, and longer period extreme records.  This temperature is also used for calculation of derived values such as Australian Apparent Temperature, Canadian Humidity Index, and USA Heat Index.
'''''Please check release announcements, it is planned that swaping of main Temperature sensor will become available for Ecowitt.'''''


==Input Modification Parameters and Output Modification Parameters==
==Input Modification Parameters and Output Modification Parameters==
Line 427: Line 429:
|-
|-
|<#wetbulb>
|<#wetbulb>
|Estimated [http://en.wikipedia.org/wiki/Wet_bulb wet bulb] temperature, can be seen if hover over 'Dewpoint' on Cumulus 1 main screen
|Estimated [http://en.wikipedia.org/wiki/Wet_bulb wet bulb] temperature, can be seen if hover over 'Dew point' on Cumulus 1 main screen
|-
|-
|colspan="2" style="background:lightgray;"|Rainfall
|colspan="2" style="background:lightgray;"|Rainfall
|-
|-
|<#rfall>
|<#rfall>
|The total rainfall so far today
|The total rainfall so far today (reports rain counter now minus rain counter at start of day), start of day counter can be edited using "edit rain today".
|-
|-
|<#rrate>
|<#rrate>
|The current rainfall rate
|The current [[Rain_measurement#Rain_Rate|rainfall rate]]
|-
|-
|<#rhour>
|<#rhour>
Line 444: Line 446:
|-
|-
|<#r24hour>
|<#r24hour>
|Amount of rain in the last 24 hours
| Reading recent history records, takes rain counter for latest minute, and substracts rain counter from as close as possible to same time yesterday (if Cumulus was not running at that time yesterday, but historical catch-up has been enabled, then it is from nearest time available yesterday, so for a logging interval of every 30 minutes might be 24 hours and 16 minutes ago)
|-
|-
|<#LastRainTipISO>
|<#LastRainTipISO>
Line 516: Line 518:
|<#wgust>
|<#wgust>
|The highest wind reading in the last 10 minutes. Corresponds to 'gust' on the Cumulus main screen.
|The highest wind reading in the last 10 minutes. Corresponds to 'gust' on the Cumulus main screen.
|-
|<#WindSampleCount>
|The number of wind samples making up the wind rose (etc) data (up to 3600)
|-
|-
|<#wdirdata>
|<#wdirdata>
|Comma separated list of recent wind bearing readings (every x seconds, up to 3600 entries). This is a circular buffer; to find the most recent value use nextwindindex. Reading interval x varies by station type.
|Comma separated list of recent wind bearing readings (every x seconds, up to 3600 entries). This is a circular buffer; to find the most recent value use <#nextwindindex>. Reading interval x varies by station type:
* Oregon:  x=12 seconds (see https://cumulus.hosiene.co.uk/viewtopic.php?p=37#p37) so 12 hours worth in full array
* Davis:  x=2 or 3 seconds (see https://cumulus.hosiene.co.uk/viewtopic.php?p=37#p37) so 2.5 hours worth in full array
* Fine Offset: Cumulus 1 reads the wind data every minute (although station transmits wind data every 40 seconds), so 60 hours worth in full array
* Davis WLL: x=2.5 seconds (see https://cumulus.hosiene.co.uk/viewtopic.php?p=160900#p160900) so 2.5 hours worth in full array
 
|-
|-
|<#wspddata>
|<#wspddata>
|Comma separated list of recent individual (non-averaged) wind speed (correspond to 'latest' on the Cumulus main screen) readings (every x seconds, up to 3600 entries). This is a circular buffer; to find the most recent value use '''nextwindindex''' tag. Reading interval x varies by station type.
|Comma separated list of recent individual (non-averaged) wind speed (correspond to 'latest' on the Cumulus main screen) readings (every x seconds, up to 3600 entries). This is a circular buffer; to find the most recent value use '''nextwindindex''' tag. Reading interval x varies by station type (see above).
|-
|-
|<#nextwindindex>
|<#nextwindindex>
|The index of the entries in wdirdata and wspddata which Cumulus is going to use next - i.e. the latest entry used is one less than this; but don't forget to allow for the wrap around!
|The index of the entries in <#wdirdata> and <#wspddata> that Cumulus ''is going to use next'' - i.e. the latest entry used is one less than this; but don't forget to allow for the wrap around!
|-
|<#WindRoseData>
|A comma-separated list of the wind 'totals' used to draw the wind rose (8 or 16 values)
|-
|<#WindRosePoints>
|The number of items in <#WindRoseData> (i.e. 8 or 16), as configured on [[Cumulus_Screenshots#Display_and_Colour_screens_as_at_version_1.9.4|display settings screen]]
|-
|-
|<#beaufort>
|<#beaufort>
Line 536: Line 552:
|-
|-
|<#BearingRangeFrom>
|<#BearingRangeFrom>
|The 'lowest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in cumulus.ini)
|The 'lowest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in [[Cumulus.ini (Cumulus 1)|cumulus.ini]])
|-
|-
|<#BearingRangeTo>
|<#BearingRangeTo>
Line 546: Line 562:
|<#BearingRangeTo10>
|<#BearingRangeTo10>
|The 'highest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in cumulus.ini), rounded down to nearest 10 degrees
|The 'highest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in cumulus.ini), rounded down to nearest 10 degrees
|-
|<#WindRoseData>
|A comma-separated list of the wind 'totals' used to draw the wind rose (8 or 16 values)
|-
|<#WindRosePoints>
|The number of items in <#WindRoseData> (i.e. 8 or 16)
|-
|<#WindSampleCount>
|The number of wind samples making up the wind rose (etc) data (up to 3600)
|-
|-
|colspan="2" style="background:lightgray;"|Miscellaneous
|colspan="2" style="background:lightgray;"|Miscellaneous
Line 924: Line 931:
!style="width:200px" | Optional Output Modification Parameters
!style="width:200px" | Optional Output Modification Parameters
|-
|-
| <#RecentTS> (see [[#Table of Recent History tag names available]]
| <#RecentTS> (see [[#Table of Recent History tag names available]])
| Mandatory parameters as table at [[Webtags/Parameters#Input_modification_Parameters]]
| Mandatory parameters as table at [[Webtags/Parameters#Input_modification_Parameters]]
| Optional parameters to modify the time format described in tables starting at [[Webtags/Parameters#Multiple_Output_Format_Modifier_parameters_for_times_and_dates]]
| Optional parameters to modify the time format described in tables starting at [[Webtags/Parameters#Multiple_Output_Format_Modifier_parameters_for_times_and_dates]]
Line 1,684: Line 1,691:
|-
|-
|<#SunshineHours>
|<#SunshineHours>
|Today's hours of sunshine so far. Added in Cumulus 2, then to 1.9.1 build 957, also in MX. From version 3.7.0 takes a parameter "dp=n" so the number of decimal places required can be specified
|Today's hours of sunshine so far. Added in Cumulus 2, then to 1.9.1 build 957, also available in MX. From version 3.7.0 takes a parameter "dp=n" so the number of decimal places required can be specified
|n/a
|n/a
|-
|-
Line 1,690: Line 1,697:
|-
|-
|<#LightningStrikesToday>
|<#LightningStrikesToday>
|Number of strikes since midnight, default 0
|Number of strikes since midnight, default 0 - Added at 3.2.0 - b3056, but see subsequent release announcements as the handling of lightning was improved gradually over several subsequent releases.


(Please see release announcements for when individual web tags became available, other lightning tags can be found in [[#Current_Conditions|Current Conditions table]])
(other lightning tags can be found in [[#Current_Conditions|Current Conditions table]])
|-
|-
| <#chillhoursToday>
| <#chillhoursToday>
| The incremental chill hours figure since start of today (available from version 3.12.0 beta build 3134)
| The incremental chill hours figure since start of today (tag name available from version 3.12.0 beta build 3134, but the coding to process this web tag has a bug at time of adding this note to this Wiki page, as it may incorrectly report 99.99; hopefully a calculation using <#Ychillhours> and <#chillhours> will work better)


(Compare with Cumulative seasonal Chill Hours at end of today <#chillhours> found in [[#Current_Conditions|Current Conditions table]])
(Compare with Cumulative seasonal Chill Hours at end of today <#chillhours> found in [[#Current_Conditions|Current Conditions table]])
Line 1,702: Line 1,709:
== No Commas ==
== No Commas ==


Note that Cumulus does not use thousand separators, so the only places a comma can be used are as a field separator or as a decimal separator. Obviously it cannot be used for both. This section is for those locales where a comma is used instead of a full stop to separate the integer and decimal parts of a number. Some computer languages like JavaScript will not accept a comma being used for this purpose, and Cumulus uses JavaScript for various tasks, as do various third party web pages. From '''version 1.9.3''' build 1045, Cumulus 1 (and MX) has provided some current conditions web tags, some today web tags, and some recent history web tags in an alternative format where (regardless of locale) the number is always output in a format that uses a decimal point. They all correspond to the same tag with 'RC' removed.
'''This section is for those locales where a comma is used instead of a full stop to separate the integer and decimal parts of a number.'''  ''This section on this Wiki page was written for the legacy Cumulus (1.9.4) software.'' Although tag names in this section can be used in Cumulus MX, for backwards compatibility, there is now a better way to ensure that the value output by web tags can be understood by script languages which expect a full stop between the integer and decimal parts of a number.
 
Note that Cumulus does not use thousand separators, so the only places a comma can be used are as a field separator, or as a decimal separator. Obviously it cannot be used for both. Some computer languages like JavaScript will not accept a comma being used for this purpose.
 
===MX===
 
Cumulus MX uses JavaScript Object Notation files for many of its data transfers.
 
From '''release 3.5.4''' build 3075, most web tags (one notable exception is indoor temperature <#intemp> where rc parameter not available until release 3.6.8 build 3084), that produce decimal number output now support the "'''rc=y'''" option. e.g. <tt><#tempYH rc=y></tt> will report yesterday's highest temperature using a full stop to separate decimal part where the locale would normally use a comma.
 
===Legacy Cumulus===
 
Cumulus 1.9.4 uses JavaScript for various tasks, as do various third party web pages.
 
From '''version 1.9.3''' build 1045, Cumulus 1 (and MX) has provided some current conditions web tags, some today web tags, and some recent history web tags in an alternative format where (regardless of locale) the number is always output in a format that uses a decimal point. They are listed in the sub-sections that follow and all correspond to the same tag name with the letters 'RC' removed that has been listed in respective sections of this Wiki page.


===CURRENT CONDITIONS:===
====RC CURRENT CONDITIONS:====


<#RCtemp>, <#RCdew>, <#RCheatindex>, <#RChum>, <#RCinhum>, <#RCintemp>, <#RCpress>, <#RCrfall>, <#RCrrate>, <#RCwchill>, <#RCwgust>, <#RCwspeed>, <#RCwlatest>
<#RCtemp>, <#RCdew>, <#RCheatindex>, <#RChum>, <#RCinhum>, <#RCintemp>, <#RCpress>, <#RCrfall>, <#RCrrate>, <#RCwchill>, <#RCwgust>, <#RCwspeed>, <#RCwlatest>


===TODAY:===
====RC TODAY:====


<#RCpressTH>,  <#RCpressTL>,  <#RCrrateTM>,  <#RCtempTH>, <#RCtempTL>, <#RCwgustTM>,  <#RCdewpointTH>, <#RCdewpointTL>, <#RCwchillTL>, <#RCheatindexTH>, <#RCapptempTH>, <#RCapptempTL>
<#RCpressTH>,  <#RCpressTL>,  <#RCrrateTM>,  <#RCtempTH>, <#RCtempTL>, <#RCwgustTM>,  <#RCdewpointTH>, <#RCdewpointTL>, <#RCwchillTL>, <#RCheatindexTH>, <#RCapptempTH>, <#RCapptempTL>


===RECENT HISTORY:===
====RC RECENT HISTORY:====


<#RCRecentOutsideTemp>, <#RCRecentWindSpeed>, <#RCRecentWindGust>, <#RCRecentWindLatest>, <#RCRecentWindChill>, <#RCRecentDewPoint>, <#RCRecentHeatIndex>, <#RCRecentPressure>, <#RCRecentRainToday>, <#RCRecentUV>
<#RCRecentOutsideTemp>, <#RCRecentWindSpeed>, <#RCRecentWindGust>, <#RCRecentWindLatest>, <#RCRecentWindChill>, <#RCRecentDewPoint>, <#RCRecentHeatIndex>, <#RCRecentPressure>, <#RCRecentRainToday>, <#RCRecentUV>
Line 1,719: Line 1,740:


There are other derivatives that can be calculated similarly from a set of simultaneous values, as described below the recent history section.
There are other derivatives that can be calculated similarly from a set of simultaneous values, as described below the recent history section.
From '''version 3.5.4''' build 3075, most web tags (one notable exception is indoor temperature <#intemp> where rc parameter not available until version 3.6.8 build 3084), that produce decimal number output now support the "'''rc=y'''" option. e.g. <tt><#tempYH rc=y></tt> will report yesterday's highest temperature using a full stop to separate decimal part where the locale would normally use a comma.


==Yesterday==
==Yesterday==
Line 1,737: Line 1,755:
!style="width:550px" | Function
!style="width:550px" | Function
!style="width:150px" | Time
!style="width:150px" | Time
|-
|colspan="3" style="background:pink;"|Legacy and MX
|-
|-
|colspan="3" style="background:lightgray;"|Temperature & Humidity
|colspan="3" style="background:lightgray;"|Temperature & Humidity
Line 2,572: Line 2,592:
|-
|-
|<#sunrise>
|<#sunrise>
|Last sunrise time at the station - This sunrise time is calculated by a third party library each midnight UTC, and each hour Cumulus converts it to local time to ensure shown correctly before and after any clock change.
|Last sunrise time at the station - This sunrise time is calculated by a third party library each midnight UTC (in legacy cumulus), and each hour Cumulus converts it to local time to ensure shown correctly before and after any clock change.
|-
|-
|<#sunset>
|<#sunset>
|Next sunset time at the station - The sunset/sunrise times are calculated each midnight UTC, and each hour Cumulus converts them to local time to ensure it shows them correctly before and after any clock change.
|Next sunset time at the station - The sunset/sunrise times are calculated each midnight UTC (in legacy cumulus), and each hour Cumulus converts them to local time to ensure it shows them correctly before and after any clock change.
|-
|-
|<#daylength>
|<#daylength>
|Length of day in hours and minutes (sunrise to sunset) -  The third party library that Cumulus uses each midnight UTC, may take last sunrise from previous day and next sunset from next day, so the calculation may be off by a minute or so compared to true figure for current day.
|Length of day in hours and minutes (sunrise to sunset) -  The third party library that Cumulus uses each midnight UTC (in legacy cumulus), may take last sunrise from previous day and next sunset from next day, so the calculation may be off by a minute or so compared to true figure for current day.
|-
|-
|<#IsSunUp>
|<#IsSunUp>
Line 2,634: Line 2,654:
|-
|-
|<#SunshineHours>
|<#SunshineHours>
| see[[#Today.ini]] Miscellaneous
| see [[#Today.ini]] Miscellaneous
|-
|-
|<#SunshineHoursY>
|<#SunshineHoursY>
Line 2,888: Line 2,908:
|<#DavisTotalPacketsReceived>
|<#DavisTotalPacketsReceived>
|1.9.2 onwards and MX
|1.9.2 onwards and MX
|Total number of data packets received.
|Total number of data packets received. This stat is not supplied by the Davis WLL station.
|-
|-
|<#DavisTotalPacketsMissed>
|<#DavisTotalPacketsMissed>
|1.9.2 onwards and MX
|1.9.2 onwards and MX
|Number of missed data packets. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id.
|Number of missed data packets. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id. The default is n=0 and will return the VP2 stats.
|-
|-
|<#DavisMaxInARow>
|<#DavisMaxInARow>
|1.9.2 onwards and MX
|1.9.2 onwards and MX
|Longest streak of consecutive packets received. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id.
|Longest streak of consecutive packets received. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id. The default is n=0 and will return the VP2 stats.
|-
|-
|<#DavisNumCRCerrors>
|<#DavisNumCRCerrors>
|1.9.2 onwards and MX
|1.9.2 onwards and MX
|Number of packets received with CRC errors. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id.
|Number of packets received with CRC errors. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id. The default is n=0 and will return the VP2 stats.
|-
|-
|<#DavisNumberOfResynchs>
|<#DavisNumberOfResynchs>
|1.9.2 onwards and MX
|1.9.2 onwards and MX
|Number of times the console resynchronised with the transmitter
|Number of times the console resynchronised with the transmitter. From version 3.6.0 build 3076, optionally add "tx=n" parameter, where n=1-8 and equals the desired transmitter id. The default is n=0 and will return the VP2 stats
|-
|-
|<#DavisFirmwareVersion>
|<#DavisFirmwareVersion>
|1.9.2 onwards and MX
|1.9.2 onwards and MX
|The console firmware version
|The console/WLL firmware version
|-
|-
|<#THWindex>
|<#THWindex>
5,838

edits

Navigation menu