Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
Minor resequencing of page, some corrections re 3.12.0 beta build tags
mNo edit summary
m (Minor resequencing of page, some corrections re 3.12.0 beta build tags)
[[Category:Terminology]]
=Some content has been removed from this page=
 
Please be aware some content originally on this page has been moved to other pages. Old posts on the support forum that used to link directly to the specific material, will instead bring you to this start of the page.
 
TheWhere newthe linksold tocontent materialwas thatcut, hasnew beenlinks movedhave off this page can be found approximately where the material used tobeen besubstituted within three sections on this page: [[#Input Modification Parameters and Output Modification Parameters]], [[#The tag name]], and [[#Recent History]].
 
=Essential Background Reading=
 
If you have not used this Wiki page before, or are unsure about using "web tags", there are some concepts that you do need to understand in the sub-sections that follow.
 
===The tag names===
 
<div style="background: LemonChiffon;padding:5px; margin:2px;">All the "tag_names" that are available for legacy 1.9.4, and for MX up to first beta build release '''3.12.0'''</div> are in [[#Full List of Tag Names]] later on this page.
 
<big>If you edit this page, to add tag names for later builds, please amend the previous sentence.</big>
 
If you are using a Oregon Scientific weather station, then you should read [[#Web tags mentioning (outside) temperature]] in the optional reading section.
 
Do not assume that Cumulus always works according to normal meteorological practice in your nation. For examples, the hours used by Cumulus to report derivatives involving rainfall, or minimum temperature, may vary from figures reported by local meteorological stations.
 
===Quick summary of MX and Legacy differences===
 
==Cumulus MX versus original Legacy Cumulus 1==
 
The full information that used to appear on this page for differences between MX and the legacy Cumulus has been moved to a new [[Webtag Applicability|Web tag Applicability page]]. The next subsection just gives a basic summary.
 
[[File:Badge vMx.png]] This page has been updated to include web tags up to version 3.12.0 beta build 3134. Announcements for new builds of MX generally provide too little information for it to be easy to update this page, that is why it is often out of date.
* Since version 3.10.x, MX has not used web page templates, please see <big>[[WebsitedataT.json]]</big> page, instead of this Wiki page.
*# That page explains the ID names used on the [[New_Default_Web_Site_Information|default web site]] introduced from release 3.10.0
*# That page documents each data pair in the file
*# That page gives the source web tag for each ID name on the web pages
*# That page explains what data is represented by the ID name, JSON attribute, web tag name
* Past MX releases 3.0.0 to 3.9.7 used [[Cumulus template file|web template files]], similar to (but not same as) the legacy software
** This Wiki page remains organised according to the content of those old template files.
 
[[File:Badge v1.png]][[Category:Cumulus 1]] This page was created for Cumulus 1. Steve/Beth Loft provided some example [[Cumulus template file|web template files]], but expected Cumulus users to develop their [[Customised templates|own Cumulus template files]] making use of the web tags, listed below, that the software provided.
 
For tag names available in the release you are using, see the next sub-sections.
Early releases of MX also followed that [[Customised templates|web page template files you could customise]] approach, but that has now stopped.
<div style="background: LemonChiffon;padding:5px; margin:2px;">
[[File:Crystal Clear info.png|40px]]
 
===What web tags can I use?===
USING CURRENT RELEASE OF MX?
* Go to <big>[[WebsitedataT.json]]</big> page, instead of this one
* That page explains the ID names used on the [[New_Default_Web_Site_Information|default web site]] introduced from release 3.10.0
* That page documents each data pair in the file
* That page gives the source web tag for each ID name on the web pages
* That page explains what data is represented by the ID name, JSON attribute, web tag name
 
Basically, it depends on which web tags are in whatever files are used to transfer weather derivatives to your web server.
Continue reading this Wiki Page if you are using your own (customised) web pages, using legacy web pages, ''or'' want a definitive list of all available web tags.
</div>
 
As Cumulus has developed, more tag names have been introduced, the tables showing tag names available, attempt to give an indication of which release introduced them. You can, see below, ask Cumulus (both MX and legacy) to list all the tag names it recognises, when it is started at whatever build you are running.
=Essential Background Reading=
 
 
 
====Using release after 3.9.7?====
 
If you are using the [[New_Default_Web_Site_Information|default web site]], its standard web pages show data as follows:
* Pages with tabular presentation, see [[WebsitedataT.json]].
* Pages with graphs, see [[Cumulus.ini#Optional_Web_Server|Graph File Settings]].
* Page with steel series dials, see [[Cumulus.ini#Display_Options|Display Options]].
 
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 legacy Cumulus, or MX releases up to 3.11.4, to list tag names when starting====
 
The tag names available in the release/version/build you are using, can be listed (in Cumulus 1 or Cumulus MX) by adding the following line to [[Cumulus.ini#Section:_Station|Cumulus.ini]] in the [station] section...
<code>ListWebTags=1</code>
 
Then start Cumulus and 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.
 
To stop Cumulus continuing to produce new versions of that file change the line to say ...
<code> ListWebTags=0</code>
 
[[File:Badge v1.png]] If you are using Cumulus 1, each build of that contains a build specific version of Cumulus Help, and within that help is a list of web tags with basic information on what each tag_name returns.
 
[[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.
 
If you have not used this Wiki page before, or are unsure about using "web tags", there are some concepts that you do need to understand in the sub-sections that follow.
 
==What is a web tag? ==
==General Format for Web Tags==
 
In the position, in any (HTML, JSON, PHP, XML) template file, SQL, or Custom HTTP, where Cumulus is to insert the relevant data, place a web tag in the '''general format''' specified here: <code><#tag_name [optional input selection parameters] [optional output modification parameters]></code>
 
===The optional parameters===
 
 
===The tag names===
 
===Inconsistency of tag names===
<div style="background: LemonChiffon;padding:5px; margin:2px;">All the "tag_names" that are available for legacy 1.9.4, and for MX up to release '''3.12.0'''</div> are in [[#Full List of Tag Names]] later on this page.
 
For both the legacy Cumulus and for MX, it is vital that you use tag names exactly as they are listed. That would be easy had Steve Loft created a naming standard and stuck to it.
As Cumulus has developed, more tag names have been introduced, the tables showing tag names available, attempt to give an indication of which release introduced them. The information that used to appear on this page for differences between MX and the legacy Cumulus has been moved to a new [[Webtag Applicability|Web tag Applicability page]].
 
To be fair to Steve, he created the legacy Cumulus for his own use, working in his spare time, alongside a full time job.
For tag names available in the release you are using, see the next sub-section.
 
Remember, the original design did not anticipate use by others, nor how much extra functionality would be added later.
If you are using a Oregon Scientific weather station, then you should read [[#Web tags mentioning (outside) temperature]] in the optional reading section.
 
Early versions of Cumulus could only report current values and the summary for the day so far. Different web tags for today-so-far were added at different times, hence the names are inconsistent. New web tags for today-so-far added before yesterday tags were considered lack the T suffix (or prefix) later today-so-far tags use.
====Inconsistency of tag names====
 
All-time tags were introduced before yesterday, this month and this year; hence all-time tag names assume they are only extreme monitoring.
For both the legacy Cumulus and for MX, it is vital that you use tag names exactly as they are listed. That would be easy had Steve Loft created a naming standard and stuck to it. To be fair, when he first created tag names, Cumulus could only report current values and the summary for the day so far; Steve did not anticipate, back then, that later he would add extreme record monitoring. The legacy tag names for this month and this year were all introduced in a single release and they remain consistent apart from what MX added later! However, they are not consistent with the naming of the all-time extremes introduced much earlier.
 
The legacy tag names for this month and this year were all introduced in a single release and they remain consistent apart from what MX added later! However, they are not consistent with the naming of the all-time extremes introduced much earlier.
This great inconsistency in the naming, gives rise to a problem as it very easy to spell a tag_name incorrectly (and I apologise if any such mistakes creep into the tables) as you naturally expect there to be a standard pattern. Some tags are all lower-case, some are camel-case, and some start with a capital letter. Have a look yourself at just how much inconsistency is present in the names in the tables below.
 
This great inconsistency in the naming, gives rise to a problem as it very easy to spell a tag_name incorrectly (and from time to time such mistakes creep into the tables on this Wiki page) as you naturally expect there to be a standard pattern. Some tags are all lower-case, some are camel-case, and some start with a capital letter. Have a look yourself at just how much inconsistency is present in the names in the tables below.
 
 
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.
 
=====Inconsistency in use of "T"=====
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>.
 
====General Tip====
 
''This sub-section applies to releases up to 3.11.4.'' (From 3.12.0, use the admin interface and Program settings → General options, to get to where you change this setting, instead of editing the file as described below).
 
The tag names available in the release/version/build you are using, can be listed (in Cumulus 1 or Cumulus MX) by adding the following line to [[Cumulus.ini#Section:_Station|Cumulus.ini]] in the [station] section...
<code>ListWebTags=1</code>
 
Then start Cumulus and 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.
 
To stop Cumulus continuing to produce new versions of that file change the line to say ...
<code> ListWebTags=0</code>
 
[[File:Badge v1.png]] If you are using Cumulus 1, each build of that contains a build specific version of Cumulus Help, and within that help is a list of web tags with basic information on what each tag_name returns.
 
[[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.
 
===The functionality that can use web tags===
|<#LightningTime>
|Date and Time of last strike (default without output parameters is locale's short time format e.g. 18:02 or 6:02 pm, without date, but tag accepts both date and time output parameters). Returns '----' if you don't have sensor or there has not been a strike since the sensor was installed. (GW1000 api returns FFFF FFFF seconds after midnight on 01 Jan 1970, which translates to 07/02/2106 06:28:15, so MX translates that to '----')
|-
|<#LightningStrikesToday>
|Number of strikes since midnight, default 0
|-
|<#UserTemp1>
|-
|colspan="4" style="background:lightgray;"|Indoor Temperature & Humidity tags
|-
|colspan="4" | (to do)
|-
|colspan="4" style="background:lightgray;"|Outdoor Temperature & Humidity tags
[[File:Badge vMx.png]] Input is to 2 decimal places. Available from version 3.1.1 - build 3054 when weather diary editor was added to MX. MX allows output in centimetres with decimal places without any script. You can't change the units shown in admin interface, but your value can be input as inches to 2 decimal places if you ignore "cm" that is displayed in that interface.
 
[[File:Badge v1.png|Fil]] Input and output is always as integer. Available from very early builds, weather diary input amended from version 1.8.6 14th April 2009 to allow units to be specified on diary edit screen. If you choose to enter as whole millimetres, you can use JavaScript (or another script language) on your web page to divide the web tag by 10 and get centimetres to 1 decimal place on output.
|-
|colspan="2" style="background:pink;"|MX only
|-
|<#snowlying>
|Today's low apparent temperature
|<#TapptempTL>
|-
|colspan="3" style="background:pink;"|MX only
|-
|<#feelslikeTH>
Please see sub-section below current conditions if you are using Cumulus 1 or an earlier version of MX.
|<#ThumidexTH>
|-
|colspan="3" style="background:pink;"|Both legacy and MX
|-
|<#heatindexTH>
|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
|n/a
|-
|colspan="3" style="background:pink;"|MX only
|-
|<#LightningStrikesToday>
|Number of strikes since midnight, default 0
 
(Please see release announcements for when individual web tags became available, other lightning tags can be found in [[#Current_Conditions|Current Conditions table]])
|-
| <#chillhoursToday>
| The incremental chill hours figure since start of today (available from version 3.12.0 beta build 3134)
 
(Compare with Cumulative seasonal Chill Hours at end of today <#chillhours> found in [[#Current_Conditions|Current Conditions table]])
|}
 
|The temperature range (max - min) yesterday
|n/a
|-
| <#Ychillhours>
| [[File:Badge vMx.png]] (Available from release 3.12.0 onwards)
 
The Cumulative [[Heat/cold_degree_days_and_Chill_hours#Chill_Hours_and.2For_Air_Frost|Chill Hours]] as recorded at rollover (the end of meteorological yesterday)
| n/a
|-
|<#apptempYH>
|Yesterday's low apparent temperature
|<#TapptempYL>
|-
|colspan="3" style="background:pink;"|MX only
|-
| <#Ychillhours>
| The Cumulative [[Heat/cold_degree_days_and_Chill_hours#Chill_Hours_and.2For_Air_Frost|Chill Hours]] as recorded at rollover (the end of meteorological yesterday) (Available from release 3.12.0 onwards)
| n/a
|-
| <#chillhoursYest>
| The incremental [[Heat/cold_degree_days_and_Chill_hours#Chill_Hours_and.2For_Air_Frost|Chill Hours]] change yesterday (Available from release 3.12.0 onwards)
 
(compare with <#chillhoursToday> described in [[#Today.ini]] table)
| n/a
|-
|<#feelslikeYH>
|[[File:Badge vMx.png]] Available from version 3.6.10 (NOT AVAILABLE IN CUMULUS 1)
 
Yesterday's high feels like temperature
|-
|<#feelslikeYL>
|[[File:Badge vMx.png]] Available from version 3.6.10 (NOT AVAILABLE IN CUMULUS 1)
 
Yesterday's low feels like temperature
|-
|<#humidexYH
|[[File:Badge vMx.png]] Available from version 3.7.0, withdrawn from 3.7.1 (NOT AVAILABLE IN CUMULUS 1)onwards
 
Yesterday's low Canadian Humidity Index
|<#ThumidexYH>
|-
|colspan="3" style="background:pink;"|Legacy and MX
|-
|<#heatindexYH>
|The total wind run for yesterday
|n/a
|-
|colspan="3" style="background:pink;"|MX only
|-
| <#windAvgY>
The wind run yesterday divided by 24 hours to express it as an average wind speed
| n/a
|-
|colspan="3" style="background:pink;"|Legacy and MX
|-
|colspan="3" style="background:lightgray;"|Miscellaneous
5,838

edits

Navigation menu