User Tools

Site Tools


wiki:cumulusmx:webtags:start

CumulusMX Webtags

Webtags are used throughout CumulusMX to enable you to collect and use individual items of data supplied by the program. Although they are called 'Webtags' which implies Internet use, they can be used for many other purposes as well. You can create and populate database tables, set up custom alarms, send emails including specific data to name but a few.

All Webtags come in the form <#tagname> which is processed by CumulusMX into a value from your data. Nearly all Webtags can take parameters to format the output that they generate. This could be to include a specific number of decimal places or the data and/or time. A smaller number also accept input parameters that control which specific value is returned.

Some examples

These are just a small sample of the Webtags that are available. Use the menu on the right to investigate further.

Webtag What it does
<#temp> This returns the current temperature.
<#temp dp=2> This forces the data returned to have two decimal places.
<#time format=“HH:mm:ss”> This returns the current time including seconds.
<#RecentTemp h=6> This returns the temperature 6 hours ago.

Use the menu on the left to navigate to comprehensive lists of the available Webtags.

Parameters

Many Webtags accept output parameters that affect the format of their output. Some also expect input parameters that identify the specific data required. Input parameters are covered in the page dealing with the Webtags affected.

Numbers

Parameter Explanation
nv= Specifies what should be returned if there is no actual value stored. Note nv=0
nv=null
nv='Not available'
rc=y Forces CumulusMX to use a decimal point rather than comma. Note <#temp rc=y>
dp=? Forces the output to have the specified number of decimal placed.Note <#temp dp=3>
tc=y Truncates the output to an integer value. <#temp tc=y>

Date and Time

In general all date/time tags will accept format strings with some exceptions. CumulusMX just passes the format string to the datetime formatter. Note All dates are returned based on the local in which they are used.

Specifier Description Examples
“d” Interpreted as a short date formatter. Note
“D” Interpreted as along date formatter.
“f” Interpreted as a short date/time formatter.
“F” Interpreted as a long date/time formatter.
“d” or “dd” The day of the month; former: 1 to 31, latter: 01 to 31.Important
“ddd” or “dddd” The name of the day - “ddd” is abbreviated.
“h” or “hh” The hour of the day based on the 12hr clock. “h” is without a leading zero.
“H” or “HH” The hour of the day based on the 24hr clock. “H” is without a leading zero.
“m” or “mm” The minute of the day without a leading zero / with a leading zero.
“M” or “MM” The month number without / with a leading zeros,
“MMM” or “MMMM” The month name based on your locale, “MMM” is abbreviated.
“s” or “ss” The second without / with a leading zeros.
“t” or “tt” The AM/PM designator, former just the first character.
“yy” or “yyyy” The year; “yy” is two digits, “yyyy” is four digits.
“:” The standard time separator.
“/” The standard date separator.
string Defines a literal string which will be included in your date.
“\” Interpret the next character as literal, i.e. include it in your date as is.
Any other characters These are interpreted as literal characters.

Examples

<#TtempHT format=“h:mm:ss t”>will return the time of todays highest temperature as 3:55:23 P
<#TtempHT format=“HH00 \h\o\u\r\s”>will return the same information but just show the hour, e.g. 1500 hours.

Note

For a full explanation of all available formatting characters refer to Microsoft: Standard formatting strings and Custom formatting strings

Testing Webtags

One of the major uses of Webtags is to generate your own data. This is easily done using the Extra Web Files page.

wiki/cumulusmx/webtags/start.txt · Last modified: by Neil