Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m (Corrections)
m (Tried to swap MX information and CI information throughout page, so MX read first)
There is a basic guide to what these parameters can do, and another link to the new page at [[#Input Modification Parameters and Output Modification Parameter]] later on this page.
 
{{TOCright}} [[Category:Cumulus 1]]
 
===The tag names===
 
|-
|<#feelslike>
|{{Version[[File:Badge badge 1}}v1.png]] Not available in Cumulus 1.
 
[[File:Badge vMx.png]]Not available in all MX versions. Please see [[#Feels_Like|sub-section before this table]] regarding availability by MX versions if you are using a MX version earlier than 3.6.10.
Ecowitt stations are sold under other names depending on nation, e.g. Ambient in USA, Froggit in central Europe, so Ecowitt is used as a generic name in same way as Fine Offset is used as a generic name for stations sold under a variety of branding, in this Wiki.
 
{{Version badge 1}}[[File:Badge v1.png]]Not available in Cumulus 1..
 
=====Extra Sensors: Ecowitt WH45 CO₂ sensor=====
 
=====Extra Sensors: Ecowitt Air quality, leak sensors, lighting detector, and extra temperature sensors=====
 
{{Version[[File:Badge badge 1}}v1.png]] Not available in Cumulus 1.
 
[[File:Badge vMx.png]] Please see release announcements for when individual web tags became available
|-
|<#RecentFeelsLike>
|{{Version badge[[File:Badge 1}}v1.png]] Not available in Cumulus 1.
 
[[File:Badge vMx.png]] Available from version 3.6.11 (b.3087) onwards.
|-
|<#RecentHumidex>
|{{Version badge[[File:Badge 1}}v1.png|File]] Not available in Cumulus 1.
 
[[File:Badge vMx.png]] Available from version 3.7.0 (build 3089) onwards.
|-
|<#SystemUpTime>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|How long the system has been up, e.g. "8 hours 21 minutes"
|-
|-
|<#CpuName>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|CPU type, e.g. "Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz"
|-
|<#CpuCount>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|Number of processors, e.g. "4"
|-
|<#MemoryStatus>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|Free and total system RAM, e.g. "4619/8191 MB (free/total)"
|-
|<#DisplayMode>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|Screen display mode, e.g. "1680x1050, 32 bit"
|-
|<#AllocatedMemory>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|Amount of memory allocated to Cumulus, e.g. "18.76 MB"
|-
|<#DiskSize>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|Size of disk on which Cumulus is running, e.g. "931.51 GB"
|-
|<#DiskFree>
|{{Version badge 1}}(not available on MX)
 
[[File:Badge v1.png]] only in legacy Cumulus
|Free space on disk on which Cumulus is running, e.g. "515.36 GB"
|}
**Between midnight and 9am/10am the <#metdate> will return the date associated with previous calendar day, but will still return current time
 
{{VersionLegacy badgewebsite: 1}}Can be used with relevant format parameters to [[Customised templates|customise]] '''todayT.htm''' template page to display current meteorological day, to customise '''thismonthT.htm''' template page to display meteorological month, and to customise '''thisyearT.htm''' template page to display correct meteorological year. This will be particularly useful on first and last day of month/year when rollover happens at 9 (or 10) a.m. and the month (and maybe year) is different before and after rollover.
 
[[File:Badge vMx.png]] Earlier MX releases provide a similar web template set, so these can be customised in same way as for legacy Cumulus above (but note capital "M" must be used for any month formatting). From release 3.10.1 the supplied web pages are web server based, there are no web templates to customise, and the supplied '''.json files''' do not include any meteorological date functionality.
|-
|<#timeJavaScript>
| [[File:Badge vMx.png]]Available from version 3.5.2, so not available in legacy software
|{{Version badge 1}} Not available in Cumulus 1.
 
[[File:Badge vMx.png]]Available from version 3.5.2
 
The JavaScript '''Date''' object contains the number of miliseconds since 00:00:00.000 UTC on 1st January 1970, that date and time is known as the UNIX Epoch. In JavaScript, you can use <tt>Math.floor(new Date().getTime()/1000.0)</tt> This getTime method returns the time in milliseconds. The web tag returns an integer (currently with 13 digits) representing the number of milliseconds since the UNIX epoch when the web tag was processed. It can be used in a script where you wish to re-express other times output by Cumulus MX into UTC (Coordinated Universal Time). Mac OS X uses 00:00:00.000 UTC on 1st January 2001 as the starting time and date for its millisecond count, so that is considerably lower.
|-
|<#timeUnix>
| [[File:Badge vMx.png]]Available from version 3.7.0, so not available in legacy software
|{{Version badge 1}} Not available in Cumulus 1.
 
[[File:Badge vMx.png]]Available from version 3.7.0
 
Unix tracks the number of seconds since the UNIX epoch. So this web tag can be used when you do not want the millisecond accuracy of the previous web tag. Like previous web tag this relates to UTC, so see details for that tag to find out more. This is equivalent in PHP 5 and PHP 7 to '''time();''' (in PHP 8, a parameter is mandatory for time function, so the call changes).
 
If there is no entry in Weather Diary for the day explained above, reports zero.
 
{{Version badge 1}} 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.
 
[[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.
 
{{Version[[File:Badge badge 1}}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.
|-
|<#snowlying>
| [[File:Badge vMx.png]] Available from version 3.1.1 - build 3054. If there is no entry in Weather Diary for the day explained above, , this web tag returns Null. Otherwise reports 1 if tick in diary, 0 is unticked.
|{{Version badge 1}}Although this tag is not available in Cumulus 1, your web page can use a script to check if <#snowdepth> is non zero, as that means snow is lying
 
[[File:Badge vMxv1.png]] AvailableAlthough fromthis version 3.1.1 - build 3054. If theretag is nonot entryavailable in WeatherCumulus Diary1, foryour theweb daypage explainedcan above,use ,a thisscript webto tagcheck returnsif Null.<#snowdepth> Otherwiseis reportsnon 1zero, ifas tickthat inmeans diary, 0snow is unticked.lying
|-
|<#snowfalling>
| [[File:Badge vMx.png]] Available from version 3.1.1 - build 3054. If there is no entry in Weather Diary for the day explained above, , this web tag returns Null. Otherwise reports 1 if tick in diary, 0 is unticked.
|{{Version badge 1}} Not available in Cumulus 1. There is no web page workaround, unless you write a script that reads [[Weather Diary]] and makes relevant information available on your web server.
 
[[File:Badge vMxv1.png]] AvailableNot fromavailable versionin Cumulus 3.1.1 -There buildis 3054.no web page workaround, unless Ifyou therewrite isa noscript entrythat inreads [[Weather Diary]] forand themakes dayrelevant explainedinformation above,available ,on thisyour web tag returns Null. Otherwise reports 1 if tick in diary, 0 is untickedserver.
|}
 
|<#newrecord>
|Indicates when any tracked extreme is changed.
* [[File:Badge vMx.png]]In Cumulus MX: 1 from when new record is set until
*{{Version badge 1}}In Cumulus 1.x.x:
** 1 if 'new record' light is flashing,
**0 if not
*[[File:Badge vMx.png]]In Cumulus MX: 1 from when new record is set until
** either all records have cleared
** or until next rollover is completed,
** or (in recent releases) until the number of hours for clearing extreme record notifications has passed
* 0 otherwise
*{{Version badge[[File:Badge 1}}v1.png]]In Cumulus 1.x.x:
** 1 if 'new record' light is flashing,
** 0 if not
|-
|<#TempRecordSet>