Webtags (preserving history) and MX Administrative Interface: Difference between pages
| Line 1: | Line 1: | ||
[[Category:Terminology]] |
|||
=What is a web tag? = |
|||
#Type the URL which is displayed (when MX starts running) into your browser (replace the * with the IP address, or use 'localhost') and the '''admin interface''' should appear. You will be viewing your admin interface on the same network as the the MX engine is using, so what you type might be something like <tt>http://192.168.1.xy:8998</tt> and you may need to look at your hub or router to see what to use for x and y as they represent the device where MX is running. |
|||
Put simply, a web tag is included in a Cumulus template file to indicate where Cumulus should insert values when it produces an output file. The concept of [[Customised_templates#What_is_meant_by_.27Cumulus_processes_templates.27|processing templates]] is explained in another article. The output file can be a [[Customised_templates#HTML_5_-_a_very_quick_guide_to_structure|web page]], a [[Feels_Like#HTML_code_to_translate_web_tags_to_JavaScript_variables_.28as_modified_for_additional_parameters.29|JavaScript file]], a PHP script, or a [[Xml_webtags|eXtensible Mark-up Language (XML)]] file. |
|||
#*If this is a 'clean' installation, ''i.e. you don't have an existing [[Cumulus.ini]] file defining station type and units to be used'', the first thing you will need to do is to go to the '''settings''' screen. |
|||
#When that page is displayed it always shows the options to set the station type and units. |
|||
#Before you leave this page, you can make any other configuration settings by picking a section and clicking it to show the selections within that section. |
|||
#Now go to bottom of this page and click the 'Save' button. |
|||
Having set the station type, and other settings, you will need stop Cumulus MX and start it again. |
|||
== Why does MX talk about tokens? == |
|||
== The API interface == |
|||
MX uses a '''token parser''' to read the web tags and replace them with the correct value, so if diagnostic output refers to tokens, it is saying the attempt to actually work out what content to return to replace the web tag with its tag name and parameters has encountered a problem. |
|||
The current data is transferred from the MX engine to the Admin interface as a JSON string accessed via a Application Program Interface (api). To see the full content type into your browser the same IP reference as for the admin interface and add a few more items i.e. something like <tt>http://192.168.1.x:y/api/data/currentdata</tt> and you may need to look at your hub or router to see what to use for x and y as they represent the device where MX is running. |
|||
{{TOCright}} |
|||
Many browsers (e.g Firefox) allow you to specify the type of a file you want to view. So if you specify json as the type this will make the browser show it in a long but fairly readable format. This api is how the current data (now.html) page in the admin interface gets its data. Each table cell contains a span element and each span element is given an id attribute whose value matches one of the items in the json stream coming via the api. |
|||
=GENERAL TIP= |
|||
This same api can be used to get weather data into another device, although you may prefer to use MQTT instead as that is more easily customised to just share the few weather values you might want. |
|||
The web tags available in the 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... |
|||
===Technical aside=== |
|||
ListWebTags=1 |
|||
When reading the support forum (or articles in this Wiki), you may see mention of AJAX and WebSockets. They are both methods of exchanging information between a web page and the data source. In the Cumulus MX context, they represent two ways of updating the data shown on an admin interface page like '''now.html''' or ''todayyest.html''. |
|||
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. |
|||
Asynchronous JavaScript and XML (AJAX) is the widely used name for what Microsoft invented as '''XMLHttpRequest''' (late 1999, Internet Explorer 5.0) now it is implemented in all browsers and no longer purely Microsoft feature. Put as simply as I can, it lets code written into JavaScript ask for updated information from the Cumulus MX engine to update the numbers on the web page. In the standard Cumulus 1 trends.htm web page, AJAX was used to load an updated graph into the web page each time the client pressed a button requesting a graph. |
|||
An example of the output for an early MX version is at the end of this page (the actual output does not include commas, and has just one item per line, it has been compressed for inclusion in this article). |
|||
WebSockets is an improvement on AJAX. While AJAX needs the client to make a request before an update can be made, WebSockets adds the option that the source can generate the request and do a remote update. Thus when you open ''todayyest.html'', the MX engine gets a request from that web page to insert the various sub-tables into that web page. Subsequently, when WebSocket use is enabled, the MX engine sends updates with new figures, until you close the web page and a '''Connection Closed''' message is sent instead. |
|||
To stop Cumulus continuing to produce new versions of that file change the line to say ... |
|||
== The MQTT interface == |
|||
ListWebTags=0 |
|||
Until this section is written, please see [[Cumulus.ini#MQTT]] for the information you can put into settings, and where to enter it. |
|||
{{Version badge 1}}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. |
|||
== The Data Log Viewing and Editing interface == |
|||
=What this article covers = |
|||
#At the last count, a 3.5.x version of MX produces ''nine and a half million'' '''web tags'''! |
|||
#But the file mentioned in previous section contains just 717 items (later versions of MX raise this count by another forty tags or so). |
|||
#How come this discrepancy? |
|||
The '''Data logs''' tab in the admin interface, gives access to screens that can display the contents of 3 types of log files: |
|||
*Well each web tag has the general format <tt><#tag_name optional_input_parameter optional_output_parameter></tt> and it is adding these optional parameters that allow 717 tag names to define 9½ million values! |
|||
#The [[Standard log files|standard log file]]; there is one of these for each month - choose menu item '''Data logs''' (yes same name as tab) |
|||
#The [[Extra Sensor Files|Extra Sensor log File]]; there is one of these for each month - choose menu item '''Extra Data Logs''' |
|||
#The [[Dayfile.txt|Daily Summary log file]]; there is only one of these - choose menu item '''Dayfile''' |
|||
=== General points common to web pages for editing standard and extra sensor logs === |
|||
Consequently, this article describes: |
|||
*Over 7 hundred web tags -'''THIS ARTICLE MAY NOT CONTAIN ALL WEB TAGS AVAILABLE IN LATEST VERSION - It depends on someone updating this article if the developer does not have time to do so''' |
|||
*A score of input parameters that modify some of those tags |
|||
*The components that make up output parameters |
|||
** some control number of decimal places |
|||
** one controls whether decimal comma appears |
|||
**the majority modify the output from almost all web tags that report a time and/or date |
|||
*The way that some of those date modifiers are used for naming NOAA reports |
|||
'''For the first two web pages, but not the daily summary log web page:''' |
|||
*On this screen,you see a box for selecting the log you want to display. The default month and year (shown on loading the web page) is taken from yesterday's date. No log is loaded at start up. You can '''either''' type in a period (one or two digit representing month, then hyphen, then four digits representing year) '''or''' select year then click month in the data picker (this is produced by the bootstrap software MX uses, it is not the date picker provided by your browser), when you click on the month the box is updated with selected period. |
|||
* Next to it is a "Load" button. Press it and the Cumulus MX engine will generate an application programming interface (api) table containing a maximum of 10 lines taken from the log file selected and it is sent in dataTables software format to the web page. |
|||
'''Web page for editing daily summary log only''' |
|||
The tables below are not able to indicate which of the billions of combinations possible are valid or invalid for you. |
|||
There is no need to select this log, the Cumulus MX engine will generate an application programming interface (api) table containing just 10 (at most) lines from log file and it is sent in dataTables software format to the web page. |
|||
==Applicability by version and build== |
|||
=== General points common to all 3 web pages for editing all logs === |
|||
The tip at the start of this article tells you how to check which tags are available in whatever build of Cumulus you are actually using. Given how often a new release alters either what web tags are available or what parameters can be used with particular web tags, it is not possible for the tables below to precisely list all web tags at any version, or which modifiers are available at your version. |
|||
'''For all 3 web pages''' |
|||
Because Cumulus 2 is no longer available, it has been ignored in the tables below. It never really worked for web page generation, so if you happen to have installed Cumulus 2 from when it was available, you probably don't care which web tags it supports. |
|||
The application programming interface only takes a copy of just 10 (or less if not all ten available) lines from log file and sends those to the admin interface. |
|||
[[File:Badge v1.png]]This badge is used to highlight text that applies to Cumulus 1. |
|||
*Use of this badge does NOT mean that all builds of Cumulus 1 are able to use the web tag. |
|||
*There are gaps in the Cumulus 1 documentation, and so it is not usual for the table entry to indicate when a particular web tags started to be available |
|||
*If you are using the final version of Cumulus 1, then the text highlighted by that badge does apply to you. |
|||
*In general, Cumulus 1 will silently ignore any web tag it does not recognise. This means that you might see the raw |
|||
web tag remaining after processing, or you might see nothing where the web tag was prior to processing. It also means that if you try to do a numeric calculation on a web tag that Cumulus 1 does not recognise, the calculation will fail, but you might not see an error message. |
|||
The '''Refresh''' button will get the 10 lines currently displayed from the MX engine again. Useful if the log file is being updated by another process, or you wisely took a back up before you started editing, you have mucked up the editing, so you replace the original file with the backup and this button gets you access to the ten lines from that replaced copy. For the dayfile.txt, of course MX does a backup for you every day, so you could use that to replace a mucked up edit. |
|||
[[File:Badge vMx.png]]This badge is used to highlight text that applies to Cumulus 3 (MX) only. |
|||
*In many cases, it highlights web tags that are not available in Cumulus 1 |
|||
*Use of this badge does not mean that all builds of MX are able to use this web tag |
|||
*Some attempt has been made to indicate '''either''' which MX build introduced individual tags, '''or''' from which build the web tag started giving the correct response (where earlier builds reported incorrect values for that web tag in some cases). |
|||
*MX will raise an error: |
|||
**for any web tag it does not recognise at the version you are running |
|||
**for any input parameter that the token parser is unable to recognise |
|||
*MX treats output parameters differently: |
|||
**any output parameter that it does not recognise at all, is ignored |
|||
**any output parameter in a web tag that '''does not''' accept output parameters is also ignored |
|||
**any output parameter in a web tag that does accept output parameters, where the supplied parameter is inconsistent with the content of the web tag, is reported as an error by the token parser |
|||
**an output parameter that specifies only part of the standard output may be reported as an error because of single character rules (for example a tag that reports a time cannot understand '''format=H''', amongst the acceptable formats are ''format=%H'' for just hour and '''format=H:mm''' for hour and minutes but not seconds. |
|||
**any output parameter that contains incorrectly formatted characters in that output parameter will be treated as an error by the token parser (a common mistake is forgetting spaces are expected to be included with other literal characters by the MX token parser) |
|||
**if you use valid parameters but the wrong parameters, you are likely to be confused by the output (the most common cases result in seeing minutes where a month is wanted, or there is a misunderstanding of the concept where the same character has different meanings when on its own and when with other characters). |
|||
The dataTables software that shows the log on the web page includes pagination. The full (up to) ten lines received from the Cumulus MX engine are shown at a time. |
|||
= NOAA style Report Naming = |
|||
*There is an icon to move to first page |
|||
*An icon to move to previous page (if there is an earlier page) |
|||
*A set of numbers, click a number (not all shown) to go to that page |
|||
*An icon to move to next page (if there is a later page) |
|||
*There is an icon to move to last page |
|||
When you choose another page, the api has to fetch the (up to) 10 lines for that page. These replace the dataTables insert you saw before |
|||
== A brief history of these reports == |
|||
Cumulus 1, 2, and MX, generate climatological reports for both Monthly and Yearly periods. The reports were first added to Cumulus 2 after someone asked for this feature in enhancement request 44. They were based on Weatherlink reports, that in turn were based on climatological reports issued by The US National Oceanic and Atmospheric Administration's National Weather Service (the reason for using NOAA in the naming of the reports). Ken True implemented the Weatherlink reports in his Saragota suite, and Steve Loft took that as his starting point. Although they were first only in Cumulus 2, they were added to Cumulus 1 in version 1.9.2 (build 1004) released in July 2011, after the abandonment of Cumulus 2. |
|||
*When you select a line, two buttons are enabled: |
|||
== Encoding == |
|||
*#'''Edit''' - rather obviously brings up (by the '''altEditor''' software that generates it) a dialog (dataTables calls this a modal) showing all fields and letting you change the contents of most individual fields. Scroll down and in the footer are two buttons: |
|||
*##''Save'' will send the edited line back to the MX engine where the log file is then read into an array, and the relevant array element is replaced by the line received. After that the log file is overwritten from the amended array. After that the log file as a whole is converted back to dataTables format and returned by the api that delivered the table originally. |
|||
*#'''Close'''. You can close this dialog in 3 ways: |
|||
*##clicking that Close button |
|||
*##Clicking the small '''x''' at the top right |
|||
*## Clicking anywhere outside the dialog |
|||
*#'''Delete''' - rather obviously brings up a dialog (known as modal by the '''altEditor''' software that generates it) showing all fields. Scroll down and in the footer are two buttons: |
|||
*##The second ''Delete'' button on the modal will send the existing line back to the MX engine where the log file is then read into an array, and next MX deletes the relevant array element whose date matches the line received. At present, MX software in the engine does not check the times match! After that the log file is overwritten from the amended array. After that the log file as a whole is converted back to dataTables format and returned by the api that delivered the table originally. |
|||
*#'''Close'''. You can close this dialog in 3 ways: |
|||
*##clicking that Close button |
|||
*##Clicking the small '''x''' at the top right |
|||
*## Clicking anywhere outside the dialog |
|||
'''Be aware''' |
|||
=== Why does encoding matter?=== |
|||
* The api expects the log file to contain all the fields defined in the version of MX that is being used. |
|||
*Lines in the log files created by earlier versions of Cumulus (Cumulus 1 or MX) may have fewer fields |
|||
*The way that MX has been written is inconsistent in the way it deals with fields that MX now expects but at the time that any log line was created did not exist. When adding the missing fields, some are added with empty string as content and some are added with a single space as content. When the editing modal is opened it may display placeholder text where a missing field is empty, but if you don't see that place-holder, there is probably a space included in the supposedly empty field (that you can't see), but that space (if not removed) could muck up any number you now want to store there. |
|||
*If you do edit a line, and then '''Save''', then that particular line (but no others in the log file) will change its length to that used by the current version of MX and you will see additional trailing field separators (commas, semicolons, or whatever defined for your locale) in that line making it seem different from its neighbours. Again you may spot an inconsistency in content as some gaps may appear between delimiters where spaces have been added for fields that were originally missing. |
|||
== Changing Settings == |
|||
If you have problems with a web page not displaying the '''°''' symbol correctly, it will be because the character set encoding is either not declared or not consistent. |
|||
All settings are stored in [[Cumulus.ini]], so when you stop and restart MX, it can continue without you entering settings again. |
|||
=== What encoding does my web page use?=== |
|||
Put simply, most modern web pages start with this: |
|||
<pre> |
|||
<!DOCTYPE html> |
|||
<!-- the above must be on the first line by itself and tells the browser that HTML 5 applies --> |
|||
<html lang="en"><!-- modify this to indicate your language --> |
|||
<head> |
|||
<meta charset="UTF-8"><!-- assigns the recommended standard encoding that copes with all international characters --> |
|||
... |
|||
</pre> |
|||
The last line shown there is critical, it indicates that the web page uses "utf-8" encoding. |
|||
You will find that all standard web templates included with MX start as shown above. For Cumulus 1, from build 1094 up the various builds defined for final release, the above code is used. However for earlier builds of Cumulus 1, the standard web pages start as follows: |
|||
<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /></pre> |
|||
The last line there shows how the original web templates (designed by Beth Loft) used the ISO 8859-1 character set. Consequently, the original NOAA reports used ISO-8859-1 encoding and for compatibility with this original setting, the default encoding for NOAA reports is unchanged despite the mismatch with web pages, because Cumulus 1 does not contain any web page to display NOAA reports. |
|||
Adjusting the majority of the settings is best done using these MX "admin interface" screens simply because for some settings the interface does validation (whilst editing the file directly could introduce invalid settings), you will see that '''Settings''' is the penultimate option in the navigation bar, and it has a drop down for the various settings screens that are now described. [[File:Settings Menu.png|right]] |
|||
===How does MX complicate encodings?=== |
|||
MX complicates the issue, the admin interface does include a web page for displaying reports, (/CumulusMX/interface/noaayearreport.html). This web page includes <tt><meta charset="utf-8"></tt>, but the defaults prior to using the web page for editing NOAA settings (/CumulusMX/interface/noaasettings.html) include not using "utf-8" building in an inconsistency because there is nothing in the hints on that page to help you select reasonable settings! |
|||
*For most screens a HTML form element is used for editing, its content is determined by one JSON file, the allowed settings are fixed by a second JSON file, and there is a '''Save''' button to send the contents of that form for processing. |
|||
===Consistency for encoding=== |
|||
*That Save button must be clicked (and an acknowledgement displayed that the form processing has completed) before the edited settings are accepted by MX. |
|||
To add just a little more detail here, if you choose to implement a web page to display these Cumulus reports, then the HTML of the web page to display the report, the JavaScript that selects which report to show, and inserts the report into the HTML, and the report itself '''must all use the same encoding''', otherwise you will not get characters like ° displaying correctly. |
|||
**Note that some settings take immediate effect, some settings are only read when MX starts, so it may be necessary to stop and restart MX to ensure your new settings take effect |
|||
*To make it easy to change settings, such setting screens uses tick boxes, radio buttons, and drop down selection boxes, so the choices available are clearly laid out. |
|||
*These form based MX settings screens do some validation, and if you make an error detected by the validation, the contents change to a red colour (red text and red boxes), that means invalid data is present which must be corrected before the form can be sent by pressing '''Save''' button. |
|||
**Generally, a whole section goes red, not just the item at fault (as determined by JSON file specifying valid options) |
|||
**One, or more, items on the page will have an error message added by the form processing in those validation fail cases, indicating porecisely which item(s) need(s) to be corrected. |
|||
If you attempt to set these settings by directly editing the file where they are stored, there is a danger of either making a typo or of choosing an illegal value for a particular attribute. |
|||
===When did Cumulus 1 change?=== |
|||
In April 2014, Steve introduced the choice in Cumulus 1 of either ISO-8859-1 encoding (as he used originally) or UTF-8 encoding (what he migrated his web page templates to) for these reports. For backwards compliance, the default selected by Steve Loft is his original ISO-8859-1 encoding, but his recommendation strongly expressed was that users should switch to UTF-8. This choice with the former as default, but the latter as recommended, remains unchanged in MX. The encoding for NOAA reports can be selected on the NOAA Settings screen of either Cumulus 1 or MX, and you are as Steve says strongly advised to reverse the setting. |
|||
There are however some '''read only''' settings that can not be found in any of the setting screens, for these MX cannot set the values, it can only read them. As MX cannot set the values, you need to edit the [[Cumulus.ini]] file directly, and the referenced Wiki page identifies read-only settings that can only be adjusted by adding parameters directly in the file. The configuration article lists the read-write settings as well, and tells you what values are accepted for those attributes, and also explains some of the differences in the settings available between Cumulus 1 and MX. |
|||
===Relevance to Extra Web Files=== |
|||
Before I go into any more technical detail, this same advice of selecting "UTF-8" applies to any choices on the '''Extra web files''' in MX (or Files tab of internet settings in Cumulus 1). |
|||
===TECHNICAL BIT=== |
|||
'''With that introduction, you can now choose whether to read the rest of this section which uses more technical terminology.''' |
|||
''Let me explain that technical term, essentially encoding refers to the character set used by any file''. |
|||
A computer uses binary, binary can only be in state 0 or state 1, so a combination of 0 and 1 states needs to be defined for every character you want to represent. What you can include in that character set depends to some extent on how many binary bits are used to be mapped to individual characters; and if more than one byte worth of bits is used the order in which the bits within the multiple bytes are used must be defined for each particular encoding. |
|||
With any fixed number of bits available, there will be a limit to how many characters can be defined, and different organisations might select different characters to include. This is what leads to multiple encoding standards. One might use a particular arrangement of bits to represent the degree symbol, while another encoding uses that particular arrangement of bits for a different purpose. The general problem is that unless you match the encoding used initially, any retrieval cannot know what character to display for certain combinations of bits. |
|||
This means that when you read a file you probably find the letters A to Z where you expect them, but whether you see correct case cannot be guaranteed. Some encodings put capital letters at lower binary values than lower case letters, and some put capitals at higher binary values. |
|||
If you use 7 bits, you have 127 combinations, enough for standard 26 letters in both capitals, and lower case, plus 10 digits (0 to 9), some punctuation, and some control characters (like new line, end of file, and so on). If you use 8 bits, a whole byte, you have 254 combinations, and you can start coping with accented letters, with alphabets that don't have 26 letters, and even add some symbols. Obviously, once you start using more than one byte, you can have 16, 32, 64, or even more bits to use and can include lots more characters and the bigger character sets start including lots of symbols and the biggest add smilies or emotion icons. |
|||
'''Note that if you change settings''', that '''some''' settings do not take effect while MX is running, while other settings do take effect instantly (The developer has not provided a list anywhere of which settings do, and which do not, take effect immediently, although sometimes a release notice mentions this for a new setting) - anyway, you ''may'' need to restart Cumulus MX to get the new setting picked up. When you exit MX, it saves the read-write settings in [[Cumulus.ini]], and when you restart it it uses the read-only, and read-write, settings it reads from that file. |
|||
Remember, most modern web pages (including the standard web templates provided with both flavours of Cumulus) use UTF-8 encoding. The only problem is MX not defaulting to this for NOAA reports. |
|||
== The format used for naming reports== |
|||
=== Station Settings === |
|||
The monthly reports have a name in this format '''"NOAAMO"...".txt"'''. The yearly reports have a name in this format '''"NOAAYR"...".txt"'''. This format with 4 double quotes in all cases is used both in the NOAA settings screen and in the [[Cumulus.ini#Section:_NOAA|[NOAA] section of Cumulus.ini]]. |
|||
Each setting has a hint beside it (with a small 'i' for information before each hint). If you have used [[Cumulus_Screenshots#Station|Cumulus 1]], the layout and section headings will be familiar. No settings takes effect until '''Save''' button pressed. |
|||
It is between the double quotes where I have placed '...' that Cumulus expects us to use the date output modifiers described. Note that the double quotes must be used at each of the places where they are shown when you define your report naming in the NOAA Settings screen of either Cumulus 1 or MX. The default selected by Steve Loft is '''MMyyyy''' and '''yyyy''' respectively (expressed in a way that suits both Cumulus 1 and MX) so the inserted part is all numerical. Here is a table showing the main alternative options, for more details about these selectors see the [[Webtags#List_of_allowed_modifiers|table below]] as there are obviously a lot more options. |
|||
Like all the settings pages, there are headings with settings below them that are collapsed so click headings to see the items under them. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | {{Version badge 1}}Delphi Specifier for Cumulus 1.9.x |
|||
!style="width:150px" | [[File:Badge vMx.png]]Mono Specifier for Cumulus MX |
|||
!style="width:600px" | Explanation |
|||
!style="width:150px" | Setting to use that suits both flavours |
|||
!style="width:600px" | Example of produced name |
|||
|- |
|||
|colspan="5" style="background:lightgray;"|Yearly report |
|||
|- |
|||
|YYYY or yyyy |
|||
|yyyy |
|||
|Note that Cumulus 1 accepts lower or upper case, this is the default mentioned above |
|||
|"NOAAYR"yyyy".txt" |
|||
|NOAAYR2010.txt |
|||
|- |
|||
|YY or yy |
|||
|yy |
|||
|Note that Cumulus 1 accepts lower or upper case, this represents a 2 digit year number alternative format |
|||
|"NOAAYR"yy".txt" |
|||
|NOAAYR10.txt |
|||
|- |
|||
|colspan="5" style="background:lightgray;"|Monthly report |
|||
|- |
|||
|mmyyyy (or MMYYYY) |
|||
|MMyyyy |
|||
|Note that Cumulus 1 accepts lower or upper case, these are equivalent to default mentioned above, so this is most common for users who first encounter with Cumulus is with MX flavour |
|||
|"NOAAMO"MMyyyy".txt" |
|||
|NOAAMO032010.txt |
|||
|- |
|||
|mmyy (or MMyy or mmYY or MMYY) |
|||
|MMyy |
|||
|Note that Cumulus 1 accepts lower or upper case, this represents a 2 digit year number alternative format, this was the format frequently selected by Cumulus 1 users as it keeps file names as short as possible |
|||
|"NOAAMO"MMyy".txt" |
|||
|NOAAMO0310.txt |
|||
|- |
|||
|yyyy-mm (or YYYY-MM) |
|||
|yyyy-MM |
|||
||Note that Cumulus 1 accepts lower or upper case, this naming format is popular as it results in files being in chronological sequence when listed by file name |
|||
|"NOAAMO"yyyy-MM".txt" |
|||
|NOAAM2010-03.txt |
|||
|- |
|||
|MMMyyyy |
|||
|MMMyyyy |
|||
|Note that Cumulus 1 accepts lower or upper case, this represents an informative naming format using 3 letter month name as defined for your locale on your device, in '''.NET''' or in '''MONO''' so it is used by those who want to quickly spot which report they want to look at. |
|||
|"NOAAMO"MMMyyyy".txt" |
|||
|NOAAMOMar2010.txt (for English locales) |
|||
|} |
|||
The table [[Cumulus.ini#Section:_Station|here for the [Station] section]] will explain how MX stores the selections you make here, and give a bit more detail about each item and the values it can take. |
|||
If you migrate from Cumulus 1 (where case does not matter) to Cumulus MX (where case does matter), from version 3.3.0 onwards the NOAA default monthly name if it reads "NOAAMO'mmyy'.txt" (MX believes "mm" '''means minutes''', not month) is changed into "NOAAMO'MMyy'.txt" (which works on both Cumulus 1 and MX). |
|||
Please note that, in the '''Options''' section, there are two settings that take effect immediately '''Save''' is pressed, but are not written to '''Cumulus.ini''' when MX is closed, so will be reset when MX is restarted; these two exceptions are to use '''Debugging logging''' and to use '''Data Logging'''. The first adds extra output to the log file created in "CumulusMX/MXDiags" folder reporting in detail each output task MX does. The second adds extra output to the log file created in "CumulusMX/MXDiags" folder reporting in detail each input received from the weather station. |
|||
= Template Files = |
|||
==== Station Type ==== |
|||
This is the name given by Steve Loft to any files that contain web tags and need to be processed before they actually include values. |
|||
Select the one that matches your weather station. If you are unsure, look at [[Supported Devices]] article because it explains how alternative brands are mapped to particular generic types. |
|||
When Cumulus processes these files it generates output files where the tags/tokens have been replaced by values. Consequently, a single template will actually generate a different file each time Cumulus processes that template because the part of the content that was web tags is now populated with text (values, times, dates, etc.) and as these values change that make the file different to the previous generated file. |
|||
==== Units ==== |
|||
For standard Cumulus, all the output files are web pages which it then uploads to your web site. There is more about processing of files on the [[Customised templates]] page, but think of a template as containing text that Cumulus copies from the template file to the web page it is constructing. The processing process is basically a parse, each time it finds what MX calls a token (a web tag complete with any parameters it needs) it looks up the value that it will use to replace that web tag before moving on through the text. |
|||
The example web templates provided by Cumulus insert a "T" at the end of the intended web page name before the extension (.htm or .html), so that the template files and generated web pages cannot be confused. The generated file will often have "tmp" added to the end |
|||
Steve Loft designed Cumulus 2, so the units you selected effected how a value was shown, but not how the value was stored. Consequently in Cumulus 2, you could change units at any time easily. |
|||
When writing your own templates, some people will stick to this "T" notation, others will change the extension to "tmpl" or "cum" to indicate they are Cumulus templates. Cumulus does not care what extension is used for any local file specified in the MX '''Extra Web Files''' settings or Cumulus 1 '''Files''' tab settings. |
|||
Cumulus 3 (MX) reverts to the approach used by Cumulus 1, the units you choose in the settings determine how values are stored, therefore you choose units when you first start MX and don't change them again (unless you are prepared to edit all the existing values in log files, including all the extreme records). |
|||
For Cumulus 1 and MX, there are one template held within the program code, this is what produces the default [[Realtime.txt]]. You can define an alternative template with web tags and Cumulus can process that instead of its default template. |
|||
So for Cumulus MX, it does not matter what units the weather station uses, every reading is converted to units you select here, and generally every thing Cumulus does is based on those units. There is one exception, which only affects those users in USA; internally Cumulus uses Celsius for most calculations, if you have requested Fahrenheit, MX does a conversion from its internal values when writing entries in log files, web tags, and NOAA reports; that means if the weather station outputs in Fahrenheit, there is one conversion on reading the station, and a second conversion on output. |
|||
For MX only, there are other templates held within the program code (so you cannot edit them), these output in json format. Some are application program interface, and feed information to the admin interface, you can only view these by using the development interface in your browser that lets you see what has been loaded. The rest become the json files that are created in the '''web''' folder from where (like the web pages produced after processing the standard web templates), they can be uploaded to your web site. |
|||
==== Davis Connection ==== |
|||
= Web tags available in Cumulus = |
|||
As you will guess, here is where you enter settings for how Cumulus interacts with your Davis station, see hints by selections. |
|||
Those special markers in the file are called web tags, during processing Cumulus will replace them with the actual values. Typically you would use this to build your own website by having an HTML template file with your layout, static text and graphics. In the position on the page you wish Cumulus to insert the relevant data place a web tag in the form (briefly mentioned earlier in this page): |
|||
==== Davis WeatherLink Live ==== |
|||
<pre><#tag_name [optional input parameters][optional output parameters]></pre> |
|||
There are several sub-sections, see hints by inputs. |
|||
''Note: When you put a tag into your template, be careful that whatever program you are using to develop your web pages doesn't change the angle brackets to slightly different symbols -- this is a common cause of failure!'' There are a number of editing tools that are '''designed for editing programming code''' and you should use one of those (e.g. Notepad++, Brackets, NoteTab Light, HTML kit, amongst many others), ''rather than a tool designed for web page design editing'' (e.g. Dreamweaver, word press, amongst others). |
|||
== |
==== Ecowitt GW1000 Settings ==== |
||
For equivalent brands please see [[Supported Devices]]. See hints by selections. |
|||
{{Version badge 1}}The [[BETA webtags|additional webtags]] page was created to hold web tags that were not yet available in any Cumulus 1 formal release, but were available in any Beta version that was under development. |
|||
==== Log interval ==== |
|||
[[File:Badge vMx.png]]When development of Cumulus 1 ceased, Cumulus MX was available as a beta. At that time, this article continued to describe web tags available in the final release of Cumulus 1 (builds 1099, 1100, 1101, 1099.1, and 1099.2). Because the output parameters were different for MX, all the MX web tag information was in [[BETA webtags|beta web tags]] article. That was fine in early beta versions of MX because they supported only a small subset of the web tags available for Cumulus 1. |
|||
This is '''interval''' time (selected from a drop-down), i.e. the interval between one MX log of current values in the [[Standard log files]] and the [[Extra Sensor Files]] and the next entry in those logs. |
|||
*A ''shorter'' time interval here has advantage of a greater chance of logging daily maximum and minimum values, but leads to bigger files. Because the log only records spot values (not, as one Cumulus 1 enhancement requested, maximum and minimum since last log entry, which is the approach taken by one of Cumulus's software rivals) there remains a good chance of missing the extremes when logging. |
|||
*Conversely, choosing a ''longer'' time here increases that probability of missing extremes, but reduces the storage needs on the device running MX. |
|||
*For station types that don't have a separate logger, when MX is not running no weather data is captured, so the standard and extra sensor logs will only cover times when MX is running. |
|||
*If the weather station you use has a separate logger, setting the log interval here to match the interval used by the separate logger means that on restarting MX when it reads '''archive data''' during catch-up it will store spot values at the same interval whether storing archive or live data |
|||
**If the station logger interval and this log interval are set to same, then entries in the log files will be at same interval when MX is running and when the Cumulus log entries are populated from station log entries. If they disagree, the Cumulus log will store lines at the station logging interval during reading archive on restart and at the interval set here when MX is running normally; you might not want your Cumulus logs to have an inconsistent interval. |
|||
**The normal reason for disagreement between the MX interval and separate logger interval is when MX may be stopped for long periods; most separate loggers are cyclic, they overwrite older entries, so the interval for the separate logger is selected long enough to avoid any chance of over-writing during the period when MX is not running; whilst the MX interval is set short enough to maximise the number of spot readings stored. |
|||
**When MX is restarted and reads archived readings, Davis stations, in particular, can struggle to do a correct catch-up if the intervals do not match; with Davis stations MX can be forced to download every log in the logger and thus be stuck in reading archive stage for a long time. |
|||
*Calculations like average temperature (calculated by summing all processed measurements and dividing by number of samples) and wind run (calculated by summing all wind speeds and dividing by sum of all intervals between processed measurements) are biased if there is an inconsistency in interval between measurements being processed by MX. If you don't run MX all the time, it can only process what is in the station logger for the times when MX is not running. An average will be skewed (and so not an accurate average) if some of the inputs to that average are based on rapid sampling while MX is running, and some of the inputs taken from infrequent logs when MX is not running. |
|||
===== Davis users ===== |
|||
However, as MX development continued more and more web tags were available and maintaining two articles, one for each flavour of Cumulus was impossible. Therefore, MX users had to look at two pages, some of their web tags were in this article some were in that article. Confusingly, some web tags were in both articles, because the parameters that could be used with those tags were increased in MX, so the additional parameters were only shown in the beta article, an example was when the moon web tags had parameters added to control the output from build 3047, these were added to the Beta article. |
|||
From version 3.7.0 if you use a Davis station, a warning will be output if the log interval set here does not match the Davis logger interval. The developer says: |
|||
When Mark Crossley brought MX out of Beta, all the web tags that were on that page were moved into this article, and it was made clear which flavours each web tag was available in (excluding Cumulus 2). |
|||
<pre>This is just a warning. Its best to keep the logger intervals the same to avoid excessively long start-ups, but it isn't mandatory. |
|||
I have put the warning in because lots of people aren't aware they have the issue. |
|||
The developer of MX new releases normally shares a new version of MX first as beta by sending the distribution in an email to a number of Cumulus users. They respond by email, with the intension any issues can be ironed out before the distribution is made available as a public release. Given the number of weather station types supported and the complexity of options for using Cumulus, this does not always ensure all ways in which MX can be used are tested, especially as the Cumulus Users given the beta test zip might not use all the features that have been modified in a particular development. |
|||
Some people may choose to run with a MX interval of say 5 minutes and a station logger of 30 minutes because they say need to cope with extended offline periods. That is a conscious decision though, and they can ignore the warning.</pre> |
|||
Although such releases often add additional web tags, any additional web tags are currently being entered into this article and no new MX web tags had been added to beta article since that move of the earlier ones into this article. |
|||
To change the logging interval on a Davis to match the Cumulus logging interval: |
|||
== Case sensitivity == |
|||
*You can use the '''WeatherLink''' software if you have it, |
|||
*or use a terminal emulator connected to the logger and use the "'''SETPER xx'''" command where xx is the log interval in minutes. |
|||
==== Log rollover ==== |
|||
The tag_name in the general format above is case sensitive, so please type the tag name exactly as shown in the web tag columns in the tables below. |
|||
Cumulus 1 was originally designed to allow you to match meteorological practice of rollover at 9 am in winter and 10 am in summer (so all days are exactly 24 hours long even when clocks change), but other options can be set. |
|||
The optional input parameters always use lower case, so please type them exactly as shown in the sections dealing with input parameters. |
|||
Cumulus 2 worked on UTC, so the rollover functionality was different. |
|||
The optional output parameters are case insensitive when used in Cumulus 1. But for Cumulus 2 and later, so this includes MX, the output parameters are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully. |
|||
Cumulus MX operates on the time provided by the device it is running on, it offers a choice between midnight rollover, 9 a.m. rollover, and 9 a.m. rollover adjusted when daylight saving time is reported by the device. Only the last of the 3 options (or no DST) ensures all days are 24 hours long, the other options will have a day of 23 or 25 hours when clocks change (DST starts or ends). |
|||
==Inconsistency of web tag names== |
|||
==== Location ==== |
|||
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 great inconsistency in the naming, gives rise to a problem as it very easy to spell a tag_name incorrectly as you naturally expect there to be a standard pattern. |
|||
In this section enter: |
|||
You will find yourself frequently having to refer to this article, if you decide to make your own Cumulus templates (see section below for more information). This applies whether those templates are for [[Customised templates|web pages]], to implement [[Xml webtags|Extensible Mark-up Language files]], or [[Php webtags|PHP Hypertext Pre-processor scripts]]. |
|||
#Latitude |
|||
#Longitude |
|||
#* The above two are entered as degrees, minutes, and seconds, as this is most accurate way to specify an angular position (internally MX uses decimal degrees with 18 decimal places as 17 of those are needed for one arc second) |
|||
#* You may need to look these up, don't forget there are 3 numbers (degree, minute, second) and a hemisphere option to select correctly for each |
|||
#* The longitude and latitude must be right to get sun rise/set calculated correctly. |
|||
#Altitude (not used in standard Cumulus functionality, but must be right if you send an alternative pressure reading to an external site) |
|||
#Name |
|||
#Description |
|||
#*The name and description are combined with other fixed words on the standard web pages, so must work in that context, and you are advised to look at the generated web page at CumulusMX/web/index.htm to check your choices work with those added words. |
|||
People often struggle with these settings. However, these are not settings you have to get right first time, so a mistake is a learning experience. |
|||
When Steve Loft introduced the first web tags as part of developing software for his own use, he did not create a naming standard to ensure consistency in the future. As he introduced further web tags at different times, the names used might be consistent amongst the ones introduced that day, but there was still no naming convention to ensure consistency with tags introduced previously or to help name future tags. |
|||
==== Options ==== |
|||
===Inconsistency for today, yesterday, this month, this year groups=== |
|||
You will probably find it hard to find this section as it is some way down on the Station settings web page, but it is '''an important set of settings'''. |
|||
It would be easier if all tags reporting parameters for today were consistent, let alone consistency in naming between tags for today and yesterday. The tags for this year and this month were introduced in same release, so there is some consistency in how they were named then, but no standard to ensure future tags for this month and this year would be named the same way. |
|||
Some settings offer choice from just two options as summarised in the table. The other Options settings are described below table. |
|||
===Inconsistency in use of "Y"=== |
|||
*The character "Y" might be included in a web tag to denote '''yesterday''', or it might denote ''this year'' |
|||
*Where the Y is indicating '''yesterday''', it is sometimes a ''prefix'', sometimes a ''suffix''! |
|||
===Inconsistency in use of "T"=== |
|||
*The newer web tags for '''today''' include a "T" as a suffix, the older ones do not. |
|||
**The lack of a "T" in some today tags causes some confusion with all-time record tags as they have a similar naming structure to these older today web tags. |
|||
**This is particularly confusing and is why you must look up today, and all-time, tags in the tables in this article. |
|||
*The time-stamp tags add a "T" to the corresponding web tag for the value, but in an inconsistent way: |
|||
**the T is a prefix sometimes and |
|||
**the T is a suffix sometimes |
|||
**This is particularly confusing and is why you must look up time-stamp tags in the tables in this article. |
|||
===Choosing script variable names derived from tag names=== |
|||
In the web tag to PHP variable scripts, I have posted, see [[Php_webtags#Minimised_Upload_size]], I have tried to introduce better consistency in the PHP variable names, so "T" is added as a suffix to all "today" variables for example. Some other script authors try to match the inconsistent web tag names, so their script variable names are also inconsistent. |
|||
== Optional Parameters == |
|||
=== Input modification Parameters === |
|||
Most web tags do not require any input parameters. An input parameter is used where the same web tag can represent a value for a number of different past time instants. Each of those past time instants is represented by a different value for the input parameter. So a combination of web tag name and input parameter lets Cumulus to pick the value you want to see. |
|||
There are currently only two types of tags where an input parameter is mandatory: |
|||
*The '''recent history tags''' where a separate value exists for potentially every [[#Recent_History|individual minute in last week]]. These tags need an input parameter specifying how many minutes ago is required. To save entering a very large number for minutes, an input parameter can combine days, hours, and minutes, ago using up to 3 input parameters as explained in linked section. |
|||
*The [[#Monthly_All_Time_Records]] where a separate one exists for each particular month (of any year) need input parameter specifying which month. Again see the respective section for full details of input parameter (which is 1 for January to 12 for December, but 0 is also available with a special meaning). |
|||
=== Output modification parameters === |
|||
These are complex, they vary between Cumulus 1 and later flavours, and what output modifiers can be used varies between web tags. |
|||
Consequently, output modifiers will be discussed in a later section headed [[#Output_.27format.27_Parameter]]. |
|||
The options available include: |
|||
* changing date and/or time format, |
|||
* changing number of decimal places, and |
|||
* removing decimal commas. |
|||
== Cumulus Templates == |
|||
=== Using web tags in templates for creating HTML pages === |
|||
*You can create a template file that has a structure of HTML elements with Cumulus web tags to represent the information you want included. |
|||
*If you [[Customised_templates#What_to_select_on_the_.27Files.27_tab_of_the_Internet_Settings_screen_within_the_.27Configuration.27_menu|ask Cumulus to process]] that template file, it will create a HTML page from the template, and during that file creation replace the tag with the current value of the item the tag represents. |
|||
*You also need to tell Cumulus that the resulting HTML file is to be uploaded to the internet (or copied to a local web server). |
|||
=== Using web tags in scripts === |
|||
*You can also use the tags within script, this might be a PHP script, or JavaScript either embedded in HTML, or in external files, to transfer the values (or the result of calculations based on those values) to your web server for further processing. |
|||
*As JavaScript can not understand a real number that has the integer and decimal parts separated by a comma, but your computer may be set to use that representation in standard tags, there are special versions of many tags to use in script - see [[#No_Commas|tags with commas removed]] section. |
|||
*Note that if a PHP or JavaScript file contains any Cumulus web tags then you must [[Customised_templates#What_to_select_on_the_.27Files.27_tab_of_the_Internet_Settings_screen_within_the_.27Configuration.27_menu|ask Cumulus to process]] the script file. |
|||
*JavaScript processing code can be embedded in a template that is already being processed into HTML. (This technique has been used in the standard 'monthlyrecordT.htm' template). |
|||
*Alternatively embed a bit of JavaScript assignment code in HTML, that is already been processed, to convert the tags to a collection of string variables and use those variable names in any external script called from the HTML file. (This technique has been used in the standard 'gaugesT.htm' template). |
|||
*To use the value from a tag as an integer in JavaScript assigning code you need to use a |
|||
<pre>integer_variable_name=parseInt(string_variable_name,10)</pre> type conversion |
|||
*To use a value from a tag as a floating point number in JavaScript you need to use <pre>parseFloat(string_variable_name)</pre> otherwise you will find any attempt to add something to it results in a concatenation because JavaScript uses "+" for two purposes and concatenation takes precedence over arithmetic adding! |
|||
*Alternatively, in most script languages, apply ' * 1', i.e. multiply by one, to implicitly convert the tag from string to base 10 number. |
|||
*Another alternative is to add zero when a web tag is being assigned to a script variable, this is frequently used in scripts where the web tag being used is not available in all versions of Cumulus, because Cumulus does not implement the concept of null values and often zero is used when a true value is not available because that sensor is not installed for example. Adding 0 means that if the web tag is not recognised, the script is still able to give a variable in its language some value and won't fail because that variable is undefined. If the web tag is available, adding zero does not prevent the true value of that web tag being assigned to the variable. |
|||
== Web Tag Differences Between Cumulus 1 and MX builds == |
|||
{{Version badge 1}} |
|||
This badge is used when the web tags listed in one of the tables are available in the final 1.9.4 release of Cumulus 1, but not in MX. When Cumulus 1 is processing web tags, it tends to ignore any it cannot understand, so look for gaps in your web pages to find errors. |
|||
[[File:Badge vMx.png]] |
|||
Cumulus MX provides many, but not all web tags that were available in Cumulus 1. MX adds many more web tags, mostly in support of new weather stations or new sensors. This badge is used against web tags listed in one of the tables that are only available in MX. See [[#GENERAL_TIP|tip]] at top of page for how to check which web tags are available in your build. |
|||
A combination of badges appears where certain aspects apply to Cumulus 1 or to MX. No information is given for Cumulus 2 as it is no longer available. |
|||
When MX is processing web tags and finds one it cannot understand, a "*** web tag error - see MXdiags file ***" message will appear in the engine console, and the diagnostic file will include something like this, be aware a "token" parser is used to evaluate web tags: |
|||
<pre>Web tag error |
|||
Exception: i=8998 len=106297 |
|||
inputText.Length=106297 |
|||
token=<#daylightlength format=H></pre> |
|||
This particular error is that when you use a single output format character it does not have same meaning as when there are multiple characters, correct this particular web tag to: |
|||
<pre><#daylightlength format=%H></pre> |
|||
Please note that where this article makes reference to other pages in the Wiki, the information shown there might be specific to Cumulus 1, as there are differences between the user interface for Cumulus 1 and MX flavours of this software, and the Wiki was originally written before MX existed, so not all pages have been updated. |
|||
=Output 'format' Parameter= |
|||
The majority, but not all, of web tags either can use an output format parameter or, in a few cases, really do need an output format parameter. |
|||
== Output Parameter Differences between Cumulus 1 and Cumulus MX (Cumulus 3) == |
|||
There are a number of differences between Cumulus 1 (C1) and Cumulus MX (MX). These nearly all involve times and dates, so the next section deals with this. |
|||
=== Output (format modifier) parameters for times and dates === |
|||
Time/Date format codes are used in two places: |
|||
# As part of report names for NOAA style reports (see [[Cumulus.ini#Section:_NOAA]]) |
|||
# As part of web-tags that report either times or dates or both a date and a time |
|||
From version 1.9.1 most web-tags that report any form of time or date will accept an optional 'format' parameter, e.g. (Cumulus 1 only): <#YearTempHT format=hh:nn>. |
|||
This allows you to override the default display format for that item, using the format specifiers in the table below. |
|||
Although, in theory, you can specify date formatting to times, and vice versa, this will not always yield a sensible result. It is best to look at the default format (in most, but not all, cases this reveals whether date and time information are both available): |
|||
*The time-stamps for today, and yesterday, only contain time information, so only time-based format instructions should be applied to them. You can use date format parameters on (for example) <#metdate>, and <#metdateyesterday> and that may give you your desired date information to augment the time-stamps. |
|||
*Almanac times such as sun-rise, moon-rise, are also only times, and time-based format instructions can generally be applied to them. However, be aware these are calculated as at midnight GMT and for some of your calendar days, the times may be reported (in default format) as '--' if for example the moon does not rise that day. |
|||
C1 can work with times in 14.24 format using a full stop ('.') to separate the figures, MX must have colon (':') between hour and minute numbers. But with both flavours you can choose whether 12-hour clock is used with am/pm (in lowercase or capitals) or the 24-hour clock is used. You can choose to include/exclude leading zero for hours. You can only report the hour if you don't care about the minutes, or only report the minutes if you don't need the hour. In most cases you can add seconds to the output, and either milliseconds or microseconds. This does not imply that Cumulus calculates everything every microsecond, in fact many are only calculated once a minute, but the flexibility is there for time outputs. |
|||
Some web tags contain dates, or both dates and times, and for these there is flexibility (apart from those with fixed format, these might have ISO, or another format indicator, in their tag name) as to how the date is output. Thus you can choose to include or exclude the year; you can represent month in letters or numbers, and you can vary the order in which elements of the date are shown. |
|||
The characters used to represent year, month, day, hour, minute, second, microsecond, do differ between C1 and MX. In Cumulus 1 we are able to use "m" or "M" for two different meanings (minutes or month) depending on context. Similarly, in MX the same character sometimes has two different meanings depending on context, but this applies to lots of characters and the context is whether the character is used on its own or with other characters. '''Sounds confusing?''' Well it is complicated. |
|||
==== Explanation ==== |
|||
*Cumulus MX (when running on Windows) uses the '''.NET''' software. |
|||
*If Cumulus MX is running on Linux or Mac OS X, or any other device that uses UNIX derived operating system, then it uses '''Mono''' software for same purposes. (MONO is a operating system independent version of .NET, although they are developed independently, they have common origins). Please see the [[Cumulus MX]] article for more details of their differences and what will change in November 2020. |
|||
*The date and time format characters in Mono (and .NET) software framework are not exactly the same as the '''Delphi''' software framework ones that Cumulus 1 uses. |
|||
*For Cumulus MX there are standard format codes (single characters) and custom format codes (combinations of characters, or single characters prefixed by %) |
|||
**The standard characters for dates and times are defined at [https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings standard-date-and-time-format-strings] |
|||
**The custom characters for dates and times are defined at [https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings custom-date-and-time-format-strings] |
|||
*In Cumulus MX the same character can have 4 different meanings depending on its case (capital letter or lower-case letter) and depending on whether it is on its own or not |
|||
**The case differences come about because Delphi is case-insensitive, while .NET and MONO are case sensitive. Consequently, .NET (and MONO) can use upper and lower case for different items, but Delphi has to use different letters, ignoring case, for each item. |
|||
==== When it causes problems ==== |
|||
This can cause problems when somebody moves from using Cumulus 1 (C1) to using MX. They need to revisit any templates or scripts where they use output modifiers to specify a date and/or time format. We have already explored a very simple impact of this for [[Webtags#The_format_used_for_naming|NOAA report naming]]. There we were only concerned about how to represent a month. |
|||
For web tags it is much more complicated, simply because it is not just month we may be representing, and we might require only one specifier (being careful whether we use a standard or custom modifier) or we might want to specify a combination of modifiers (and we might want to add a space character or other literals). It is difficult to summarise, but here are some potential issues: |
|||
* the reserved characters change between C1 and MX (affecting use of literals like "on" and "at" which are commonly required) |
|||
* MX introduces the concept of escaping characters |
|||
* in MX space in some cases may need to be within the single quotes containing other literals (as space can modify the interpretation of a modifier character). |
|||
'''Confused even more now?''' I'm not surprised, but maybe some examples will help before we actually list the available modifiers. |
|||
==== Examples ==== |
|||
*Examples related to case selection |
|||
*#[[File:badge v1.png]] In Delphi, "nn" means "minutes" for Cumulus 1, [[File:Badge vMx.png]]but "minutes" is "mm" for .NET or MONO in Cumulus MX. |
|||
*# The hour in 24-hour format with leading zero, in non case sensitive Delphi (Cumulus 1) 'HH' or 'hh' would be treated as same, but in .NET or MONO it must be "HH" (Cumulus MX). |
|||
*# The hour in 24-hour format without leading zero, in non case sensitive Delphi (Cumulus 1) 'H' or 'h' would be treated as same, but in .NET or MONO it must be "%H" (Cumulus MX). |
|||
*# For 12-hour specifiers, please see the table, as this is far more complicated. |
|||
*[[File:Badge vMx.png]]You might be put off by references within .NET and MONO (Cumulus MX) to single/standard characters and custom modifiers, the following 3 examples may add clarity: |
|||
*#For example, ''<#MonthTempHD format="d">'' is a single character format modifier, therefore the 'd' acts as a standard modifier, and causes for a date of 22 July 2014 for the highest temperature in the month to be returned in the standard short date format e.g. '22/07/2014' (exact contents for any one date vary by locale). |
|||
*#Similarly, ''<#MonthTempHD format="M">'' is a single character format modifier and therefore the 'M' acts as a standard modifier and causes the date for the highest temperature in the month to be returned in the standard day and month format e.g. '22 July' (exact contents for any one date vary by locale). |
|||
*#Whilst ''<#metdate format="d M">'' is not a single character format modifier and therefore both the 'd' and the 'M' are interpreted as custom modifiers and cause the current date to be returned as a digit(s) for the day and a digit(s) month (in a without leading zeroes format) e.g. '6 7' would be returned for 6 July. |
|||
*#Alternatively, ''<#MonthTempHD format="%d">'' is NOT a single character format modifier, therefore the 'd' acts as a custom modifier, and causes a date of 22 July 2014 for the highest temperature in the month to be returned as the day of the month only '22' in all locales. |
|||
*#Similarly, ''<#MonthTempHD format="%M">'' is NOT a single character format modifier and therefore the 'M' acts as a custom modifier and causes the same date for the highest temperature in the month to be returned as the month number '7'. |
|||
In both Cumulus 1 and MX if you want a space character within your output, the output specifiers must be enclosed in double quotes. If that space character is next to a non modifier (e.g. around word "at") then the single quote needing to surround the at should be widened to include the spaces in MX, but Cumulus 1 does not care if single quotes excluded spaces. However, with MX, single quotes enclose multiple characters, but there is an alternative way to deal with some single verbatim characters to cover next. |
|||
So let us compare these two alternative ways that MONO and .NET escape any characters that are not being used as format specifiers. |
|||
* In [[File:badge v1.png]]Delphi you can put the 'verbatim' characters inside single quotes (Cumulus 1); this is often used to (in English) include words like ' on ' and ' at ' in the formatted output. |
|||
*in [[File:Badge vMx.png]].NET or MONO you can still use single quotes (as mentioned above extended to include adjacent spaces), |
|||
** but alternatively you can escape each verbatim character with a backslash as prefix (Cumulus MX). |
|||
* You may need to use both single quotes and back slashes in some format specifiers, depending whether the characters you want to include can be interpreted as control characters (yes, backslash is also used to escape control characters, so backslash will NOT work for some characters such as those in "on" and "at" [\n will produce new line not the letter n, \t will produce a tab not the letter t]), consequently for some characters you must use the literal approach to include them in your format. |
|||
=== List of allowed modifiers for output format parameters === |
|||
Note for Cumulus 1 - where lower (or upper, for easier comparison with MX) case shown, because Delphi is case insensitive, upper (or lower) case (in some cases, indicated by use of curved brackets) could be used instead (exceptions: a/p, ampm, am/pm, Am/Pm, AM/PM, A/P, AMPM etc display as input). |
|||
[[File:Badge vMx.png]]Remember that most single character format specifiers have a different meaning to when the same letter appears in a multi-character format. The '''%''' shown in front of nearly every single character specifier in the table is not needed if that character is combined with other characters. |
|||
==== Forum reference ==== |
|||
Steve Loft published a table showing comparison between output date modifiers for Cumulus 1 and MX at [https://cumulus.hosiene.co.uk/viewtopic.php?f=39&t=17888 Cumulus MX forum]. The table there was based on the table that was originally here for just Cumulus 1. |
|||
The subsequent comments in the forum suggested his layout got people confused. Most of that confusion came in two circumstances: |
|||
*When someone wanted to use one date or time modifier on its own |
|||
*When someone who had been using Cumulus 1 swapped to MX and wanted to replace a combination of output modifier characters |
|||
That all comes from the fact that when a MX modifier consists of a single character it can mean something different to when it appears with other characters. In Cumulus 1, "m" or "M" meant something different when it was combined with "H" or "h" (when it represented minutes), but in all other contexts it represented month. But for Cumulus 1, there is no other case where it matters what context a modifier is put in by the use of other modifiers, and no other modifier takes more than one meaning. |
|||
In MX it is much more complicated, to take a few examples "D", "H", "M" represent different items on their own to what they represent when combined with other characters. That other character can be as simple as a space or a "%" which modify the meaning of the character. So my modification of the table below is with the intention of demonstrating what characters mean when they are on their own and what they represent in the context of being with other characters. Looking at the table you can see "G" is used on its own because it represents a full date-time specifier. "D" is similarly used on its own represents the long date format. If we only want the day of month number we must use "%d" to avoid the meaning of short date format that "d" on its own represents. If we want the typical Cumulus date-stamp of day of month number and month "d M" and "M" will both work because "M" has a different meaning on its own and with another modifier. |
|||
==== My Revised Table of Time and Date Output Modifiers ==== |
|||
In some rows of this table, square brackets [] indicate optional items, they are included just to make it clearer how items can be combined in a single output parameter. |
|||
{| class="wikitable" border="1" |
{| class="wikitable" border="1" |
||
|- |
|- |
||
!style="width: |
!style="width:200px" | Label |
||
!style="width: |
!style="width:300px" | Not ticked |
||
!style="width: |
!style="width:500px" | Ticked |
||
!style="width:600px" | Example |
|||
|- |
|- |
||
|Use bearing zero when calm |
|||
|c |
|||
|Reports bearing from weather station |
|||
|G (as single character format) |
|||
|Takes into account if wind is blowing, if it is not, the resting bearing is invalid |
|||
|Displays the date using the format given by the Short Date format, followed by the time using the format given by the Long Time format. The time is not displayed in Cumulus 1 if the date-time value indicates midnight precisely. |
|||
|'22/03/2019 09:47:25' produced by {{Version badge 1}}<#time format=c>[[File:Badge vMx.png]]<#time format=G> |
|||
|- |
|- |
||
|Calculate average wind speed |
|||
|d |
|||
|Use wind speed from weather station |
|||
|%d |
|||
|Use rolling average of next selection to smooth out individual spikes |
|||
|Displays the day as a number without a leading zero (1-31). [[File:Badge vMx.png]]Note that Cumulus MX requires a ' ' (space), '%' or other modifier to be included, as 'd' on its own returns full 'short date'). |
|||
|27 produced by {{Version badge 1}}<#metdate format="d">[[File:Badge vMx.png]]<#metdate format="%d"> |
|||
|- |
|- |
||
|Use speed for average calculation |
|||
|dd |
|||
|Use each 'latest' reading from weather station be it a gust or not for above calculation |
|||
|dd |
|||
|Use the average wind speed output from weather station as input to rolling average above |
|||
|Displays the day as a number with a leading zero (01-31). |
|||
|07 produced by <#metdate format="dd"> |
|||
|- |
|- |
||
|Use 100% for 98% humidity |
|||
|ddd |
|||
|Report the humidity reading from station, even if station never reports 100% |
|||
|ddd |
|||
|Assume if station says 98 or 99, MX should report 100% |
|||
|Displays the day as an abbreviation (Sun-Sat) using the strings appropriate to the Locale. |
|||
|'Wed' produced by <#metdate format="ddd"> (English locale) |
|||
|- |
|- |
||
|Calculate dew point |
|||
|dddd |
|||
|Use dew point from weather station (it can be calculated using lots of different formulae), if it is available |
|||
|dddd |
|||
|Use the formula MX has selected for calculating dew point (not same as Cumulus 1), select if weather station does not calculate dew point |
|||
|Displays the day as a full name (Sunday-Saturday) using the strings appropriate to the Locale. |
|||
|'Friday' produced by <#metdate format="dddd"> (English locale) |
|||
|- |
|- |
||
|Calculate wind chill |
|||
|ddddd |
|||
|Use wind chill calculated by weather station (different formulas can be used) |
|||
|d (as single character format) |
|||
|Use the formula MX has selected for calculating wind chill (not same as Cumulus 1), select if weather station does not make its calculation available to MX |
|||
|Displays the date using the format given by the Short Date format. [[File:Badge vMx.png]]The MX parameter cannot be combined with any other parameters. |
|||
|e.g. '22/03/2019' (British Locale) produced by {{Version badge 1}}<#metdate format="ddddd">[[File:Badge vMx.png]]<#metdate format="d"> |
|||
|- |
|- |
||
|Synchronise station clock (DAVIS and INSTROMET only) |
|||
|dddddd |
|||
|Don't worry if weather station clock gets out of sync with MX time. |
|||
|D (as single character format) |
|||
|Once a day try to ensure that weather station clock and MX time differ by less than 1 minute |
|||
|Displays the date using the format given by the Long Date format. [[File:Badge vMx.png]]The MX parameter cannot be combined with any other parameters. |
|||
|e.g. '22 March 2020' (British Locale) |
|||
|- |
|- |
||
|Cumulus pressure trend names |
|||
|M (or ''m'') |
|||
|Use what weather station reports as the pressure tendency |
|||
|%M |
|||
|Let MX work out whether pressure is steady, rising/falling slowly, or rising/falling quickly, select if weather station does not make pressure trend information available |
|||
|Displays the month as a number without a leading zero (1-12). |
|||
*{{Version badge 1}}Cumulus 1.x.y:If the 'M' or 'm' specifier immediately follows an h, hh, HH, or H specifier, the minute rather than the month is displayed. |
|||
*[[File:Badge vMx.png]]Cumulus MX: Note that including a ' ' (space) or '%' before the M makes it a custom modifier e.g. '7' is returned for July as any initial zero is suppressed. ('M' on its own returns both Month and Day according to local format e.g. 22 July). |
|||
|2 |
|||
|- |
|- |
||
|Davis VP 1-minute barometer update |
|||
|MM (or ''mm'') |
|||
|Accept if weather station only updates pressure reading and trend information at quarter hour intervals |
|||
|MM |
|||
|Force Davis station to update pressure reading and trend information every minute |
|||
|Displays the month as a number with a leading zero (01-12). |
|||
*{{Version badge 1}}Cumulus 1.x.y:If the 'm' or 'M' specifier immediately follows an h, H, HH, or hh specifier, the minute rather than the month is displayed. |
|||
|'03' produced by <#LastDataReadT format=MM> |
|||
|- |
|- |
||
|Round wind speeds |
|||
|MMM (or ''mmm'') |
|||
|Use wind speeds to the accuracy implied by the number of decimal places resulting from the conversion of reading from station to your chosen units |
|||
|MMM |
|||
|Express wind speeds in integers for your chosen units, rounding away decimal places resulting from unit conversion |
|||
|Displays the month as an abbreviation (Jan-Dec) using the strings appropriate to the Locale.produced by <#metdate format="MM"> |
|||
|'Jun' produced by <#metdate format="MMM"> (English locale) |
|||
|- |
|- |
||
|Ignore LACROSSE clock |
|||
|MMMM (or ''mmmm'') |
|||
|Use the time supplied by weather station when writing to standard log |
|||
|MMMM |
|||
|Use the time supplied by device MX is running on when writing to standard log |
|||
|Displays the month as a full name (January-December) using the strings appropriate to the Locale. |
|||
|'June' produced by <#metdate format="MMMM"> (English locale) |
|||
|- |
|||
|yy |
|||
|yy |
|||
|Displays the year as a two-digit number (00-99). |
|||
|19 produced by <#LastDataReadT format=yy> |
|||
|- |
|||
|yyyy |
|||
|yyyy |
|||
|Displays the year as a four-digit number (0000-9999). |
|||
|2019 produced by <#LastDataReadT format=yyyy> |
|||
|- |
|||
|h [''AM/PM''] |
|||
|%h [''tt''] |
|||
|Displays the hour (12 hour clock) without a leading zero (1-12) [optionally in combination with AM/PM]. What "tt" produces depends on locale settings for your device, it might be capitals or it might be lower case (in Windows use Control Panel, not Settings app, to get to these regional additional settings). |
|||
{{Version badge 1}}For Cumulus 1 the formats for am/pm depend on the case in which you type the parameter as shown later in this table |
|||
[[File:Badge vMx.png]]Note that including a ' ' (space) or '%' before the "h" makes it a custom modifier, that is not needed if the " tt" follows, as multiple parameters are always custom modifiers |
|||
|- |
|||
|h:mm (or ''h:nn'') [''AM/PM''] |
|||
|h:mm [''tt''] |
|||
|Displays the hour (12 hour clock) without a leading zero (1-12) followed by 2 digit minutes [optionally in combination with AM/PM whose case varies as explained in previous entry]. |
|||
{{Version badge 1}}For Cumulus 1, the minutes can be represented by 'mm' only when appearing in combination with 'h' |
|||
|'10:27 am' produced by {{Version badge 1}} <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt"> |
|||
|- |
|||
|H (or ''H'') |
|||
|%H |
|||
|Displays the hour using 24 hour clock without a leading zero (0-23). [[File:Badge vMx.png]]Note that including a ' ' (space) or '%' before the "H" makes it a custom modifier, needed because H is on its own. |
|||
|7 produced by {{Version badge 1}}<#daylength format=H> |
|||
[[File:Badge vMx.png]]<#daylength format=%H> |
|||
|- |
|||
|H:mm (or ''H:nn'') |
|||
|H:mm |
|||
|Displays the hour using 24 hour clock without a leading zero (0-23) followed by 2 digit minutes. [[File:Badge vMx.png]]Note that %, of previous example, is not needed when H is not on its own. |
|||
|'7:27' produced by <#LastDataReadT format="H:mm"> |
|||
|- |
|||
|HH (or ''hh'') |
|||
|HH |
|||
|Displays the hour using 24 hour clock with a leading zero (00-23). |
|||
|'06' or 19 produced by <#LastDataReadT format=HH> |
|||
|- |
|||
|hh (''am/pm'') |
|||
|hh [''tt''] |
|||
|Displays the hour (12 hour clock) with a leading zero (01-12) [optionally in combination with am/pm]. |
|||
{{Version badge 1}}For Cumulus 1 the case output for the optional 'am/pm' depends on the case used for that parameter as shown later in this table |
|||
[[File:Badge vMx.png]] For MX, the optional 'tt' displays the contents of the device locale setting for AM string for midnight until any hour before noon, and the contents of the PM string for noon or any hour after noon before midnight |
|||
|'07 am' produced by {{Version badge 1}} <#LastDataReadT format="hh am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="hh tt"> |
|||
|- |
|||
|hh:mm (or ''hh:nn'' or 'HH:NN') [''am/pm''] |
|||
|hh:mm [''tt''] |
|||
|Displays the hour (12 hour clock) with a leading zero (01-12) followed by 2 digit minutes [optionally in combination with am/pm]. |
|||
{{Version badge 1}}For Cumulus 1, the minutes can be represented by 'mm' only when in combination with 'h', in other contexts 'mm' is interpreted as month number, and the case output for am/pm depends on the case used for that parameter as shown later in this table. As Cumulus 1 is case insensitive there are variants with capital letters available. |
|||
[[File:Badge vMx.png]] For MX, the optional 'tt' displays the contents of the device locale setting for AM string for midnight until any hour before noon, and the contents of the PM string for noon or any hour after noon before midnight |
|||
|'8:27 am' produced by {{Version badge 1}} <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt"> |
|||
|- |
|||
|n |
|||
|%m |
|||
|Displays the minute without a leading zero (0-59). [[File:Badge vMx.png]] As other examples show, the % is only needed when "m" is on its own. |
|||
|7 produced by {{Version badge 1}}<#daylength format=n>[[File:Badge vMx.png]]<#daylength format=m> |
|||
|- |
|||
|nn |
|||
|mm |
|||
|Displays the minute with a leading zero (00-59). |
|||
|'07' produced by {{Version badge 1}}<#daylength format=nn>[[File:Badge vMx.png]]<#daylength format=mm> |
|||
|- |
|||
|s |
|||
|%s |
|||
|Displays the second without a leading zero (0-59). [[File:Badge vMx.png]] As other examples show, the % is recommended when "s" is on its own, although I have not found any alternative meaning for "s" on its own. |
|||
| 9 |
|||
|- |
|||
|ss |
|||
|ss |
|||
|Displays the second with a leading zero (00-59). |
|||
|'06' or 19 produced by <#LastDataReadT format=ss> |
|||
|- |
|||
|z |
|||
|FFF |
|||
|Displays the millisecond without a leading zero (Cumulus 1: displays 0-999, Cumulus MX: displays either nothing, or displays 1-999, so don't write any code that assumes the MX output is numeric). |
|||
Note that the system clock in non-current versions of Windows only has precision to 15 ms, so don't use this modifier if your Cumulus is running on an old version of Windows. |
|||
| |
|||
|- |
|||
|(not available) |
|||
|ff (or ''f'') |
|||
|Displays hundredths of a second (or tenths) with leading zero(s) |
|||
| |
|||
|- |
|||
|zzz |
|||
|fff |
|||
|Displays the millisecond with a leading zero (000-999). Note that the system clock in some versions of Windows only has precision to 15 ms, so requesting thousandths of a second may not return anything useful. |
|||
[[File:Badge vMx.png]]The 'fff' modifier in MX can actually be extended to 'ffffff' for output to a millionth of a second! |
|||
| 09:47:25.000' produced by {{Version badge 1}}<#time format=hh:nn:ss.zzz>[[File:Badge vMx.png]]<#time format=hh:mm:ss.fff> |
|||
|- |
|||
|(not available) |
|||
| zzz |
|||
|Displays the offset of any time from UTC in hours and minutes |
|||
| e.g.-07:00 |
|||
|- |
|||
|(not available) |
|||
|%K |
|||
|Effectively another way of including time zone as per zzz example, but it can only be used for times not in UTC (if I understand correctly) |
|||
| |
|||
|- |
|||
|t |
|||
|%t |
|||
|Displays the time using the Short Time format. [[File:Badge vMx.png]]Remember that 't' combined with other specifiers (or preceded by space or '%') has a different meaning - see below. |
|||
| '09:47' produced by <#LastDataReadT format=t> (might not use colon in your locale) for both flavours of Cumulus |
|||
|- |
|||
|TT |
|||
|T (as single character format) |
|||
|Displays the time using the Long Time format. [[File:Badge vMx.png]] Note that this is a full time specifier and "T" is on its own as we are using a single character format. |
|||
|'09:47:56' (might not use colon in your locale) produced by {{Version badge 1}}<#LastDataReadT format=TT> [[File:Badge vMx.png]]<#LastDataReadT format=T> |
|||
|- |
|||
|am/pm or Am/Pm or AM/PM |
|||
|tt |
|||
|{{Version badge 1}}Uses the 12-hour clock for the preceding h or H specifier, and displays 'am' for any hour from midnight until just before noon, and 'pm' for any hour from noon onwards. The am/pm specifier for Cumulus 1 can use lower, upper, or mixed case, and the result is displayed accordingly. |
|||
[[File:Badge vMx.png]] For MX, 'tt' displays the contents of the device locale setting for AM string for midnight until any hour before noon, and the contents of the PM string for noon or any hour after noon before midnight, so whether it displays in capitals or lower case is determined by the locale settings, not the case of "tt". |
|||
| {Version badge 1}} 'am' produced by <#LastDataReadT format=am/pm>, 'AM' produced by <#LastDataReadT format=AM/PM> |
|||
|- |
|||
|h a/p |
|||
|h t |
|||
|Uses the 12-hour clock for the preceding h or H specifier, and displays 'a' for any hour from midnight until before noon, and 'p' for noon or any hour after noon. |
|||
{{Version badge 1} The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly. |
|||
[[File:Badge vMx.png]]whether it displays the "a" or "p" in capitals or lower case is determined by the locale settings, not the case of "t". |
|||
| see previous example |
|||
|- |
|||
|ampm |
|||
|(see above for 12 hour formats) |
|||
|This displays the contents of the device locale setting for AM string for midnight until any hour before noon, and the contents of the PM string for noon or any hour after noon before midnight. |
|||
{{Version badge 1}Uses the 12-hour clock for the preceding h or H specifier |
|||
| see previous examples |
|||
|- |
|||
|/ |
|||
|/ |
|||
|Displays the date separator character given by the Date Separator. It might not display a slash. |
|||
| '/' for typical British locale |
|||
|- |
|||
|: |
|||
|: |
|||
|Displays the time separator character given by the Time Separator. With Cumulus 1, this might not display a colon. |
|||
[[File:Badge vMx.png]]Note that by default Cumulus MX expects a locale to use ":" for any time separator. |
|||
|':' for British locale |
|||
|- |
|||
|'xy' |
|||
|'xy' or ''\x\y'' |
|||
|Characters enclosed in single quotation marks are displayed as such, and do not affect formatting. |
|||
[[File:Badge vMx.png]]In MX each character to be displayed as it was typed can be prefixed by a backslash. Also remember that any spaces in a MX modifier might need to be within single quotes as space is also used to change what a modifier represents. I told you MX modifiers were more complicated! |
|||
|Hyphens are added in this PHP language example '<#LastDataReadT format=yyyy>'.'-'.'<#LastDataReadT format=MM>'.'-'.'<#LastDataReadT format="dd">' |
|||
|} |
|} |
||
'''Extra Sensors''' - any sensors whose readings are logged in the standard log file are not '''extra'''. You tick here if you want Cumulus to log sensors using the extra sensors log file. Both log files are known as monthly logs in that a new log is created for each new month. (This is nothing to do with the '''special log''' that Cumulus 1 maintained for multiple temperature and humidity readings, as it is not available in MX). |
|||
==== Using HTML tags within format parameters (available in MX only) ==== |
|||
'''Debug logging''' is used to switch on extra debugging information (about what Cumulus does in its processing) in the [[MXDiags]] log file. It only remains on until either it is turned off here or Cumulus is closed. Use [[Cumulus_MX#Parameter_for_adding_debugging|a parameter '''-debug''' for adding debugging]] when you start Cumulus if you want the debugging to persist. |
|||
'''Example using a class to change the look of part of the output''' |
|||
'''Data logging''' is used to switch on extra debugging information (about interaction between weather station and Cumulus) in the [[MXDiags]] log file. It only remains on until either it is turned off here or Cumulus is closed. Use [[Cumulus_MX#Parameter_for_adding_debugging|a parameter '''-logging''' for adding data logging]] when you start Cumulus if you want the data logging to persist. |
|||
<pre><#TapptempH format="dd' 'MMM' 'yyyy'<span class=\'xx\'> at 'HH:mm'</span>'"></pre> |
|||
the output from this will look like ''04 Dec 2018<span class='xx'> at 10:12</span>'' |
|||
'''Stop second instance''' Invokes code that stops you having 2 copies of MX running at same time and conflicting. |
|||
'''Note where the quotes are, and where you need to use '\' escape characters'''. |
|||
==== Forecast ==== |
|||
'''Example using HTML tags''' |
|||
See tips by each setting. |
|||
<pre><#RecentTS d=2 format="h:mm' 'tt'<small>on' d/M/yyyy'</small>'"></pre> |
|||
This puts the date in a smaller font than the time |
|||
==== Solar ==== |
|||
=== Output (format modifier) parameters for decimal places === |
|||
See tips by each setting. |
|||
==== Annual Rainfall ==== |
|||
Cumulus 1 allows use of <tt>dp=n</tt> modifier (where n represents desired number of decimal places for latitude and longitude e.g. <#latitude dp=5> gives "59.24250". This is also available in MX. |
|||
MX makes much more usage of these '''dp''' parameters. For example in the moon tags <#MoonAge> gives "11" but <#MoonAge dp=3> gives "11.234" |
|||
The terminology here might be confusing, MX allows you to report seasonal rainfall, i.e. optionally what is reported as '''this year's rain''' starts on the first of September say, rather than 1 January. You choose by selecting a month a "Start of rainfall season". |
|||
*<tt>dp=i</tt> is used for both Cumulus 1 and MX. The value '''i''' following the attribute '''dp''' is an integer, how many decimal places you want for the output you see. Only available for a limited range of web tags (latitude and longitude, plus in MX <#MoonPercent> and <#MoonPercentAbs>). |
|||
*<tt>tc=y</tt> is a new parameter only in MX, the attribute '''tc''' takes the value 'y' to remove decimal places by truncation instead of using <tt>dp=0</tt> which would round to nearest integer. e.g. <#MoonAge tc=y>. At present not available in any other web tags. |
|||
However, the way MX has been written, does not fully implement this functionality, and users might not see the correct annual rainfall figure in all months of their season. MX calculates the figure it reports for '''this year's rain''' by summing: |
|||
=== Output (format modifier) indicating remove commas === |
|||
#the rainfall it reports for today |
|||
#the amount in "year to date" entered here, if current calendar year matches the "Year to which year-to-date amount applies" entered here |
|||
#the amount in dayfile.txt (daily rainfall field) for each log file line starting with one with date matching First of month specified in "Start of rainfall season" and continuing to end of file. |
|||
If, you don't choose January here, ''there is a difficulty with the year-to-date and year to which it applies'', because MX assumes the "year-to-date" is applied January to December of the "Year to which year-to-date amount applies" and will therefore incorrectly alter the '''this year's rain''' during parts of two different seasons! Consequently, as you go from December to January your "year-to-date" rainfall amount reported suddenly decreases; and when the month changes to that specified in "Start of rainfall season", you find the season re-starts with not zero rain but with '''this year's rain''' added in again! |
|||
"rc=y" is a '''new parameter for MX''', the attribute '''rc''' takes the value 'y' to replace any commas defined by the locale with full stops to separate integer and decimal parts of the output value. It was initially only implemented on a few new web tags (#MoonPercent, #MoonPercentAbs, #MoonAge) for MX versions up to and including 3.5.3. From version 3.6.6 only can all web tags that can output real numbers can now use alternative syntax of <tt><#tag_name rc=y></tt> to replace all commas in the output by a full stop (don't worry, MX does not use a comma for separating off thousands, so it is the decimal comma that becomes a decimal full stop like character when this remove comma specifier is used. |
|||
The advice is to review these settings every month and check whether you want them to still apply or need to revise them. |
|||
==== Graphs ==== |
|||
Why would you want to remove decimal commas? Well because the JavaScript language cannot understand decimal commas, and MX has several scripts written in this language, equally some third party alternative web pages rely on ajax to update them (and Ajax uses JavaScript). |
|||
See tips by each setting. |
|||
== Additional text in output format parameters == |
|||
=== Internet Settings === |
|||
You should put anything that is additional, to the defined format modifier specification below, into single quotation marks to prevent it being interpreted as a date or time format modifier: |
|||
All settings entered here are stored in [[Cumulus.ini]]. No settings take effect until '''Save''' button pressed. [[File:Include graph data files.PNG|right]] |
|||
#For example, the word "on" contains the character "n", which for Cumulus versions 1.9.1 to 1.9.4 will be interpreted as a time format modifier unless you put it into single quotation marks. Example of valid Cumulus 1 syntax: <#TtempH format="'at' hh: mm 'on' dd / mm / yyyy">. |
|||
#You can include HTML tags (but they cannot have any attributes because both single and double quote characters have defined meanings) and special characters as quoted text within the 'format' parameter.<br> Example of valid syntax: <#TapptempH format="'at 'h:nn' 'am/pm '<small>on' d/m/yyyy'</small>'">. |
|||
All retain their settings when MX is restarted. No settings take effect until '''Save''' button pressed. This includes '''FTP logging''' in '''Web/FTP settings''' section, (it is not in this image as it is further down), which is used to add additional information to [[MXDiags]] about standard File Transfer Process actions; it will persist across stopping and restarting MX, so you must switch it off here (or with MX stopped within [[Cumulus.ini#Section:_FTP_site|Cumulus.ini '''FTP site''' section]]. |
|||
{{Version badge 1}}'''Note for Cumulus 1 - if your format has any spaces in it''', you must enclose the whole format parameter value in double quotes, for example (Cumulus 1.9.x): <#YearTempHT format="hh nn">. Consequently, you cannot include double quote characters in any other position (see [[Php_webtags#Web_tag_Complications| here for work-around]]). |
|||
The MX settings on this web page have a lot of similarities with the [[Cumulus_Screenshots#Sites.2FOptions_Tab|Cumulus 1 settings]] |
|||
[[File:Badge vMx.png]]Note for MX - you can use single quotation marks round spaces and text (e.g. ' on '), but you can also use '\' as escape character (e.g. for 'on' use '''\o\n'''). However for 'at' the only alternative is '''\a't'''' because the character t has another meaning and escape followed by a "t" i.e. "\t" becomes a tab! |
|||
*this MX web page does not cover all of the Cumulus 1 Internet Settings. |
|||
*MX has more options than Cumulus 1 had, |
|||
*some defaults are different in the two flavours. |
|||
Like Cumulus 1, MX has an '''External Programs''' section. Here you can enter a command and (in separate box) parameters for 3 possible timings (at real-time, at interval, and at end of day). Typically, on a windows device you would enter the name of a batch file (filename ends in .cmd). On a device running Linux, it could be a shell command file (ends in .sh) or indeed a command like "php" to run a php script whose name is specifed in parameters box. The final parameter might be preceded by ">" to direct the output to a log file. |
|||
*In Cumulus 1, you had one setting to upload the standard files (web pages) and a second setting to upload the standard images (moon image, and the graphs) |
|||
*MX has one option for the "uploading the standard files" (web pages), a second option "include graph files" (JSON files used by charts), a third option for "generating the moon image", a fourth option for "uploading the moon image". See image where the graph file option is arrowed. |
|||
Each section for an external web site has a number of parameters to set, once set MX will automatically upload to that site the weather values in the correct format. Windy has been added to the external web sites that can be automatically updated. |
|||
=The web tag application programming interface= |
|||
The main new feature (not in Cumulus 1) within this settings page is a '''Custom Http''' section. Within here you can define commands (in URL format) to be executed either at some multiple of seconds interval, and/or at a selected intervals in minutes, and/or at end of day (in [[#MX_End_of_Day_Process|EOD sequence shown below]], the Custom HTTP is run before external programs are run, and that is before upload of Extra Files at EOD). |
|||
[[File:Badge vMx.png]] Available from version 3.7.0 (build 3089) released 28 July 2020. It was proposed in January 2015, see Steve Loft [https://cumulus.hosiene.co.uk/viewtopic.php?p=101496#p101496 plan to add a call where you supply a list of items (probably web tag names), and you get back the equivalent data]. |
|||
*In each of these you can use web tags to supply values for parameters to the command. |
|||
*Typically this would be used to send information to a remote web server. |
|||
*Here is a Custom HTTP example <pre>https://the_URL_here/your_api_here?winddir=<#avgbearing>&windspeedmph=<#wspeed>&windgustmph=<#wgust>&tempf=<#temp>&rainin=<#rhour>&baromin=<#press>&dewptf=<#dew>&humidity=<#hum>&uv=<#UV>"</pre> |
|||
*No settings take effect until '''Save''' button pressed. |
|||
*You need to turn on enhanced debug logging to see a confirmation that the http has run such as that shown here: |
|||
<pre> |
|||
2018-07-21 16:05:00.821 Custom HTTP Minutes update |
|||
2018-07-21 16:05:01.037 Custom HTTP Minutes response: OK: ok! (24.2)</pre> |
|||
== |
=== Extra Web Files === |
||
This is an extension of the Cumulus 1 facility on the "Files" tab of its Internet Settings. |
|||
This is meant for services either on the same computer as Cumulus or on your local network. It is not secure, and should not be available, nor requested, via any external network or the internet. |
|||
How to use these settings is explained for both Cumulus flavours on [[Customised_templates#What_to_select_on_the_.27Files.27_tab_of_the_Internet_Settings_screen_within_the_.27Configuration.27_menu|this wiki page]], MX has an extra "end of day" (EOD) option, but otherwise you fill it out exactly the same way. Settings in one table cell are stored when you click in another table cell. |
|||
The [[MX Administrative Interface]] uses some application programming interface (api) calls to obtain the data each web page in that interface needs, and another api to return the results of any edit made. If you wanted your '''CumulusMX/interface/todayyest.html''' web page to include something else (e.g. snow falling/lying/depth) you would edit that HTML page to have the extra sub-table you want (you cannot extend the existing rainfall table as that is dynamically created by existing api) and you would edit the associated JavaScript file '''CumulusMX/interface/js/todayyest.js''' to add a new api call seeking snowdepth, snowfalling, snowlying tags for today (unfortunately there are no tags for yesterday's snow) and to place the returned values into your new sub-table (probably using jQuery to make it easy). In a similar way, you could add anything where today and yesterday tags are available such as UV Index. |
|||
Although, there is no Save button as clicking in another cell stores previous edit, the "Enter" button on many keyboards can optionally be used to be sure you have saved all edits made before you leave the screen. |
|||
In earlier versions of Cumulus if you wanted to make use of values processed by Cumulus, you wrote a script file referencing the web tags you wanted to use, and let Cumulus process that file at an interval set in the settings, then you had to write something to process the results at the relevant interval. Now if you are running other software on your device that runs MX (or a computer or other device linked directly on your personal network), you can request web tags values on demand via an application programming interface (api hereafter) and don't need to worry about any timing issues. |
|||
Although to tick both real-time and EOD seems nonsensical, MX will let you tick both for any selected file(s), as it wil then do any processes, and uploads, at both intervals. I don't see why you should do that for normal running, but you might tick both to test a template without waiting for EOD, and after it has been processed once, remove the unwanted real-time tick, so from then onwards it just happens at EOD. |
|||
Obviously each api request creates a processing overhead on Cumulus so use this feature wisely (minimise the information you request and minimise the frequency of requesting it). You can use it for extra current information, but in that usage you might need to repeat the call. Consequently, maybe it is more likely that the api will be used to request information that does not keep changing, such as what units are being used for temperature, rainfall, and wind speed; or perhaps daily, monthly, or yearly, summary figures. |
|||
'''If you have moved from Cumulus 1''', and are therefore using an existing Cumulus.ini, these screens may be partly pre-populated, but because mX adds extra options you might need to: |
|||
Each admin interface web page uses api techniques for all the information it needs. Some api calls are repeated with AJAX requesting updates for the weather information on a frequent basis, but each page has another api request that is issued just once for the version and build being used. To my mind, the design of '''CumulusMX/interface/todayyest.html''' is crazy. The HTML appears to have a table structure, but that table structure is overwritten by each repeating api. So every time AJAX repeats that api call it returns in json format the whole table definition as well as table cell contents, despite that much of that json (all that HTML defining table header, table rows, table cells, etc.; and the units for each value) does not change and it is only some values and times buried within the json in the api that actually might change (and of those half of them, the yesterday values and times only change once a day). In some code I wrote (but later abandoned) I made use of the api calls that support the '''CumulusMX/interface/todayyest.html''' web page to get the units I wanted on another interface page, but I only called it once as it returned a lot of other information (as just mentioned) that I did not need. I later found a better way, as in example below, which gives me just what I need and no more. |
|||
# change some paths in local column, (if your Cumulus 1 and your MX locations are different) |
|||
#*if you have moved to a Raspberry Pi, or other Unix-derived operating system, remember that path names in Windows use "\" as directory separator, but all other systems use "/". |
|||
#*There is more advice available at [[Setting_up_Raspberry_Pi#Configuration_files]]. |
|||
# untick one column, and tick another, now that EOD is an option for the timing as well as real-time and (normal logging/ftp) interval. |
|||
# edit some templates (local files) where the process column is ticked because of [[Webtags|Web tags differences]] (some output modifiers are interpreted differently), you will need to revisit every web tag in every template to check whether the output format will need to be added, or amended, to give the output you want. |
|||
# you should not need to change remote file names, providing that you have not changed any directories on your web site as (like in Cumulus 1), for extra files, the remote path/file name required ignores any directories specified on Internet Settings screen for FTP settings. |
|||
#*if you host your own web server, then you might need to change remote paths, if you have moved your server to a new device |
|||
#*if you use a web server provided by a hosting company, and you change to a different company or they update their offering, then again you might need to update remote column |
|||
#* the exception to this is if either you host your own web site and/or you are moving them web site to a new location; in these cases your remote file paths may need updating. |
|||
== |
=== Calibration settings === |
||
This is identical to [[Cumulus_Screenshots#Calibration|Cumulus 1 screen]] functionality, already explained in [[FAQ#I_get_very_large_amounts_of_rainfall_shown.2C_or_other_high_readings|Cumulus 1 FAQ here]] and [[Dayfile.txt#Dealing_with_rogue_measurements|"Dealing with rogue measurements"]] in this wiki. |
|||
You may have used GET as an attribute when defining the action of a HTML form. Equally you might in a script language access the query-string part of a Universal Resource Locator to get parameters for what the script is to supply to the web page. Even if you don't understand the meaning of those technical terms, you probably have seen when using a browser (in the box where a URL is entered) that sometimes the URL seen there has a query-string. You will have seen a question mark (?) followed by one or [separated by ampersand (&)] more '''name=value''' parameters. |
|||
=== NOAA report settings === |
|||
The GET approach to using the Cumulus general api works in this way indicating the start of a query-string with a question mark and using ampersands to separate names. The difference is that a tag name (or list of tag names) is used instead of a name=value parameter (or list of name=value parameters). However, when the Cumulus api returns the values they will be in attribute=value format. Therefore if (like example below) you are coding in JavaScript, what is returned is a JavaScript Object and you extract the values by specifying the Object name and the Attribute name. If that technical terminology confuses you, look at the example. |
|||
[[File:NOAA settings.png|right | 200 px]] |
|||
===Selecting values using GET=== |
|||
This is identical to Cumulus 1 functionality, the various settings available on this screen are already explained [[Cumulus.ini#Section:_NOAA|for the settings file here]]. |
|||
Suppose you want to get the values for the following three web tags: |
|||
# <#RCtemp> |
|||
# <#RChum> |
|||
# <#RCdew> |
|||
Then the URL with query-string to use is '''http: //localhost:8998/api/tags/process.json?rc&temp&hum&dew''' |
|||
Just a quick reminder here that while Cumulus 1 is case insensitive for the code for the different ways to specify a month, MX only accepts upper case ('MM' for digits, 'MMM' for 3 letter month etc.), read more about [[Webtags#NOAA_style_Report_Naming|the naming here]]. |
|||
Obviously, if you have started MX with a port parameter like this: |
|||
<pre>sudo mono CumulusMX.exe -port 9999</pre> |
|||
then you change the 8998 port shown in the URL for the api to use the port you have selected e.g. '''http: //localhost:9999/api/tags/process.json?rc&temp&hum&dew''' |
|||
=== MySQL settings === |
|||
Cumulus MX includes functionality not in Cumulus 1, and this is one example of a new feature. It is designed to automate updating of MySQL databases whose schema has each table based on one of the Cumulus log files. This MX feature was developed from [[ImportCumulusFile|this script]] for Cumulus 1. |
|||
The first parameter is '''rc''' to indicate that the tags that follow are to use decimal points not decimal commas, which is how many script languages expect to see values. |
|||
Remember that in current version (and some earlier versions) of MX, the above three web tags are exactly same as: |
|||
# <#temp rc=y> |
|||
# <#hum rc=y> |
|||
# <#dew rc=y> |
|||
'''IMPORTANT''' |
|||
Since '''rc=y''' can be applied to several web tags that don't appear in [[Webtags#No_Commas]] table, this shows how the api can access values without commas for all those web tags that report in real numbers and allow that output modifier. |
|||
*The MX automatic standard updates described below only work if the database table they are updating has columns named exactly as defined in the standard update. |
|||
**The order of those columns does not matter, both CumulusMx.exe and ExportMySQL.exe use column names in their INSERT IGNORE statements. |
|||
*All the MX updates will work even if you have defined additional columns in the standard tables and update those in a separate process. |
|||
*But when extra columns are added as at versions 3.6.0 and 3.7.0, the MX updates will NOT work unless you have added the extra columns introduced in those releases with correct names. |
|||
**For those releases, the release announcement includes a script to run to add the extra columns needed for those (and subsequent) releases. |
|||
==== Brief background on SQL ==== |
|||
If you are using the api in a context where it does not matter if decimal commas or decimal points are in the api or for any tags that don't report in real numbers, simply omit the '''rc''' as first item, and just include tag names separated by ampersands. |
|||
It was IBM who first invented the concept of Relational Databases in the 1970s and they needed a language for all aspects of interaction with the new database and they called it Structured (English) Query Language. The brackets indicate the word that was later removed. You may find when SQL is talked about, it is either pronounced "sequel" (as if there is still a "E" after the "S") or the 3 letters are simply spelt out. |
|||
=== JavaScript example === |
|||
*SQL is not '''Structured''' in the modern computing usage of that word concerning languages that can implement decision trees; instead the word structured here comes from the ability to make a query from a main query and a sub-query, although for some people it is a useful reminder that the key words must appear in a particular order. |
|||
*SQL is not just for running '''Queries''', it can give and revoke access permissions, create and drop tables, and do many more tasks than just query a database to get results. |
|||
*SQL is a '''Language''' as it does have a set vocabulary, a defined sequence in which key words must appear, and it is used for describing tasks to a database. |
|||
A relational database has to satisfy a number of conditions, but the basic one is that all data appears in a table with rows and columns. The columns have a particular order, but there is no control over the order of rows, so you can't specify a row number, you '''either''' specify a primary key that identifies a particular row, '''or''' you specify a sort by the value in any column in a particular order and SQL then returns your selected rows in that sorted order. |
|||
Some people might feel the admin interface could be improved on some of its pages by showing additional information. It is possible from MX 3.7.0 to obtain extra information. |
|||
Like happened with video recorders and browsers, there was a relational database war, and thus division in language adoption, in the 1980s between 2 big players IBM's SQL and Ingres' QUEL, each gaining popularity in different ways, but the latter lost out, with newcomer Oracle taking the lion share of the commercial usage of SQL soon so very widely adopted, it achieved world dominance. There were a number of minor players who implemented their own relational databases, and initially their own languages, but SQL obtained a ISO definition in 1985 and was then widely adopted, surviving the invention of the internet, and the move from mainframes to small devices. |
|||
I wanted to improve the log file editing pages, and that was partly by adding validation, and partly by changing the way the editing is done. For the standard log file editor I wanted to achieve even more, I added a script to calculate (and recalculate after any edit) the derived fields from the source fields. To make these calculations work for anyone, I needed to find out what units the Cumulus MX user is using. Before 3.7.0 release the snippet of script that obtained the units via various api calls was quite complex (I described above how the api returned lots of unwanted content), but with 3.7.0 my new api call was greatly simplified to what I show below. Please note my revised log file editing scripts did not make it into a public release, and it is only the units obtaining api that I am making available to public here. |
|||
MySQL is one of the rivals, but all versions of SQL are related and the dialect differences are comparatively minor compared to the commonality of the majority of the language. SQL is designed to be largely independent of how data is stored, so from 2000 as per newer standard for SQL, it now works with [[Xml_webtags|XML]] as well as relational databases. That said, because it can define creation of columns, some SQL code is dependent on how data is stored in a particular database system. |
|||
Here is the code (with the api call written using jQuery): |
|||
<pre>/* Some new variables connected with new api call (MX 3.7.0) */ |
|||
var tempLetter; // C or F |
|||
var rainUnit; // mm or in |
|||
var windUnit; // any units in style allowed by Cumulus |
|||
/* The one extra api request included to obtain the units used for temperature, rainfall, and wind speed */ |
|||
$.get('./api/tags/process.json?tempunitnodeg&rainunit&windunit', "limit=1", callUnits); |
|||
function callUnits(unitsObject) |
|||
{ |
|||
tempLetter = unitsObject.tempunitnodeg; |
|||
rainUnit = unitsObject.rainunit; |
|||
windUnit = unitsObject.windunit; |
|||
console.log("new api", tempLetter, rainUnit,windUnit); |
|||
}</pre> |
|||
A little bit of explanation might help: |
|||
*JavaScript variables generally need to be declared first, I have used 3 separate line each starting with '''var''', but you can list several variables on one line using a comma to separate them |
|||
*In my script it is important to define these variables outside the function as I will explain later |
|||
*The jQuery get request takes the api URL as first parameter and the function to deal with the returned result as third parameter |
|||
*The middle parameter is irrelevant in this context as only one object instance is returned, but if the qet was returning multiple results, "limit=1" would only return the first result |
|||
*The function takes as its sole parameter an Object (a JavaScript Object is a collection of properties), this is what is returned by the api, an object can be given any variable name |
|||
*In JavaScript if a variable is defined outside the function, then given a value inside the function, that value can be accessed by later code outside the function (in my case by code within the other functions for calculating each derived value) |
|||
*We are only interested in 3 of the '''property_name = property_value''' items in the Object. |
|||
*The JavaScript '''refinement''' syntax (starts with a dot) can be used to find the value for any parameter we name. We assign the variable already defined to the object and its refinement (that specifies the attribute we want). |
|||
*The console.log command simply outputs all the items in the list within the brackets into the browser console that in many browsers is displayed by selecting '''F12''' on the keyboard. I included this instead of the lengthy rest of my code that uses the units to do the various calculations correctly. |
|||
== |
==== Implementation ==== |
||
Mono and .Net implement SQL capability, and this is utilised by Cumulus MX in the queries it generates. However, for SQL to work on your web site, you need to have a relational database available on your web server that accepts the MySQL that MX generates. It is worth saying that one difference between MySQL and the SQL standard is the former can insert multiple rows in one MySQL statement, but in the standard for SQL the specification says only one row can be inserted by one statement. Having made that clear, the SQL that is generated by the MX engine does only insert one row at a time, so the SQL MX generates is standard SQL. |
|||
The word "Post" in a computer environment means that the Hypertext Transfer Protocol (HTTP) used by the internet is being asked to transfer information enclosed in the body of the request message. Put slightly less technically in this approach you produce a text file with the details of what tags you want and send it to the api server. I suppose it is a bit like sending an email, its header (subject, author, date sent) is easy to view, but you need to open it to see what text is in the body. |
|||
MX does not include a database to install on your web site. Note, this does not mean your web server must have a MySQL database, as other products will understand the updating SQL (because of the dialect, commonality, and standard-meeting points I have just made), so the automatic updating should always work. One common difference between products is which data types available, so ''it is just possible that you might'' have a database that does not understand the column definitions in the '''MX option to create a table for you''' using MySQL dialect, so do be prepared in case you have to create each table yourself using a different method, the SQL to create a table is fairly simple, it even starts "CREATE TABLE table_name", but it is the list of columns with their data types and sizes that follows that is tricky if you don't know what is allowed on the database you are using. |
|||
You may have used POST as an attribute when defining the action of a HTML form. In that context the form is sent as the contents of a message to whatever web page is going to process the contents of that form. |
|||
Equally, the separate application, '''ExportMySQL.exe''' mentioned in its context below, includes SQL to create a table (with MYSQL data types) and add multiple rows in one instruction, so it is only able to work with databases that use MySQL (the clue is in the name of the application), or databases where the tables have already been set up so it is just issuing '''Insert Ignore''' SQL. |
|||
The post approach has a few advantages over get: |
|||
*The parameters are not shown in any query-string, so are not obvious to the person looking over your shoulder, nor do they appear in a history list of sites that the browser has visited. |
|||
*If you fill out a form online, the post approach will be used as the content needs to be kept secure. |
|||
**The get approach may be seen when you are navigating through a web site, and a selection is being remembered. |
|||
*The POST approach can handle very long requests and return a lot of information. |
|||
**In contrast, a URL with query-string is restricted in total length (the restriction is dependent on a number of other factors, but might be at something like 1000 characters in total), so GET comes with a restriction on how many parameters can be specified. |
|||
====Mandatory section==== |
|||
See https://cumulus.hosiene.co.uk/viewtopic.php?p=145050#p145050 for post example |
|||
* Server Details - expand this drop down as it is used for essential information for any access to the database on your web server: |
|||
=The Web Tags for Cumulus = |
|||
*# Enter your host name or a IPv4 address for your web server. If you host your own server, it might be something like 127.0.0.1. It will be the same as you enter for host in the "internet settings" screen. |
|||
*# Enter the port for communicating with database server e.g. 33106. (Your web server provider should tell you whether the port is this or another number) |
|||
*# Enter the User Name for updating your database. (You may be able to set up user names on your database with different permissions, you need to state here one with updating permissions) |
|||
*# Enter the password for updating your database. (This will be set up for each user name) |
|||
*# Enter the name of the database that holds the tables you wish to update. (You probably have set this up, ask your provider if you need help) |
|||
====Optional Sections==== |
|||
These are available in both Cumulus 1 and MX unless indicated by a version 1 or MX badge. |
|||
The remaining 6 drop-down sections are optional, you choose which you want to use, they appear on the screen in a different order to how I explain them below. |
|||
Here follow tables indicating what web tags/tokens can be used, tables group the web tags available by the basic purpose of the tags listed. |
|||
*Some of the optional settings described below, allow you to choose which log file to use for such automatic updates and what to call the table uploaded to (uploads will not work before the required table has been created). |
|||
== System == |
|||
*Alternatively, you can devise your own schema, create that table, and then write the SQL to update your table using web tags to supply all the values. |
|||
*You need to turn on enhanced debug logging to see any confirmation that the standard or custom SQL has run. With enhanced logging you will see messages like: |
|||
<pre>2020-04-09 10:00:01.047 MySQL: 2 rows were affected.</pre> |
|||
===== Standard Daily Summary Table ===== |
|||
Special tags returning information about the Windows device hosting Cumulus 1. |
|||
* 1.''Dayfile.txt upload'' |
|||
** This section is about uploading to a database table that contains one row for each day. |
|||
** This feature takes the set of values that MX has just used for the line added to this [[dayfile.txt|log file]] at the end of the day, and soon afterwards inserts those same values into a new row (with columns named as per SQL example below) in a database table. |
|||
#If you don't have a table in your database for this upload (skip to step after SQL if you do), first |
|||
#* Choose Table name - the default table name is "Dayfile", but you can choose any other name |
|||
#*Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message |
|||
# Now find "Create database table" section below the Save button and click '''Create Dayfile'''. |
|||
#* MX will confirm when table has been created. |
|||
#*This will create the table using the following SQL (here using default table name) (the feels like columns were added in MX version 3.6.0): |
|||
<pre>CREATE TABLE Dayfile (LogDate date NOT NULL ,HighWindGust decimal(4,1) NOT NULL,HWindGBear varchar(3) NOT NULL,THWindG varchar(5) NOT NULL,MinTemp decimal(5,1) NOT NULL,TMinTemp varchar(5) NOT NULL,MaxTemp decimal(5,1) NOT NULL,TMaxTemp varchar(5) NOT NULL,MinPress decimal(6,1) NOT NULL,TMinPress varchar(5) NOT NULL,MaxPress decimal(6,1) NOT NULL,TMaxPress varchar(5) NOT NULL,MaxRainRate decimal(4,1) NOT NULL,TMaxRR varchar(5) NOT NULL,TotRainFall decimal(6,1) NOT NULL,AvgTemp decimal(4,1) NOT NULL,TotWindRun decimal(5,1) NOT NULL,HighAvgWSpeed decimal(3,1),THAvgWSpeed varchar(5),LowHum decimal(4,0),TLowHum varchar(5),HighHum decimal(4,0),THighHum varchar(5),TotalEvap decimal(5,1),HoursSun decimal(3,1),HighHeatInd decimal(4,1),THighHeatInd varchar(5),HighAppTemp decimal(4,1),THighAppTemp varchar(5),LowAppTemp decimal(4,1),TLowAppTemp varchar(5),HighHourRain decimal(4,1),THighHourRain varchar(5),LowWindChill decimal(4,1),TLowWindChill varchar(5),HighDewPoint decimal(4,1),THighDewPoint varchar(5),LowDewPoint decimal(4,1),TLowDewPoint varchar(5),DomWindDir varchar(3),HeatDegDays decimal(4,1),CoolDegDays decimal(4,1),HighSolarRad decimal(5,1),THighSolarRad varchar(5),HighUV decimal(3,1),THighUV varchar(5),HWindGBearSym varchar(3),DomWindDirSym varchar(3),PRIMARY KEY(LogDate, |
|||
'MaxFeelsLike', 'decimal(4,1)' ,'TMaxFeelsLike', 'varchar(5)','MinFeelsLike', 'decimal(4,1)','TMinFeelsLike', 'varchar(5)' ) COMMENT = "Dayfile from Cumulus"</pre> |
|||
#With the table existing, all you need to do is: |
|||
#* Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQL quoted above] to happen at end of day |
|||
#* Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message. |
|||
# Now, to populate your table with past rows: |
|||
#* If you are using Windows, open a command window in the folder where "CumulusMX.exe" is found. Type <tt>ExportMySql.exe dayfile</tt> |
|||
#*If you are using another operating system, send the following instruction to the terminal in the folder where you installed MX. <tt>sudo mono ExportMySql.exe dayfile</tt> |
|||
#At the end of the meteorological day, MX will now automatically run the SQL to add a new row with the daily summary values as mentioned at the start of this section. |
|||
===== Another daily summary table ===== |
|||
[[File:Badge vMx.png]]''If you are running MX, then most tags do not work.'' |
|||
*2. ''Custom upload - at rollover'' |
|||
{| class="wikitable" border="1" |
|||
** Use this option with '''caution''' - I found that when I ran MX on a Windows PC, this feature worked (although I abandoned it as it did not do all I wanted), but when I tried this feature with MX running on a Raspberry Pi it simply did not work (the first few web tags used reported correctly the values from day that had just ended, but subsequent web tags, from dew point in example below, were useless as they reported the values from first minute of day just starting - the SQl runs in a separate thread in MX to that handling web tags and it appeared the web tags rolled over before the SQL finished even being defined by MX! |
|||
|- |
|||
** In the previous option, you have no ability to vary the schema (which columns are updated), it will update a column for Total Evaporation even if your weather station cannot calculate that. It will update columns for total hours of sunshine, highest solar radiation level, and the maximum UV in the day even if you cannot measure these. It will not update columns for other parameters that Cumulus processes like Lightening, Soil Moisture, pollutant values, Chill Hours, for whether snow was falling or lying, or the depth of snow if you wanted to be recording those in your daily summary. |
|||
!style="width:150px" |Web tag_name |
|||
** MX provides this alternative option, again doing an upload as part of roll over to next day ([[#MX_End_of_Day_Process|sequence shown below]], the Custom EOD SQL is run after the day reset to new date. |
|||
!style="width:600px" |Function |
|||
**In this section you can specify the schema, and say which columns are to be updated with three selections: |
|||
|- |
|||
**# Save - a button after all option sections, until you click it any changes you make in this section have no effect |
|||
|<#OsVersion> |
|||
**# A tick box to enable or disable this upload (so you can leave the SQL recorded, but stop running it when you like. |
|||
|OS version, e.g. "Windows 7 x64 build 7600" |
|||
**# The SQL you want to run, what you type in this small text box should include INSERT IGNORE (or REPLACE) to insert a row, or include UPDATE to change columns in a row that already exists, like any SQL it must include the name of the table, the columns to be updated, and the values you want to insert into the columns are either expressed as web tags, as SQL functions on web tags, or as a sub-query reading the values from somewhere else. |
|||
|- |
|||
**#* Here is an example of a suitable query that MX can process for you |
|||
|<#OsLanguage> |
|||
**#**[note includes yesterday tags e.g. for primary key '''<#metdateyesterday format=yyyy-MM-dd>''', but as caution above says it might, or might not, process correct web tag content so other web tags migt also need to be yesterday versions), |
|||
|OS language, e.g. "English" |
|||
**#*I have used the SUBSTRING function at one point, |
|||
|- |
|||
**#*as it is a custom update the column names listed here are different from the standard example |
|||
|<#SystemUpTime> |
|||
**#*I don't have a sub-query in this example, but any SQL that is syntactically valid could appear here, and you could have more than one query in sequence. |
|||
|{{Version badge 1}}How long the system has been up, e.g. "8 hours 21 minutes" (not available on MX) |
|||
<pre>INSERT IGNORE INTO `test_daily_summary` (`MaxRainRate`, `TMaxRainRate`, `HighHourRain`, `THighHourRain`, `TotRainFall`, `SnowFalling`, `SnowLying`, `SnowDepth`, `CumChillHours`, `LogDate`, `RollOver`, `MinTemp`, `TMinTemp`, `HeatDegDays`, `AvgTemp`, `MaxTemp`, `TMaxTemp`, `CoolDegDays`, `LowDewPoint`, `TLowDewPoint`, `LowHum`, `TLowHum`, `HighHum`, `THighHum`, `HighDewPoint`, `THighDewPoint`, `GreatWindChill`, `TGreatWindChill`, `LowAppTemp`, `TLowAppTemp`, `HighAppTemp`, `THighAppTemp`, `HighHeatInd`, `THighHeatInd`, `MinPress`, `TMinPress`, `MaxPress`, `TMaxPress`, `HighAvgWSpeed`, `THighAvgWSpeed`, `StrongestWindGust`, `TStrongestWindGust`, `BearStrongestWindGust`, `BearStrongestWindGustSym`,`BearDomWind`, `BearDomWindSym`, `TotWindRun`) VALUES ('<#rrateTM>', '<#TrrateTM>', '<#hourlyrainTH>', '<#ThourlyrainTH>', '<#rfall> ', '<#snowfalling>', '<#snowlying>', '<#snowdepth>', '<#chillhours>', '<#metdateyesterday format=yyyy-MM-dd>', '(1 * SUBSTRING(<#rollovertime>,0,2))', '<#tempYL>', '<#TtempYL> ', '<#heatdegdays> ', '<#avgtemp>', '<#tempTH>', '<#TtempTH> ', '<#cooldegdays> ', '<#dewpointTL>', '<#TdewpointTL>', '<#humTL>', '<#ThumTL>', '<#humTH>', '<#ThumTH>', '<#dewpointTH>', '<#TdewpointTH>', '<#wchillTL>', '<#TwchillTL>', '<#apptempTL>', '<#TapptempTL>', '<#apptempTH>', '<#TapptempTH>', '<#heatindexTH>', '<#TheatindexTH>', '<#pressTL>', '<#TpressTL>', '<#pressTH>', '<#TpressTH>', '<#windTM>', '<#TwindTM>', '<#wgustTM>', '<#TwgustTM>', '<#bearingTM>', '<#directionTM>', '<#domwindbearing>', '<#domwinddir>', '<#windrun>', '<#feelslikeTH>','<#TfeelslikeTH>','<#feelslikeTL>','<#TfeelslikeTL>','<#humidexTH>','<#ThumidexTH>');</pre> |
|||
|- |
|||
** Again before you enable this option, there is a facility lower down this setting page (under the heading '''Create database table''') where you can type some SQL to be run immediately, that can create the table you want this option to update, (although it could even populate any table with historic data, it is only intended for a small query). I am using a table that already exists as I have used it for testing changes to my PHP scripts, so I did not need to create a table before I enabled the query shown above. |
|||
|<#ProgramUpTime> |
|||
|How long Cumulus has been running, e.g. "7 hours 55 minutes" |
|||
|- |
|||
|<#CpuName> |
|||
|{{Version badge 1}}CPU type, e.g. "Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz" (not available on MX) |
|||
|- |
|||
|<#CpuCount> |
|||
|Number of processors, e.g. "4" |
|||
|- |
|||
|<#MemoryStatus> |
|||
|{{Version badge 1}}Free and total system RAM, e.g. "4619/8191 MB (free/total)" (not available on MX) |
|||
|- |
|||
|<#DisplayMode> |
|||
|{{Version badge 1}}Screen display mode, e.g. "1680x1050, 32 bit" (not available on MX) |
|||
|- |
|||
|<#AllocatedMemory> |
|||
|{{Version badge 1}}Amount of memory allocated to Cumulus, e.g. "18.76 MB" (not available on MX) |
|||
|- |
|||
|<#DiskSize> |
|||
|{{Version badge 1}}Size of disk on which Cumulus is running, e.g. "931.51 GB" (not available on MX) |
|||
|- |
|||
|<#DiskFree> |
|||
|{{Version badge 1}}Free space on disk on which Cumulus is running, e.g. "515.36 GB" (not available on MX) |
|||
|} |
|||
===== Standard Monthly table ===== |
|||
== Miscellaneous == |
|||
*3.''Standard log file upload'' |
|||
All tags are available in all flavours, as far as I know, although their output might vary, and which input/output parameters they permit might vary between Cumulus 1 and MX. |
|||
**Cumulus starts a new log file for each new month, that is why this is called the monthly log. |
|||
**This database table has one row for each line in any monthly log and therefore the same table contains all months. |
|||
{| class="wikitable" border="1" |
|||
** This feature takes the set of values that MX has just added to the monthly log file, and soon afterwards if this feature is enabled, MX inserts those same values into a new row in a database table. |
|||
|- |
|||
#If you don't have a table in your database for this upload (skip to step after SQL if you do), first |
|||
!style="width:150px" |Web tag_name |
|||
#* Choose Table name - the default table name is "Monthly", but you can choose any other name |
|||
!style="width:900px" | Function |
|||
#*Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message |
|||
|- |
|||
# Now find "Create database table" section below the Save button and click '''Create Monthly'''. |
|||
|<#LatestError> |
|||
#* MX will confirm when table has been created. |
|||
|Displays the last error from the Cumulus 1 error log. (The value is cleared when you click the error light in Cumulus 1).<br /> |
|||
#* The SQL used to create the table is (columns marked NOT NULL have been in use for all Cumulus versions, the other columns have been added from various different versions) <pre>CREATE TABLE Monthly ('LogDateTime', 'DATETIME NOT NULL', 'Temp', 'decimal(4,1) NOT NULL', 'Humidity', 'decimal(4,1) NOT NULL', |
|||
Note: This tag displays ''all'' errors, even if they do not cause the error light to flash in Cumulus 1. Although this tag and the next 3 are in MX, none of them are actually used (as at April 2020). |
|||
'Dewpoint', 'decimal(4,1) NOT NULL', 'Windspeed', 'decimal(4,1) NOT NULL', 'Windgust', 'decimal(4,1) NOT NULL','Windbearing' 'smallint(3) unsigned zerofill NOT NULL', |
|||
|- |
|||
'RainRate', 'decimal(4,$rainDec) NOT NULL', 'TodayRainSoFar', 'decimal(4,$rainDec) NOT NULL', 'Pressure', 'decimal(6,2) NOT NULL', 'Raincounter', 'decimal(6,2) NOT NULL', |
|||
|<#LatestErrorDate> |
|||
'InsideTemp', 'decimal(4,1) NOT NULL', 'InsideHumidity', 'decimal(4,1) NOT NULL', 'LatestWindGust', 'decimal(5,1) NOT NULL', 'WindChill', 'decimal(4,1) NOT NULL', |
|||
|The date of the latest error logged to the error log window, using the system short date format. Gives dashes when latest error is reset |
|||
'HeatIndex', 'decimal(4,1) NOT NULL', 'UVindex', 'decimal(4,1)', 'SolarRad', 'decimal(5,1)', 'Evapotrans', 'decimal(4,1)', 'AnnualEvapTran', 'decimal(5,1)', |
|||
|- |
|||
'ApparentTemp', 'decimal(4,1)', 'MaxSolarRad', 'decimal(5,1)', 'HrsSunShine', 'decimal(3,1)', 'CurrWindBearing', 'varchar(3)', 'RG11rain', 'decimal(4,1)', |
|||
|<#LatestErrorTime> |
|||
'RainSinceMidnight', 'decimal(4,1)', 'WindbearingSym', 'varchar(3)','CurrWindBearingSym', 'varchar(3)', 'FeelsLike', 'decimal(4,1)') COMMENT = "Monthly logs from Cumulus";</pre> |
|||
|The time of the latest error logged to the error log window, using the system short time format. Gives dashes when latest error is reset |
|||
|- |
|||
|<#ErrorLight> |
|||
|1 if the 'error' light is flashing, 0 if not |
|||
|- |
|||
|<#version> |
|||
|The version of Cumulus in use e.g. '1.9.4' or '3.4.1' |
|||
|- |
|||
|<#build> |
|||
|The build of Cumulus in use e.g. '10992' for latest Cumulus 1 patch |
|||
(Cumulus MX is under development so new builds are released frequently) |
|||
|- |
|||
|<#NewBuildAvailable> |
|||
|'''Only available from release 3.7.0''' onwards, it is checked on start-up and once a day thereafter at a random time |
|||
*Returns a boolean value |
|||
**0 - MX running the latest build available |
|||
**1 - MX is running an earlier build that the latest public release |
|||
|- |
|||
|<#NewBuildNumber> |
|||
|'''Only available from release 3.7.0''' onwards, it is checked on start-up and once a day thereafter at a random time |
|||
Displays the latest public release build number - eg. b3089 |
|||
|- |
|||
|<#realtimeinterval> |
|||
|The realtime update interval in seconds (integer) |
|||
|- |
|||
|<#interval> |
|||
|The web site update interval in minutes (integer) |
|||
|- |
|||
|<#rollovertime> |
|||
|The time that the logs rollover to the next day: 'Midnight', '9 am' or '10 am' |
|||
This is the end of the meteorological day, so if during Daylight Saving Time it is "10 am", then on the day DST ends it will return to "9 am" ensuring every meteorological day is exactly 24 hours long. If the time is "Midnight" or during DST it is "9 am", then days will be 23 or 25 hours long just on day clocks change, 24 hours otherwise. |
|||
|- |
|||
|<#update> |
|||
|The date and time of the last web site update |
|||
|- |
|||
|<#LastDataReadT> |
|||
|The date/time data was last read from the station |
|||
|- |
|||
|<#stationtype> |
|||
|The weather station [https://cumuluswiki.org/a/Cumulus.ini#Section:_Station model] description (you choose what text appears for this on 'Display' settings screen within Configuration menu - the field is at the bottom left of that screen). |
|||
|- |
|||
|<#latitude> |
|||
|The station [http://en.wikipedia.org/wiki/Latitude latitude] (as you entered during setup). |
|||
Supports an optional 'dp' parameter, if supplied, instead of the usual web-encoded text format with degrees/minutes/seconds, the result is in decimal degrees to the specified number of decimal places. E.g<br /> |
|||
<#latitude> gives "N 59& deg;&nbsp;14&#39;&nbsp;33&quot;" for N 59 14 33<br /> |
|||
<#latitude dp=5> gives "59.24250" |
|||
If the "dp" parameter is supplied, then supplying "rc=y" in addition will cause any decimal comma to be converted to a decimal point. |
|||
|- |
|||
|<#longitude> |
|||
|The station [http://en.wikipedia.org/wiki/Longitude longitude] (as you entered during setup). Supports an optional 'dp' and 'rc' parameters as per the latitude tag. |
|||
|- |
|||
|<#altitude> |
|||
|The station [http://en.wikipedia.org/wiki/Altitude altitude] value (webtag outputs web encoded format containing figure, '&nbsp;' and units) in either feet or metres just as you entered during setup (so it is more complex to extract number for script arithmetric); e.g. '123&nbsp;m' |
|||
|- |
|||
|<#location> |
|||
|The station location (as you entered during setup) |
|||
|- |
|||
|<#longlocation> |
|||
|Longer description of the station location (as you entered during setup) |
|||
|- |
|||
|<#forum> |
|||
|URL of the forum (as you entered during setup) |
|||
For Cumulus 1, this defaults to a Sandaysoft URL that is no longer available, for MX this defaults to the current support forum hosted by "Freddie" web server site |
|||
|- |
|||
|<#webcam> |
|||
|URL of the webcam (as you entered during setup). Default is blank. Can be used to link to any other web page that you host (Cumulus does not verify that it is a web can, that is just a label, and the label can be changed on each standard web page individually) |
|||
|- |
|||
|<#graphperiod> |
|||
|The number of hours displayed by the graphs, as set using '''Configuration''' menu, ''Display'' settings screen 'Detailed Chart Period' |
|||
|- |
|||
|<#dailygraphperiod> |
|||
|The number of days displayed by the graphs, as set using '''Configuration''' menu, ''Display'' settings screen 'Daily Chart Period' (available from build 1098) |
|||
|- |
|||
|<#LatestNOAAMonthlyReport> |
|||
|Gives file name of latest auto-saved NOAA monthly report |
|||
|- |
|||
|<#LatestNOAAYearlyReport> |
|||
|Gives file name of latest auto-saved NOAA yearly report |
|||
|} |
|||
==Units== |
|||
Apply to Cumulus 1 and MX, no optional input nor output parameters. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:600px" | Function |
|||
|- |
|||
|<#tempunit> |
|||
|Unit of temperature being used (Set in Cumulus as [http://en.wikipedia.org/wiki/Centigrade Celsius] or [http://en.wikipedia.org/wiki/Fahrenheit Fahrenheit]) values "&deg;C" or "&deg;F" |
|||
|- |
|||
|<#tempunitnodeg> |
|||
|The temperature units being used, without a degree symbol, i.e. "F" or "C" |
|||
|- |
|||
|<#pressunit> |
|||
|Unit of measure for pressure. Possible values: "mb", "hPa", "in" |
|||
|- |
|||
|<#rainunit> |
|||
|Unit of measure for rain fall. Possible values: "mm" or "inches" |
|||
|- |
|||
|<#windunit> |
|||
|Unit of measure for wind speed. Possible values: "m/s", "mph", "km/h", "kts" |
|||
|- |
|||
|<#windrununit> |
|||
|Unit of measure for wind run (distance). Possible values: "km", "miles", "km", "nm" (for wind speeds in m/s, mph, km/h, kts) |
|||
|- |
|||
|<#cloudbaseunit> |
|||
|The units used for cloudbase value. Possible values: "ft" or "m" |
|||
|} |
|||
==Date & Time== |
|||
Both Cumulus 1 and MX support all of these, most of these web tags can be used with output parameters. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:600px" | Function |
|||
|- |
|||
|<#date> |
|||
|The current date |
|||
|- |
|||
|<#time> |
|||
|The current time and date. Example result: 18:30 on 30 December 2009. If you simply wish the time, use next tag (below) |
|||
|- |
|||
|<#timehhmmss> |
|||
|The current time. Example format: 18:30:27 |
|||
|- |
|||
|<#timeUTC> |
|||
|The current UTC date/time rather than local date/time |
|||
|- |
|||
|<#minute> |
|||
|The current time, just the minutes. Example format: 07 |
|||
|- |
|||
|<#hour> |
|||
|The current time, just the hour. Example format: 07 |
|||
|- |
|||
|<#day> |
|||
| The current day as a 2-digit number. Example format: 07 |
|||
|- |
|||
|<#dayname> |
|||
| The current day as a word. For example, Monday |
|||
|- |
|||
|<#shortdayname> |
|||
| The current day as a shortened word. Example format: Mon |
|||
|- |
|||
|<#month> |
|||
|The current month as a 2-digit number. Example format: 07 |
|||
|- |
|||
|<#monthname> |
|||
|The current month as a word. Example format: July |
|||
|- |
|||
|<#shortmonthname> |
|||
|The current month as a shortened word. Example format: Jul |
|||
|- |
|||
|<#year> |
|||
|The current year as a 4-digit number. Example format: 2009 |
|||
|- |
|||
|<#shortyear> |
|||
|The current year as a 2-digit number. Example format: 09 |
|||
|- |
|||
|<#metdate> |
|||
|The current meteorological date. After rollover time on current calendar date, this date will be the same as the current date. If using a 9am/10am rollover, then between midnight and 9am/10am the <#metdate> will be the previous calendar day. |
|||
Can be used with relevant format parameters to indicate current meteorological day on todayT.htm template page, meteorological month on thismonthT.htm template page, or meteorological year on thisyearT.htm template page |
|||
|- |
|||
|<#metdateyesterday> |
|||
|The previous meteorological date. If using a 9am/10am rollover, then between midnight and 9am/10am the <#metdateyesterday> will be the calendar day before that returned by <#yesterday>, otherwise both return same. |
|||
Can be used with relevant format parameters to indicate correct day on yesterdayT.htm template page, and can be used to return latest day stored on [[dayfile.txt]] and NOAA report for latest month. |
|||
|- |
|||
|<#yesterday> |
|||
|Yesterdays date |
|||
|- |
|||
|<#rollovertime> |
|||
|The time that the logs rollover to the next day: 'Midnight', '9 am' or '10 am' |
|||
|- |
|||
|<#update> |
|||
|The date and time of the last web site update |
|||
|- |
|||
|<#timeJavaScript> |
|||
|{{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. |
|||
Note that UTC is calculated using 9192631770 times a particular transition time for Caesium 133 as a basis for 1 second. GMT (Greenwich Mean Time) is calculated on the basis that 1 second is 1/86400 of the time taken for a whole (day) rotation of the Earth. UT1 (or solar time) is calculated from various space measurements. Periodically, leap seconds are added to UTC to realign it with UT1, but these leap seconds are not added to the count of milliseconds represented by this web tag. |
|||
Do be aware that some devices will use a 32 bit signed integer to represent this number, and that will stop working on 19 January 2038, the year 2038 problem for computing world. |
|||
|- |
|||
|<#timeUnix> |
|||
|{{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). |
|||
|- |
|||
|<#LastDataReadT> |
|||
|The date/time data was last read from the station. Default format for this tag is like this example '''18:30 on 30 December 2009''', but output parameters for both date and time can modify this to include seconds in 1.9.x builds and most MX builds such as per this example '<#LastDataReadT format="yyyy-MM-dd HH:mm:ss">'. |
|||
|- |
|||
|<#DaysSince30Dec1899> |
|||
|Day count (gives whole and fractional part) Example: 41250.6523310301 |
|||
|- |
|||
|<#recordsbegandate> |
|||
|Date when records began (appears twice on "recordT.htm" provided in standard web page, and used to calculate next tag, but ignored for all other Cumulus processing). Any output parameters valid for a date can be used here, don't forget differences in modifiers for Cumulus 1 and MX. There is no time associated with this web tag. The default format is like 30 December 2009, please note although this web tag reports the value associated with [b]StartDate=dd/MM/yyyy[/b] (see [[Cumulus.ini#Section:_Station]]), the format there is short-date format and different to default format for this web tag. |
|||
|- |
|||
|<#DaysSinceRecordsBegan> |
|||
|Day count since Cumulus records started |
|||
|} |
|||
==Current Conditions== |
|||
The web tags/token shown here are mainly determined by which appear on "Now" page (index.htm). |
|||
Rainfall this month and this year are included here for consistency with supplied web templates (indexT.htm, thismonthT.htm, and thisyearT.htm) and with the dashboard 'Now' part of the Cumulus MX user; although you might expect to find them listed in tables for this month and this year, those web pages do not show these derivatives. |
|||
#With the table existing, all you need to do is: |
|||
Those listed here cover both measurements obtained from a weather station (like air temperature, wind speed and direction, humidity and barometric pressure); and all the derived values (like humidex, feels like, apparent temperature, wind chill and heat index). |
|||
#* Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQL quoted above] to happen automatically. |
|||
#* Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message. |
|||
#* The upload you select here will happen every time MX creates a new line in the monthly log file, it might be every 10 minutes, but you may have configured a different interval. |
|||
#Separately, to populate your table with past rows: |
|||
#* If you are using Windows, open a command window in the folder where "CumulusMX.exe" is found. Type <tt>ExportMySql.exe monthly</tt> |
|||
#*If you are using another operating system, send the following instruction to the terminal in the folder where you installed MX. <tt>sudo mono ExportMySql.exe monthly</tt> |
|||
Note however, that the derived values calculated for Cumulus 1 and for MX may not agree, see derived value section within Recent History tags section for examples. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:600px" | Function |
|||
|- |
|||
|colspan="2" style="background:lightgray;"|Temperature |
|||
|- |
|||
|<#temp> |
|||
|The outside (air) temperature |
|||
|- |
|||
|<#intemp> |
|||
|The inside temperature |
|||
|- |
|||
|<#temptrend> |
|||
|The average rate of change in temperature over the last three hours. Trend = (temp_now - temp_3hrs_ago) / 3 |
|||
|- |
|||
|<#temptrendtext> |
|||
|Temperature change over the last three hours - Rising/Falling/Steady (values can be set in strings.ini) |
|||
|- |
|||
|<#temptrendenglish> |
|||
|Temperature change over the last three hours - Rising/Falling/Steady (for use by [[Webtags_as_boolean_operators_in_HTML|HTML]], [[Editing_content_of_a_webpage_using_either_HTML_or_Script|javascript]] etc, values can't be changed) |
|||
|- |
|||
|<#TempChangeLastHour> |
|||
|The change in temperature over the last hour |
|||
|- |
|||
|<#heatindex> |
|||
|Current [[heat index]]. The referenced page in weather terminology section of this Wiki explains it. |
|||
|- |
|||
|<#humidex> |
|||
|Current [http://en.wikipedia.org/wiki/Humidex Humidex] |
|||
|- |
|||
|<#apptemp> |
|||
|The [[Apparent_temperature|apparent]] temperature. The referenced page in weather terminology section of this Wiki explains it. The formula used is that defined by BOM. Although at temperatures above 20°C (68°F) Feels like reports an "apparent temperature" it uses a different formula. |
|||
|- |
|||
|<#wchill> |
|||
|The current [[wind chill]] temperature. The referenced page in weather terminology section of this Wiki explains it. For temperatures below 10°C (50°F) Feels like reports the same value. |
|||
|- |
|||
|<#feelslike> |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
===== Table created from items updated at standard interval ===== |
|||
[[File:Badge vMx.png]]Not available in all MX versions. Please see sub-section below this table regarding availability by MX versions if you are using a MX version earlier than 3.6.10. |
|||
*4. ''Custom upload - minutes interval'' |
|||
The current [[Feels_Like|Feels Like]] temperature. The referenced page in weather terminology section of this Wiki explains it. |
|||
** One way you could use this option, is to replace the monthly log file upload if you wanted to change the schema, by leaving out some columns if your weather station is not able to measure all the derivatives included in the standard schema. |
|||
|- |
|||
** You could use this option to add columns that represent fields in your Extra Sensor log file, by specifying the corresponding web tags |
|||
|<#IsFreezing> |
|||
** This feature allows you to specify your own SQL for an upload to be repeated every NN minutes. Unlike the Monthly log file upload option you choose what schema (columns) are in the table that you are uploading a new row to and indeed exactly what SQL is used. |
|||
|If outside temperature is at or below 0°C/32°F. 0=Above freezing, 1=Below freezing |
|||
**Apart from the need to press the Save button that follows all the options, there are 3 items just for this option: |
|||
|- |
|||
**# A tick box to enable or disable this upload (so you can leave the SQL recorded, but stop running it when you like. |
|||
|<#chillhours> |
|||
**# The SQL you want to run, it should include INSERT IGNORE (or REPLACE or UPDATE) to insert/replace/update a row, include (as all SQL needs) the name of the table, include the columns to be updated and include the values either expressed as web tags or derived from a sub-query. |
|||
|The number of [[Heat/cold_degree_days_and_Chill_hours#Chill_Hours_and.2For_Air_Frost|'chill hours']] so far this season (threshold temperature and start date are configurable). |
|||
**# A drop down for the number of minutes between runs, the default is 10, but if your weather station updates less frequently, maybe you will choose 15, 20, 30, or 60 as the interval out of the 11 available in drop down. |
|||
|- |
|||
|colspan="2" style="background:lightgray;"|Humidity |
|||
|- |
|||
|<#hum> |
|||
|The outside [http://en.wikipedia.org/wiki/Humidity humidity] |
|||
|- |
|||
|<#inhum> |
|||
|The inside humidity |
|||
|- |
|||
|<#dew> |
|||
|The current dew point |
|||
|- |
|||
|<#wetbulb> |
|||
|Estimated [http://en.wikipedia.org/wiki/Wet_bulb wet bulb] temperature, can be seen if hover over 'Dewpoint' on Cumulus 1 main screen |
|||
|- |
|||
|colspan="2" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#rfall> |
|||
|The total rainfall so far today |
|||
|- |
|||
|<#rrate> |
|||
|The current rainfall rate |
|||
|- |
|||
|<#rhour> |
|||
|The rainfall in the last hour |
|||
|- |
|||
|<#rmidnight> |
|||
|The total rainfall since midnight. Useful if you don't use midnight as your start of day |
|||
|- |
|||
|<#r24hour> |
|||
|Amount of rain in the last 24 hours |
|||
|- |
|||
|<#LastRainTipISO> |
|||
|Fixed ISO format output giving date and time of last rain gauge tip (e.g 2010-09-06 06:09) The format is a shown, and cannot be modified by locale or addition of parameters. |
|||
|- |
|||
|<#LastRainTip> |
|||
| (available from release 3.6.1) Date/time of last rain gauge tip (default format is as set in locale) '''PLEASE NOTE: this web tag WILL accept any date and time output format modifiers''' |
|||
|- |
|||
|<#MinutesSinceLastRainTip> |
|||
|The number of minutes since the last rain gauge tip, in whole numbers, rounded down |
|||
|- |
|||
|<#IsRaining> |
|||
|For [[Rain_measurement#Optical_Rain_Gauge| Hydreon RG-11 devices]], shows the current rain state. 0=No rain, 1=It's raining |
|||
|- |
|||
|<#rmonth> |
|||
|The total rainfall so far this month |
|||
|- |
|||
|<#ryear> |
|||
|Annual rainfall total for rainfall season year (i.e. starting month as set on Configuration menu, station screen, Annual rainfall frame) |
|||
|- |
|||
|<#ConsecutiveRainDays> |
|||
|The number of days up to (but not including) today where it has rained every day. The threshold amount of rain required to determine a rain day is configurable via the RainDayThreshold setting in cumulus.ini, the units for the threshold are the same as your rain units, meteorologists exclude dew (and other times when single tip of recorder). |
|||
|- |
|||
|<#ConsecutiveDryDays> |
|||
|The number of days up to (but not including) today since it last rained. The threshold amount of rain required to determine a rain day is configurable via the RainDayThreshold setting in cumulus.ini the units for the threshold are the same as your rain units |
|||
|- |
|||
|colspan="2" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#press> |
|||
|The [http://en.wikipedia.org/wiki/Sea_level_pressure sea level pressure] |
|||
|- |
|||
|<#presstrendval> |
|||
|The average rate of pressure change over the last three hours. |
|||
|- |
|||
|<#presstrend> |
|||
|The pressure trend in words - values can be set in the 'strings.ini' file |
|||
|- |
|||
|<#presstrendenglish> |
|||
| a singe word description for the pressure trend - Rising/Falling/Steady (for use by [[Webtags_as_boolean_operators_in_HTML|HTML]], [[Editing_content_of_a_webpage_using_either_HTML_or_Script|javascript]] etc, values can't be changed) |
|||
|- |
|||
|<#altimeterpressure> |
|||
|Altimeter pressure. Pressure corrected to sea level using the station's altitude only. Same as sea-level pressure for non-Davis stations. |
|||
|- |
|||
|colspan="2" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#wlatest> |
|||
|Current wind speed reading from console. Corresponds to 'latest' on the Cumulus main screen. |
|||
|- |
|||
|<#bearing> |
|||
|Current wind bearing in degrees |
|||
|- |
|||
|<#currentwdir> |
|||
|Current wind bearing as a compass point - e.g. ESE |
|||
|- |
|||
|<#wspeed> |
|||
|The 10-minute average, if you have Cumulus set to calculate a 10-minute average. Otherwise, it's the latest 'wind' value from the console (i.e. the current speed as determined by the station). Corresponds to 'average' on the Cumulus main screen. |
|||
|- |
|||
|<#avgbearing> |
|||
|Average wind bearing in degrees over last 10 minutes. Range 1-360, 0=Calm |
|||
|- |
|||
|<#wdir> |
|||
|Average wind bearing over last 10 minutes as a [http://en.wikipedia.org/wiki/Compass compass] point - e.g. ESE |
|||
|- |
|||
|<#wgust> |
|||
|The highest wind reading in the last 10 minutes. Corresponds to 'gust' on the Cumulus main screen. |
|||
|- |
|||
|<#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. |
|||
|- |
|||
|<#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. Reading interval x varies by station type. |
|||
|- |
|||
|<#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! |
|||
|- |
|||
|<#beaufort> |
|||
|The current wind speed on the [http://en.wikipedia.org/wiki/Beaufort_scale Beaufort scale] (e.g. F8) |
|||
|- |
|||
|<#beaufortnumber> |
|||
|The current wind speed on the Beaufort scale, without a leading "F", e.g. "6" |
|||
|- |
|||
|<#beaudesc> |
|||
|The current wind speed Beaufort description (e.g. "Gale") |
|||
|- |
|||
|<#BearingRangeFrom> |
|||
|The 'lowest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in cumulus.ini) |
|||
|- |
|||
|<#BearingRangeTo> |
|||
|The 'highest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in cumulus.ini) |
|||
|- |
|||
|<#BearingRangeFrom10> |
|||
|The 'lowest' clockwise bearing in the last 10 minutes (or as configured using AvgBearingMinutes in cumulus.ini), rounded down to nearest 10 degrees |
|||
|- |
|||
|<#BearingRangeTo10> |
|||
|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 |
|||
|- |
|||
|<#cloudbase> |
|||
|Calculated [http://en.wikipedia.org/wiki/Cloud_base cloud base] |
|||
|- |
|||
|<#cloudbasevalue> |
|||
|Current calculated cloud base without units |
|||
|- |
|||
|<#UV> |
|||
|Current [http://en.wikipedia.org/wiki/Uv_index UV index]. Requires your station to have a UV sensor. |
|||
|- |
|||
|<#SolarRad> |
|||
|Current [http://en.wikipedia.org/wiki/Solar_radiation solar radiation]. Requires your station to have a solar sensor. |
|||
|- |
|||
|- |
|||
|<#Light> |
|||
|Current Current light level in Lux. Requires your station to have a solar sensor. Only applies to Fine Offset stations. |
|||
|- |
|||
|[[Forecast_webtag|<#forecast>]] |
|||
|The current forecast |
|||
|- |
|||
|<#forecastenc> |
|||
|The same as <#forecast> but with all reserved HTML characters, and those above character code 159, encoded as HTML entities |
|||
|- |
|||
|<#forecastnumber> |
|||
|The number relating to the current forecast entry in the [[strings.ini]] file. If your station is not providing it's own forecast and Cumulus is not calculating one then 0 (zero) is returned. Note: two negative numbers can be returned by Cumulus: -1 (neg 1) = Exceptional Fine, -26 (neg 26) = Exceptional Bad |
|||
|- |
|||
|<#cumulusforecast> |
|||
|Always gives Cumulus (Zambretti) forecast, even if the <#forecast> tag provides a station forecast |
|||
|- |
|||
|<#cumulusforecastenc> |
|||
|The same as <#cumulusforecast> but with all reserved HTML characters, and those above character code 159, encoded as HTML entities |
|||
|- |
|||
|<#wsforecast> |
|||
|Always gives station forecast (if available) |
|||
|- |
|||
|<#wsforecastenc> |
|||
|The same as <#wsforecast> but with all reserved HTML characters, and those above character code 159, encoded as HTML entities |
|||
|- |
|||
|<#currcond> |
|||
|Represents the value entered on the screen within Cumulus for the Current Weather condition, or the value as held in the [[currentconditions.txt]] file. Any reserved HTML characters are encoded as HTML entities |
|||
|- |
|||
|<#currcondenc> |
|||
|The same as <#currcond> but also has all characters above (decimal base) code 159 encoded as HTML entities for example this would encode any use of symbol for degree. |
|||
|} |
|||
==== Feels Like ==== |
|||
===== Table updated at real time interval ===== |
|||
Feels like temperature was first made available, just for current conditions at MX version 3.5.4. In version 3.6.0. it was extended to add max/min for each day, each month, each year, and all time. In version 3.6.11 it was added to recent history. |
|||
*5. ''Realtime.txt upload'' |
|||
** Cumulus MX can be set to recreate a file called [[Realtime.txt]] on a very frequent basis. The real time interval defines the time from the end of doing one real time update until the start of the next real time update. The file is recreated, in that unlike other log files, MX does not add new rows in each update, the file only ever contains a single line of values. |
|||
***MX does not use this realtime.txt file in any of its supplied components, so that file by default is not available on your web server. |
|||
***There is the ability elsewhere (Internet Settings screen) to upload this log file to your web server, should you wish to use it. The most common use is as a source for Ajax (JavaScript based) updating of web pages on the same very frequent basis. |
|||
**The option being described here is an alternative to having that log file on your web server, instead MX in this option MX updates a database table, adding a new row at the same very frequent interval. |
|||
***In this standard option, where you cannot specify which columns to include, MX will put into a database table row, the same set of values it would put into that log file on recreation. |
|||
***It is important to stress, this database table has rows added, so it is not equivalent to the uploaded file that contains a single line. |
|||
#If you don't already have a table in your database with the right columns for this upload, first |
|||
#* Choose Table name - the default table name is "Realtime", but you can choose any other name |
|||
#*Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message |
|||
# Now find "Create database table" section below the Save button and click '''Create Realtime'''. |
|||
#* MX will confirm when table has been created. |
|||
#With the table existing, there are 3 steps left: |
|||
The figures quoted for this derivative vary between versions: |
|||
# Enable - tick here when you are ready for this action of creating new rows to happen automatically. |
|||
* The first formula was used from MX version 3.5.4 (25 Apr 2020) build 3075 until version 3.6.7 (4 June 2020) build 3083 |
|||
# Enter in the text box a retention string in format '''retainVal=NNN retainUnit=XXXX''' where NNN is a number from 1 to 3 digits long, and XXX is a time unit e.g. second, minute, hour, day, week, month, quarter, or year. |
|||
* The second formula, which was coded incorrectly, and so gave strange results, applied in versions 3.6.8 to 3.6.9 (build 3084, 3085) |
|||
#* Because the updates are so frequent this database table grows very quickly, and you need to say when it should delete the older rows so the table never has too many rows. If you think about it, after a few days, you probably do not need to look at this very detailed level of values information within a day. In that case set retention to delete after a few days ''retainVal=3 retainUnit=day''. |
|||
* The third, and hopefully final, formula applies from version 3.6.10 (build 3086). |
|||
# Now move down the screen and click the '''Save''' button, and wait for MX to pop up '''Settings Saved''' message. |
|||
===== Another table unpdated at an interval measured in seconds ===== |
|||
A php script for adding feels like as calculated in version 3.6.10 to any standard log line created either without feels like, or with an older (now incorrect) calculation, can be downloaded from [https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=18096 Create Missing topic on support forum]. Obviously, this calculates from the small sub-set of current conditions that have been logged, and is not as accurate at deriving maximum and minimum as derivation made as each reading is processed by MX (so including all current conditions). |
|||
*6. ''Custom upload - seconds interval'' |
|||
==Extra Sensors Davis (and a few others)== |
|||
** This feature allows you to specify your own SQL for an upload to be repeated every NN seconds. This caters for when you want something like the values in "realtime.txt" but want to specify your own schema (set of column names) or your own interval between updates (independent of what has been selected for real-time interval). Like the other custom options, this might be because you have extra sensors or do not have sensors for all items in standard log file. |
|||
**Apart from the Save button below all options, there are 3 items specifically for this option: |
|||
**# A tick box to enable or disable this upload (so you can leave the SQL recorded in Cumulus.ini for when you want to use it again, but start/stop running it as and when you like). |
|||
**# The SQL you want to run, it should include INSERT IGNORE (or REPLACE or UPDATE) to insert a row, the name of the table, the columns to be updated and the values you include in your SQL are expressed as web tags. You can have more than one SQL statement in this box (end each with semi-colon) so you might want to add a delete "DELETE FROM YourTableName WHERE LogDateTime < DATE_SUB(NOW(), INTERVAL 7 DAY);" after your update/insert command to replicate the retention option of the previous feature, in this case deleting rows over a week old. |
|||
**# The number of seconds between runs, the default is 10, but if your weather station updates less frequently, maybe you will choose 40 or 60 as the interval. In theory the number of seconds specified here might represent anything between how frequently your weather station reports readings and several hours. |
|||
=== Alarms === |
|||
These web tags hold current values for additional sensors supported by Cumulus. Most of the tags in this section relate to Davis stations, but not exclusively. |
|||
This is identical to Cumulus 1 functionality, apart from using a new default location for the files "\CumulusMX\interface\sounds", and the list of alarms available is extended in MX compared to Cumulus 1. |
|||
Some tags are only available for certain builds, see general tip at top of page to check for the build you are using. In particular Cumulus 1 has fewer channels available. |
|||
The alarms available are already explained [[Cumulus.ini#Section:_Alarms|elsewhere]] in this wiki, so are not repeated here. |
|||
There are no web tags for past values from extra sensors, see the [[Extra_Sensor_Files]] page for information about log files from where you can extract those values. |
|||
Some alarms are shown at the bottom of the Dashboard page of this administrative interface. They also feed a set of [[Webtags#Alarms|Webtags|web tags]] so you can use them in web pages. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px"|Web tag_name |
|||
!style="width:600px"|The related description can be changed in 'strings.ini', but below are default descriptions that will be shown in viewer/editor |
|||
|- |
|||
|<#ExtraTemp1> |
|||
|Extra temperature channel 1 |
|||
|- |
|||
|<#ExtraTemp2> |
|||
|Extra temperature channel 2 |
|||
|- |
|||
|<#ExtraTemp3> |
|||
|Extra temperature channel 3 |
|||
|- |
|||
|colspan="2"|... and so on up to <#ExtraTemp10> = Extra temperature channel 10 |
|||
|- |
|||
|<#ExtraDP1> |
|||
|Extra dew point channel 1 |
|||
|- |
|||
|<#ExtraDP2> |
|||
|Extra dew point channel 2 |
|||
|- |
|||
|<#ExtraDP3> |
|||
|Extra dew point channel 3 |
|||
|- |
|||
|colspan="2"|... and so on up to <#ExtraDP10> |
|||
|- |
|||
|<#ExtraHum1> |
|||
|Extra humidity channel 1 |
|||
|- |
|||
|<#ExtraHum2> |
|||
|Extra humidity channel 2 |
|||
|- |
|||
|<#ExtraHum3> |
|||
|Extra humidity channel 3 |
|||
|- |
|||
|colspan="2"|... and so on up to <#ExtraHum10> |
|||
|- |
|||
|<#SoilTemp1> |
|||
|Soil temperature 1 |
|||
|- |
|||
|<#SoilTemp2> |
|||
|Soil temperature 2 |
|||
|- |
|||
|colspan="2"|... and so on up to <#SoilTemp16> |
|||
|- |
|||
|<#SoilMoisture1> |
|||
|Soil moisture 1 |
|||
|- |
|||
|<#SoilMoisture2> |
|||
|Soil moisture 2 |
|||
|- |
|||
|colspan="2"|... and so on up to <#SoilMoisture16> |
|||
|- |
|||
|<#LeafTemp1> |
|||
|Leaf temperature 1 |
|||
|- |
|||
|<#LeafTemp2> |
|||
|Leaf temperature 2 |
|||
|- |
|||
|<#LeafWetness1> |
|||
|Leaf wetness 1 |
|||
|- |
|||
|<#LeafWetness2> |
|||
|Leaf wetness 2 |
|||
|} |
|||
== |
=== FTP Now === |
||
This is similar to the option in the file menu of Cumulus 1 to do an update now. Depending on which build of MX you are using, the functionality varies. On latest build it does whatever updates are set up to happen at normal updating interval whether these are by FTP to your web site, or by copying files between local and remote filenames with path (although both could be on same device). |
|||
{{Version badge 1}} Not available in Cumulus 1. |
|||
== Editing the Admin Interface == |
|||
[[File:Badge vMx.png]] Please see release announcements for when individual web tags become available. |
|||
The admin interface provided with MX is generated from some application programming interface (api) produced by MX engine, some JSON files specifying options, some JavaScript files populating content, some cascade styling sheet files determining look, and some HTML files specifying structure. Theoretically, all of this could be customised to suit you as the developer's choices might not match your desires. |
|||
This section applies only to those using Ecowitt GW1000 (Froggit DS1500) an interface unit that picks up various external sensors and sends the data via an application programming interface to MX which then generates the following web tags: |
|||
=== Caution against editing Admin Interface === |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:600px" |Function |
|||
|- |
|||
|<#GW1000FirmwareVersion> |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
The general advice is do not change any files that are part of the MX package, they are a package and therefore there are interdependencies. Also updating to a newer release is more complicated if you have edited any files, because you need to implement any changes in that release and they will overwrite any edits you have made. |
|||
[[File:Badge vMx.png]]GW1000 firmware version string |
|||
|} |
|||
The files as provided in the MX package are a compromise, for example they include reporting on solar measurements but not all weather stations include such measurements. |
|||
Given that the admin interface is not shared with anyone else, it could be argued its look and content is not that important. In particular this interface is the only way to change settings, so do not change anything that stops those setting screens from working! |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px"|Web tag_name |
|||
!style="width:600px"|The related description can be changed in 'strings.ini', but below are default descriptions that will be shown in the viewer/editor |
|||
|- |
|||
|<#AirQuality1> |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
Finally, if you don't like the look of the admin interface, then why are you looking at the admin interface? If it to change settings, does it matter how it looks? If you are looking at the admin interface to see your weather readings and derivations, then why not look at your web pages, as you can edit your web pages to show information in whatever way suits you. |
|||
[[File:Badge vMx.png]] see release announcements for version availability |
|||
=== Caution when updating if you have edited Admin Interface === |
|||
Air quality 1 |
|||
|- |
|||
|colspan="2"|... and so on up to <#AirQuality4> |
|||
|- |
|||
|<#LeakSensor1> |
|||
Remember, if you decide to download a new release if you overwrite any file(s) that you have edited, your edit will be lost. It is less likely that a new release will change the interface files than other files, but some releases do change these files. Remember, each release zip contains all MX files, even those not changed since previous release. The release notice will usually give some idea of whether interface files have changed, but it may not list which interface files have been added, modified, or removed. |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
=== General points for editing === |
|||
[[File:Badge vMx.png]] see release announcements for version availability |
|||
If you do decide to change any file, I suggest you maintain a back-up copy of the original elsewhere (so it can be gone back to) and you save the edited file under a new name (so you can't lose my edited file by installing a new release). |
|||
Leak sensor - 0 or 1 |
|||
|- |
|||
|colspan="2"|... and so on up to <#LeakSensor4> |
|||
|- |
|||
|<#LightningDistance> |
|||
If you are editing files, use Brackets, Notetab lite, notepad++, or on a Mac BB-edit, i.e. ''use an editor designed for code''. Do not use a word processor, a Microsoft or Google editor or Dreamweaver or any other web editor. The encoding that should be used is UTF, if your editor does not mention encoding, it is the wrong sort of editor! |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
=== Changing the look === |
|||
[[File:Badge vMx.png]] see release announcements for version availability |
|||
You need some understanding of Cascading Style Sheets (CSS) to do this, but all you need to do is to edit the relevant style sheet either in '''\CumulusMX\interface\css''' or in the relevant folder within the lib folder. Beware, making a change to make one web page in the admin interface look right, might ruin web page in the interface, so making changes is not easy! |
|||
Distance to last strike (same units as wind run - miles/km/nm) (Returns 0.0 if you don't have a sensor, GW1000 api returns max value you can put in a byte - 0xFF which translates to 158.4 miles = 255 km if have sensor but no strike detected yet, so MX translates that to '----') |
|||
|- |
|||
|<#LightningTime> |
|||
You can change the look, it is all defined in .css files. However, because MX makes use of standard libraries (bootstrap, datatables, alcapa etc.) there are a multitude of .css files used and it might not be easy to work out which one to edit. Each HTML page has links to a number of css files. |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
You will probably make use of developer functions in your browser to inspect any element whose look you wish to change to see where its different properties are defined. It is better to make any such edits at a high level, rather than on any CSS just for that particular element. But don't forget to check every web page in the interface still looks okay as if you do make a change to improve one page it may worsen another page. |
|||
[[File:Badge vMx.png]] see release announcements for version availability |
|||
As always when editing, keep a copy of original so you can go back to it; keep a copy of your edited file, so installing a new release does not lose you edited file. |
|||
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> |
|||
=== Removing Solar Figures === |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
If your weather station does not have solar instrumentation you might wish to remove some of the display elements that relate to that. Of course they will come back when the next release overwrites your change! |
|||
[[File:Badge vMx.png]] see release announcements for version availability |
|||
Number of strikes since midnight, default 0 |
|||
|- |
|||
|<#UserTemp1> |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
[[File:Badge vMx.png]] see release announcements for version availability |
|||
User Temperature 1 |
|||
support for the Ecowitt WH34 (other model types exist and are reported here as if WH34) soil and water temperature sensors |
|||
|- |
|||
|colspan="2"|... and so on up to <#UserTemp8> = User temperature 8 |
|||
|} |
|||
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 elsewhere in this article. |
|||
==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. |
|||
(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). |
|||
[[#No_Commas]] versions of the array are available for use in script. |
|||
=== Input Parameters === |
|||
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. |
|||
All values supplied for parameters must be whole numbers. |
|||
If you don't supply any parameters, the result is undefined for Cumulus 1, and an illegal web tag for MX. |
|||
<#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. |
|||
=== 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 === |
|||
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" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:600px" | Function |
|||
!style="width:600px" | Parameters example |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Time-stamp tag |
|||
|- |
|||
|<#RecentTS> |
|||
|Gives the timestamp of the data that will be returned for any other recent history tag that uses same '''d, h, and m''' parameters |
|||
|<#RecentTS h=3 m=1 format="HH:nn"> for cumulus 1; <#RecentTS h=3 m=1 format="HH:mm"> for cumulus MX |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Temperature & Humidity tags |
|||
|- |
|||
|<#RecentOutsideTemp> |
|||
|Outside Temperature |
|||
| <#RecentOutsideTemp h=3 m=1> <#tempunit> will display the temperature at the start of the period for which <#temptrend> is calculated |
|||
|- |
|||
|<#RecentWindChill> |
|||
|Wind Chill (if temperature is below 10°C or 50 °F, then the new Feels Like now available in MX (next item) will report this same value). |
|||
| <#RecentWindChill d=48 m=1> reports the wind chill temperature 2 days ago |
|||
|- |
|||
|<#RecentFeelsLike> |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
[[File:Badge vMx.png]] Available from version 3.6.11 (b.3087) onwards. |
|||
Feels Like Temperature |
|||
|<#RecentFeelsLike h=12 m=1> reports the feel like temperature 12 hours ago |
|||
|- |
|||
|<#RecentHumidex> |
|||
|{{Version badge 1}} Not available in Cumulus 1. |
|||
[[File:Badge vMx.png]] Available from version 3.7.0 (build 3089) onwards. |
|||
Canadian Humidity Index (humidex) Dimensionless - no units |
|||
|<#RecentHumidex h=3> reports humidex 3 hours ago |
|||
|- |
|||
|<#RecentDewPoint> |
|||
|Dew Point |
|||
| <#RecentDewPoint h=25> reports the dew point temperature just over a day ago |
|||
|- |
|||
|<#RecentHeatIndex> |
|||
|Heat Index |
|||
| <#RecentHeatIndex m=121> reports the heat index about 2 hours ago |
|||
|- |
|||
|<#RecentHumidity> |
|||
|Relative Humidity |
|||
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago) |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#RecentWindSpeed> |
|||
|Wind Speed |
|||
| <#RecentWindSpeed m=10> will display the average wind speed 10 minutes ago |
|||
|- |
|||
|<#RecentWindGust> |
|||
|Wind Gust |
|||
(reports maximum gust from build 1088 of version 1.9.4) |
|||
| <#RecentWindGust d=1 m=1> will report the wind gust at approximately the same time yesterday |
|||
|- |
|||
|<#RecentWindLatest> |
|||
|Wind Latest. Note: Wind 'Speed', 'Gust' and 'Latest' have the usual Cumulus meanings |
|||
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago) |
|||
|- |
|||
|<#RecentWindDir> |
|||
|Wind Direction (instantaneous) |
|||
| <#RecentWindDir m=10> will tell you which direction the wind was blowing from 10 minutes ago |
|||
|- |
|||
|<#RecentWindAvgDir> |
|||
|Wind Direction (average) |
|||
|<#RecentWindAvgDir d=6> will say what the calculated average wind direction was at this time at the start of the week |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#RecentPressure> |
|||
|Sea-level Pressure |
|||
| <#RecentPressure h=3 m=1> gives the sea level pressure when <#presstrendval> started tracking the pressure |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#RecentRainToday> |
|||
|Daily rain total from last roll-over to specified time |
|||
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago) |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Solar & UV |
|||
|- |
|||
|<#RecentSolarRad> |
|||
|Solar Radiation |
|||
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago) |
|||
|- |
|||
|<#RecentUV> |
|||
|UV Index |
|||
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago) |
|||
|} |
|||
=== Other weather derivatives === |
|||
Although Humidex, 'Apparent Temperature', 'Feels Like temperature' and others listed in Current Conditions section, are not available at all versions, they can be calculated in a script from recent 'outside temperature', 'wind speed', and 'relative humidity' values (using the same time selection for all). There are other derivatives that can be calculated similarly from a set of simultaneous values. Note that Cumulus 1 and MX do not always use identical formula, and although MX added Feels Like it has changed the formula a few times. |
|||
The relevant formulae using JavaScript, adjust for other languages, for some of these are shown below: |
|||
==== Canadian Humidity Index ==== |
|||
If you are in USA and use Fahrenheit instead of Celsius, you will need to omit the 5/9 term, but as the index is dimensionless no other conversion is needed. This example is for 3 hours ago, change the input parameters to suit your need. |
|||
Cumulus 1: |
|||
H = <#RecentOutsideTemp h=3> + 5/9 * (6.1094 * Math.exp(5417.753 *(1/273.16 - 1/ (273.16 + <#RecentDewPoint h=3> )))-10); |
|||
Cumulus MX: |
|||
svp = 6.112 * Math.exp((17.62 * <#RecentOutsideTemp h=3) / (243.12 + parseFloat(<#RecentOutsideTemp h=3))); |
|||
H = (5/9 * (<#RecentHumidity h=3> /100 * svp - 10)) + <#RecentOutsideTemp h=3; |
|||
==== Apparent Temperature and Feels Like ==== |
|||
Note this apparent temperature formula uses Celsius for temperature and '''metres per second''' for wind speed. You will need to do the appropriate conversions from the quoted recent history tags if you use different units. The Australian Apparent temperature formula is same for Cumulus 1 and MX: |
|||
var actualVaporPress = <#RecentHumidity h=3>/100) * 6.105 * Math.exp(17.27 * <#RecentOutsideTemp h=3>) / (237.7 + parseFloat(<#RecentOutsideTemp h=3>)))); |
|||
var appTempDegC = parseFloat(<#RecentOutsideTemp h=3) + (0.33 * actualVaporPress) - (0.7 * <#RecentWindSpeed h=3>) - 4; |
|||
Feels Like was implemented as a recent history web tag at version 3.6.11 (see [[#Feels_Like|Feels Like section below Current condition web tags]]) for the gradual introduction of feels like elsewhere. For earlier MX versions, and if you are using Cumulus 1, you can calculate it: |
|||
The formulas below use Celsius for temperature and '''km per hour''' for wind speed. Again, you will need to do the appropriate conversions from the quoted recent history tags if you use different units. |
|||
Calculation from recent history tags is much more complicated because there are 3 different calculations: Feels Like reports exactly same as wind chill for temperatures '''below''' 10°C or 50°F so the WC here should equal <#RecentWindChill h=3>: |
|||
<pre>if(<#RecentWindSpeed h=3> < 4.828) WC = <#RecentOutsideTemp h=3>; |
|||
else{ |
|||
wind_pow = Math.pow(<#RecentWindSpeed h=3>, 0.16); |
|||
WC = (13.12 + 0.1625 * <#RecentOutsideTemp h=3>) - (11.37 * wind_pow) + (0.3965 * <#RecentOutsideTemp h=3> * wind_pow);// Brackets used to ensure "+" is interpreted as addition not concatenation |
|||
} </pre> |
|||
For temperatures '''above''' 20°C or 68°F Feels Like uses a different way to calculate apparent temperature that it uses at these higher temperatures (this formula only used for 3.6.10 onwards): |
|||
<pre>var actualVaporPress = <#RecentHumidity h=3>/100) * 6.112* Math.exp((17.62 * <#RecentOutsideTemp h=3>)/(243.12 + <#RecentOutsideTemp h=3>)) / 10.0; // Not same as at build 3084 |
|||
/* uses kilometres per hour for wind speed */ |
|||
/* What Cumulus MX will use to calculate apparent temperature for feels like is changed very slightly */ |
|||
if(<#RecentWindSpeed h=3> > 72) <#RecentWindSpeed h=3> =72; |
|||
AT= (1.04 * <#RecentOutsideTemp h=3>) + (2 * actualVaporPress) - (0.1805553 * <#RecentWindSpeed h=3>) - 2.7;</pre> |
|||
For in-between temperatures it uses a more complicated merge of the two formulas for AT and WC as defined above: |
|||
<pre>app_temp_mult = (<#RecentOutsideTemp h=3> - 10) / 10; |
|||
wind_chill_mult = 1 - app_temp_mult; |
|||
FL= AT * app_temp_mult + WC * wind_chill_mult;</pre> |
|||
==Today== |
|||
Many of these web tags are used on the supplied '''todayT.htm''' template, and the supplied '''todayyest.html''' page within the MX admin interface. |
|||
For web tags that report values that refer to a particular time of day, there is a corresponding web tag that can give the time of day, shown in same row of table below. |
|||
Please note none of the time web tags can be modified by output parameters to give a date, but they can be changed from the default time format that is 'H:mm' (24 hour clock notation without leading zero for hour) for Cumulus 1 and MX. If you are using output modifiers to change how the time is reported, be careful to use ones that work for the flavour of Cumulus you are using (H and h are same for Cumulus 1, but not for MX; nn and mm are same for Cumulus 1, but not for MX). |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:650px" | Function |
|||
!style="width:150px" | Time tag_name |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Temperature & Humidity |
|||
|- |
|||
|<#tempTH> |
|||
|Today's highest temperature |
|||
|<#TtempTH> |
|||
|- |
|||
|<#tempTL> |
|||
|Today's lowest temperature |
|||
|<#TtempTL> |
|||
|- |
|||
|<#avgtemp> |
|||
|The [[Average_temperature|average]] temperature so far today (calculated from all temperature readings processed by Cumulus) |
|||
|n/a |
|||
|- |
|||
|<#temprange> |
|||
|The temperature range (<#tempTH> - <#tempTL>) so far today (Cumulus calculates all these tags using Celsius values, but outputs them in your chosen units) |
|||
|n/a |
|||
|- |
|||
|<#apptempTH> |
|||
|Today's high apparent temperature |
|||
|<#TapptempTH> |
|||
|- |
|||
|<#apptempTL> |
|||
|Today's low apparent temperature |
|||
|<#TapptempTL> |
|||
|- |
|||
|<#feelslikeTH> |
|||
|[[File:Badge vMx.png]] Available from version 3.6.10 (NOT AVAILABLE IN CUMULUS 1) |
|||
Today's high feels like temperature |
|||
Please see sub-section below current conditions if you are using an earlier 3.6.x version of MX. |
|||
|<#TfeelslikeTH> |
|||
|- |
|||
|<#feelslikeTL> |
|||
|[[File:Badge vMx.png]] Available from version 3.6.10 (NOT AVAILABLE IN CUMULUS 1) |
|||
Today's low feels like temperature |
|||
|<#TfeelslikeTL> |
|||
|- |
|||
|<#humidexTH> |
|||
|[[File:Badge vMx.png]] Available from version 3.7.0 (NOT AVAILABLE IN CUMULUS 1) |
|||
Today's high Canadian Humidity Index |
|||
Please see sub-section below current conditions if you are using Cumulus 1 or an earlier version of MX. |
|||
|<#ThumidexTH> |
|||
|- |
|||
|<#heatindexTH> |
|||
|Today's high heat index |
|||
|<#TheatindexTH> |
|||
|- |
|||
|<#wchillTL> |
|||
|Today's greatest wind chill (i.e. lowest temperature, highest wind speed) |
|||
|<#TwchillTL> |
|||
|- |
|||
|<#dewpointTH> |
|||
|Today's highest dew point |
|||
|<#TdewpointTH> |
|||
|- |
|||
|<#dewpointTL> |
|||
|Today's lowest dew point |
|||
|<#TdewpointTL> |
|||
|- |
|||
|<#humTH> |
|||
|Today's highest humidity |
|||
|<#ThumTH> |
|||
|- |
|||
|<#humTL> |
|||
|Today's lowest humidity |
|||
|<#ThumTL> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Precipitation |
|||
|- |
|||
|<#rrateTM> |
|||
|Today's maximum rain rate |
|||
|<#TrrateTM> |
|||
|- |
|||
|<#hourlyrainTH> |
|||
|Today's highest hourly rain |
|||
|<#ThourlyrainTH> |
|||
|- |
|||
|<#RG11RainToday> |
|||
|If you have an RG-11 rain sensor configured in "Tipping Bucket" mode, this gives today's rain total so far according to the sensor |
|||
| n/a |
|||
|- |
|||
|<#snowfalling> |
|||
|Returns 1 if there is an entry in the Weather Diary for Today and the Snow Falling check box is ticked. Returns 0 otherwise. |
|||
{{Version badge 1}} Not available in Cumulus 1. |
|||
[[File:Badge vMx.png]] Available from version 3.1.1 - build 3054. |
|||
|- |
|||
|<#snowdepth> |
|||
|If there is an entry in the Weather Diary for Today, returns the value set there. Returns 0 otherwise. |
|||
{{Version badge 1}} Available from very early builds, weather diary input amended from version 1.8.6 14th April 2009 to allow units to be specified. Input and output is as integer, enter in millimetres to represent 1 decimal place in centimetres. Meteorologists report this in cm. |
|||
[[File:Badge vMx.png]] Available from version 3.1.1 - build 3054 when weather diary editor was added to MX |
|||
|- |
|||
|<#snowlying> |
|||
|Returns 1 if there is an entry in the Weather Diary for Today and the Snow Lying check box is ticked. Returns 0 otherwise. |
|||
{{Version badge 1}}Although this tag is not available in Cumulus 1, you can check if <#snowdepth> is non zero for same answer |
|||
[[File:Badge vMx.png]] Available from version 3.1.1 - build 3054 |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#pressTH> |
|||
|Today's highest pressure reading |
|||
|<#TpressTH> |
|||
|- |
|||
|<#pressTL> |
|||
|Today's lowest pressure reading |
|||
|<#TpressTL> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#windTM> |
|||
|Today's maximum (average) wind speed |
|||
|<#TwindTM> |
|||
|- |
|||
|<#wgustTM> |
|||
|Today's maximum wind gust |
|||
|<#TwgustTM> |
|||
|- |
|||
|<#bearingTM> |
|||
|The wind bearing at the time of today's high gust (<#wgustTM>) in degrees |
|||
|<#TwgustTM> |
|||
|- |
|||
|<#Tbeaufort> |
|||
|Today's highest wind speed, expressed in the Beaufort scale |
|||
|<#TwindTM> |
|||
|- |
|||
|<#Tbeaufortnumber> |
|||
|Today's high wind speed on the Beaufort scale, without a leading "F", e.g. "6" |
|||
|<#TwindTM> |
|||
|- |
|||
|<#windrun> |
|||
|The total wind run so far today |
|||
|N/A |
|||
|- |
|||
|<#domwindbearing> |
|||
|Today's dominant wind direction in degrees |
|||
|n/a |
|||
|- |
|||
|<#domwinddir> |
|||
|Today's dominant wind direction as compass point |
|||
|n/a |
|||
|- |
|||
|<#Tbeaudesc> |
|||
|Beaufort 'description' for today's high wind speed |
|||
|n/a |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Miscellaneous |
|||
|- |
|||
|<#ET> |
|||
|Today's [http://en.wikipedia.org/wiki/Evapotranspiration evapotranspiration]. Applies only to Davis stations, equipped with a solar sensor. |
|||
"The ET value provided to Cumulus by the console and/or DLL is buggy and unreliable. It often shows a negative value. See [[FAQ#It.27s_January_1st_and_my_.27rain_since_midnight.27_and.2For_.27last_24_hours_rain.27_and.2For_Evapotranspiration_are_wrong.2Fnegative|this FAQ]]." |
|||
|N/A |
|||
|- |
|||
|<#heatdegdays> |
|||
|Today's [[Heat/cold_degree_days_and_Chill_hours|heating degree days]] |
|||
|n/a |
|||
|- |
|||
|<#cooldegdays> |
|||
|Today's [[Heat/cold_degree_days_and_Chill_hours|cooling degree days]] |
|||
|n/a |
|||
|- |
|||
|<#solarTH> |
|||
|Today's high solar radiation value (Solar sensor needed) |
|||
|<#TsolarTH> |
|||
|- |
|||
|<#UVTH> |
|||
|Today's high UV Index (UV sensor needed) |
|||
|<#TUVTH> |
|||
|- |
|||
|<#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 |
|||
|n/a |
|||
|} |
|||
==Yesterday== |
|||
Note that the Y indicating yesterday is sometimes a prefix, sometimes a suffix (with H for High, L for Low), web tags are not named consistently! |
|||
Many of these web tags are used on the supplied '''yesterdayT.htm''' template, and the supplied '''todayyest.html''' page within the MX admin interface. |
|||
For web tags that refer to a particular time of day, there is a corresponding web tag that can give the time of day. Please note none of the time web tags can be modified by output parameters to give a date, but they can be changed from the default time format that is 'h:mm'. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:550px" | Function |
|||
!style="width:150px" | Time |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Temperature & Humidity |
|||
|- |
|||
|<#tempYH> |
|||
|Yesterday's highest temperature |
|||
|<#TtempYH> |
|||
|- |
|||
|<#tempYL> |
|||
|Yesterday's lowest temperature |
|||
|<#TtempYL> |
|||
|- |
|||
|<#avgtempY> |
|||
|Yesterday's average temperature |
|||
|n/a |
|||
|- |
|||
|<#temprangeY> |
|||
|The temperature range (max - min) yesterday |
|||
|n/a |
|||
|- |
|||
|<#apptempYH> |
|||
|Yesterday's high apparent temperature |
|||
|<#TapptempYH> |
|||
|- |
|||
|<#apptempYL> |
|||
|Yesterday's low apparent temperature |
|||
|<#TapptempYL> |
|||
|- |
|||
|<#feelslikeYH> |
|||
|[[File:Badge vMx.png]] Available from version 3.6.10 (NOT AVAILABLE IN CUMULUS 1) |
|||
Yesterday's high feels like temperature |
|||
|<#TfeelslikeYH> |
|||
|- |
|||
|<#feelslikeYL> |
|||
|[[File:Badge vMx.png]] Available from version 3.6.10 (NOT AVAILABLE IN CUMULUS 1) |
|||
Yesterday's low feels like temperature |
|||
|<#TfeelslikeYL> |
|||
|- |
|||
|<#humidexYH |
|||
|[[File:Badge vMx.png]] Available from version 3.7.0 (NOT AVAILABLE IN CUMULUS 1) |
|||
Yesterday's low Canadian Humidity Index |
|||
|<#ThumidexYH> |
|||
|- |
|||
|<#heatindexYH> |
|||
|Yesterday's high heat index |
|||
|<#TheatindexYH> |
|||
|- |
|||
|<#wchillYL> |
|||
|Yesterday's greatest wind chill (i.e. lowest temperature) |
|||
|<#TwchillYL> |
|||
|- |
|||
|<#dewpointYL> |
|||
|Yesterday's lowest dew point |
|||
|<#TdewpointYL> |
|||
|- |
|||
|<#dewpointYH> |
|||
|Yesterday's highest dew point |
|||
|<#TdewpointYH> |
|||
|- |
|||
|<#humYH> |
|||
|High humidity yesterday |
|||
|<#ThumYH> |
|||
|- |
|||
|<#humYL> |
|||
|Low humidity yesterday |
|||
|<#ThumYL> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#rfallY> |
|||
|The total rainfall for yesterday according to the connected weather station |
|||
|n/a |
|||
|- |
|||
|<#RG11RainYest> |
|||
|The total rainfall for yesterday according to an RG-11 rain sensor configured in "Tipping Bucket" mode |
|||
|n/a |
|||
|- |
|||
|<#rrateYM> |
|||
|Yesterday's maximum rain rate |
|||
|<#TrrateYM> |
|||
|- |
|||
|<#hourlyrainYH> |
|||
|Yesterday's highest hourly rain |
|||
|<#ThourlyrainYH> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#pressYH> |
|||
|Yesterday's highest pressure reading |
|||
|<#TpressYH> |
|||
|- |
|||
|<#pressYL> |
|||
|Yesterday's lowest pressure reading |
|||
|<#TpressYL> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#windYM> |
|||
|Yesterday's maximum (average) wind speed |
|||
|<#TwindYM> |
|||
|- |
|||
|<#wgustYM> |
|||
|Yesterday's maximum wind gust |
|||
|<#TwgustYM> |
|||
|- |
|||
|<#bearingYM> |
|||
|The wind bearing at the time of yesterday's high gust |
|||
|<#TwgustYM> |
|||
|- |
|||
|<#Ybeaufort> |
|||
|Yesterday's highest wind speed, expressed in the Beaufort scale |
|||
|<#TwindYM> |
|||
|- |
|||
|<#Ybeaufortnumber> |
|||
|Yesterday's high wind speed on the Beaufort scale, without a leading "F", e.g. "6" |
|||
|<#TwindYM> |
|||
|- |
|||
|<#Ybeaudesc> |
|||
|Beaufort 'description' for yesterday's high wind speed |
|||
|n/a |
|||
|- |
|||
|<#domwindbearingY> |
|||
|Yesterday's dominant wind direction in degrees |
|||
|n/a |
|||
|- |
|||
|<#domwinddirY> |
|||
|Yesterday's dominant wind direction as compass point |
|||
|n/a |
|||
|- |
|||
|<#windrunY> |
|||
|The total wind run for yesterday |
|||
|n/a |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Miscellaneous |
|||
|- |
|||
|<#heatdegdaysY> |
|||
|Yesterday's [[Heat/cold_degree_days_and_Chill_hours|heating degree days]] |
|||
|n/a |
|||
|- |
|||
|<#cooldegdaysY> |
|||
|Yesterday's [[Heat/cold_degree_days_and_Chill_hours|cooling degree days]] |
|||
|n/a |
|||
|- |
|||
|<#SunshineHoursY> |
|||
|Yesterday'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 |
|||
|- |
|||
|<#solarYH> |
|||
|Yesterday's high solar radiation value (Solar sensor needed) |
|||
|<#TsolarYH> |
|||
|- |
|||
|<#UVYH> |
|||
|Yesterday's high UV Index (UV sensor needed) |
|||
|<#TUVYH> |
|||
|} |
|||
==Monthly== |
|||
This table shows the web tags used on the '''thismonthT.htm''' web page,and the '''records.html''' page (accessed by penultimate tab) in the admin interface. |
|||
Because the rainfall this month does not appear on '''thismonthT.htm''' web page, it is shown in [[#Current_Conditions|indexT.htm]] table earlier in this article which is for the web page where it does appear. |
|||
The web tags in the date column output dates in the format "dd MMMM" (for once this is same for Cumulus 1 and Cumulus MX). Should you require a different output format, this can be changed using the [[#Time.2FDate_.27format.27_Parameter|format parameters]] described above. For web tags that represent daily values, there are (obviously) no corresponding time web tags, but for high and low spot values the default 'h:mm' format of the time output can be changed using output parameters. Do make sure that you get the web tag names right and the output form at parameters right. |
|||
As another example of inconsistency in how web tags added in different versions are coded, there are two web tags (highest minimum/lowest maximum temperatures) where a standard web tag is not provided by Cumulus (1 or MX) for the associated time-stamp. Consequently, for these 2 (and their corresponding tags in the this year group), there are mandatory output parameters required as shown in the table. Obviously Cumulus 1 lets you use "NN", "nn", "MM", or "mm" for the minutes, but minutes can only be represented in one way in Cumulus MX. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px"|Web tag_name |
|||
!style="width:300px"|Function |
|||
!style="width:150px"|Time |
|||
!style="width:150px"|Date |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Temperature & Humidity |
|||
|- |
|||
|<#MonthTempH> |
|||
|This months high temperature |
|||
|<#MonthTempHT> |
|||
|<#MonthTempHD> |
|||
|- |
|||
|<#MonthTempL> |
|||
|This months low temperature |
|||
|<#MonthTempLT> |
|||
|<#MonthTempLD> |
|||
|- |
|||
|<#MonthMinTempH> |
|||
|This months highest daily minimum temperature |
|||
|[[File:badge v1.png]]<#MonthMinTempHD format=hh:nn> or <#MonthMinTempHD format=HH:mm> for Cumulus 1, |
|||
[[File:Badge vMx.png]] <#MonthMinTempHD format=HH:mm> for Cumulus MX |
|||
|<#MonthMinTempHD> |
|||
|- |
|||
|<#MonthMaxTempL> |
|||
|This months lowest daily maximum temperature |
|||
|[[File:badge v1.png]]<#MonthMaxTempLD format=HH:mm> or <#MonthMaxTempLD format=hh:nn> for Cumulus 1, |
|||
[[File:Badge vMx.png]]<#MonthMaxTempLD format=HH:mm> for Cumulus MX |
|||
|<#MonthMaxTempLD> |
|||
|- |
|||
|<#MonthHighDailyTempRange> |
|||
|High Daily Temp Range |
|||
|n/a |
|||
|<#MonthHighDailyTempRangeD> |
|||
|- |
|||
|<#MonthLowDailyTempRange> |
|||
|Low Daily Temp Range |
|||
|n/a |
|||
|<#MonthLowDailyTempRangeD> |
|||
|- |
|||
|<#MonthHeatIndexH> |
|||
|This months high USA heat index |
|||
|<#MonthHeatIndexHT> |
|||
|<#MonthHeatIndexHD> |
|||
|- |
|||
|<#MonthWChillL> |
|||
|This months greatest wind chill (i.e. lowest temperature) |
|||
|<#MonthWChillLT> |
|||
|<#MonthWChillLD> |
|||
|- |
|||
|<#MonthAppTempH> |
|||
|This month's high apparent temperature |
|||
|<#MonthAppTempHT> |
|||
|<#MonthAppTempHD> |
|||
|- |
|||
|<#MonthAppTempL> |
|||
|This month's low apparent temperature |
|||
|<#MonthAppTempLT> |
|||
|<#MonthAppTempLD> |
|||
|- |
|||
|<#MonthFeelsLikeH> |
|||
|This month's highest feels like temperature (available from [[File:Badge vMx.png]] 3.6.0) (NOT AVAILABLE IN CUMULUS 1) |
|||
|<#MonthFeelsLikeHT> |
|||
|<#MonthFeelsLikeHD> |
|||
|- |
|||
|<#MonthFeelsLikeL> |
|||
|This months lowest feels like temperature (available from [[File:Badge vMx.png]] 3.6.0) (NOT AVAILABLE IN CUMULUS 1) |
|||
|<#MonthFeelsLikeLT> |
|||
|<#MonthFeelsLikeLD> |
|||
|- |
|||
|<#MonthHumidexH> |
|||
|[[File:Badge vMx.png]] (Available from version 3.7.0) (NOT AVAILABLE IN CUMULUS 1) |
|||
This month's highest Canadian Humidity Index |
|||
|<#MonthHumidexHT> |
|||
|<#MonthHumidexHD> |
|||
|- |
|||
|<#MonthDewPointH> |
|||
|This month's high dew point |
|||
|<#MonthDewPointHT> |
|||
|<#MonthDewPointHD> |
|||
|- |
|||
|<#MonthDewPointL> |
|||
|This month's low dew point |
|||
|<#MonthDewPointLT> |
|||
|<#MonthDewPointLD> |
|||
|- |
|||
|<#MonthHumH> |
|||
|This month's highest humidity |
|||
|<#MonthHumHT> |
|||
|<#MonthHumHD> |
|||
|- |
|||
|<#MonthHumL> |
|||
|This month's lowest humidity |
|||
|<#MonthHumLT> |
|||
|<#MonthHumLD> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#MonthPressH> |
|||
|This month's highest pressure |
|||
|<#MonthPressHT> |
|||
|<#MonthPressHD> |
|||
|- |
|||
|<#MonthPressL> |
|||
|This month's lowest pressure |
|||
|<#MonthPressLT> |
|||
|<#MonthPressLD> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#MonthGustH> |
|||
|This month's highest wind gust |
|||
|<#MonthGustHT> |
|||
|<#MonthGustHD> |
|||
|- |
|||
|<#MonthWindH> |
|||
|This month's highest wind speed |
|||
|<#MonthWindHT> |
|||
|<#MonthWindHD> |
|||
|- |
|||
|<#MonthWindRunH> |
|||
|This month's high Daily Wind Run |
|||
|n/a |
|||
|<#MonthWindRunHD> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#MonthRainRateH> |
|||
|This month's highest rainfall rate |
|||
|<#MonthRainRateHT> |
|||
|<#MonthRainRateHD> |
|||
|- |
|||
|<#MonthHourlyRainH> |
|||
|This month's highest hourly rain |
|||
|<#MonthHourlyRainHT> |
|||
|<#MonthHourlyRainHD> |
|||
|- |
|||
|<#MonthDailyRainH> |
|||
|This month's greatest daily rain |
|||
|n/a |
|||
|<#MonthDailyRainHD> |
|||
|- |
|||
|<#MonthLongestDryPeriod> |
|||
|Longest dry period ending this month (days) |
|||
|n/a |
|||
|<#MonthLongestDryPeriodD> |
|||
|- |
|||
|<#MonthLongestWetPeriod> |
|||
|Longest period of rain every day, ending this month (days) |
|||
|n/a |
|||
|<#MonthLongestWetPeriodD> |
|||
|} |
|||
==Yearly== |
|||
This table shows the web tags used on the "thisyearT.htm" web page, and the '''records.html''' page (accessed by final tab) in the admin interface. |
|||
Because the rainfall this year does not appear on '''thisyearT.htm''' web page, it is shown in [[#Current_Conditions|indexT.htm]] table earlier in this article which is for the web page where it does appear. |
|||
The web tags in the date column output dates in the format "dd MMMM" (for once this is same for Cumulus 1 and Cumulus MX). Should you require a different output format, this can be changed using the [[#Time.2FDate_.27format.27_Parameter|format parameters]] described above. For web tags that represent daily values, there are (obviously) no corresponding time web tags, but for high and low spot values the default 'h:mm' format of the time output can be changed using output parameters. Do make sure that you get the web tag names right and the output form at parameters right. |
|||
As another example of inconsistency in how web tags added in different versions are coded, there are two web tags (highest minimum/lowest maximum temperatures) where a standard web tag is not provided by Cumulus (1 or MX) for the associated time-stamp. Consequently, for these 2 (and their corresponding tags in the this month group), there are mandatory output parameters required as shown in the table. Obviously Cumulus 1 lets you use "NN", "nn", "MM", or "mm" for the minutes, but minutes can only be represented in one way in Cumulus MX. |
|||
Remember that the Year-to-date runs from roll-over time on 1 January for all web tags listed here. Although, some web tags represent seasonal derivatives, i.e. where you define the month from which they start counting, this does not apply to any listed in this group. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px"|Web tag_name |
|||
!style="width:300px"|Function |
|||
!style="width:350px"|Time |
|||
!style="width:150px"|Date |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Temperature & Humidity |
|||
|- |
|||
|<#YearTempH> |
|||
|This year's highest temperature |
|||
|<#YearTempHT> |
|||
|<#YearTempHD> |
|||
|- |
|||
|<#YearTempL> |
|||
|This year's lowest temperature |
|||
|<#YearTempLT> |
|||
|<#YearTempLD> |
|||
|- |
|||
|<#YearHighDailyTempRange> |
|||
|This year's highest Daily Temp Range |
|||
|n/a |
|||
|<#YearHighDailyTempRangeD> |
|||
|- |
|||
|<#YearLowDailyTempRange> |
|||
|This year's lowest Daily Temp Range |
|||
|n/a |
|||
|<#YearLowDailyTempRangeD> |
|||
|- |
|||
|<#YearHeatIndexH> |
|||
|This year's highest USA heat index |
|||
|<#YearHeatIndexHT> |
|||
|<#YearHeatIndexHD> |
|||
|- |
|||
|<#YearWChillL> |
|||
|This year's greatest wind chill (i.e. lowest temperature) |
|||
|<#YearWChillLT> |
|||
|<#YearWChillLD> |
|||
|- |
|||
|<#YearAppTempH> |
|||
|This year's highest apparent temperature |
|||
|<#YearAppTempHT> |
|||
|<#YearAppTempHD> |
|||
|- |
|||
|<#YearAppTempL> |
|||
|This year's lowest apparent temperature |
|||
|<#YearAppTempLT> |
|||
|<#YearAppTempLD> |
|||
|- |
|||
|<#YearFeelsLikeH> |
|||
|[[File:Badge vMx.png]]This year's highest feels like temperature (available from 3.6.0) (NOT AVAILABLE IN CUMULUS 1) |
|||
|<#YearFeelsLikeHT> |
|||
|<#YearFeelsLikeHD> |
|||
|- |
|||
|<#YearFeelsLikeL> |
|||
|[[File:Badge vMx.png]]This year's lowest feels like temperature (available from 3.6.0) (NOT AVAILABLE IN CUMULUS 1) |
|||
|<#YearFeelsLikeLT> |
|||
|<#YearFeelsLikeLD> |
|||
|- |
|||
|<#YearHumidexH> |
|||
|[[File:Badge vMx.png]] (Available from version 3.7.0) (NOT AVAILABLE IN CUMULUS 1) |
|||
This year's highest Canadian Humidity Index |
|||
|<#YearHumidexHT> |
|||
|<#YearHumidexHD> |
|||
|- |
|||
|<#YearDewPointH> |
|||
|This year's highest dew point |
|||
|<#YearDewPointHT> |
|||
|<#YearDewPointHD> |
|||
|- |
|||
|<#YearDewPointL> |
|||
|This year's lowest dew point |
|||
|<#YearDewPointLT> |
|||
|<#YearDewPointLD> |
|||
|- |
|||
|<#YearMinTempH> |
|||
|This year's highest daily minimum temperature |
|||
|Flavour specific mandatory output parameters: |
|||
* <#YearMinTempHD format=HH:nn> ''for Cumulus 1'', |
|||
* <#YearMinTempHD format=HH:mm> ''for Cumulus MX'' |
|||
|<#YearMinTempHD> |
|||
|- |
|||
|<#YearMaxTempL> |
|||
|This year's lowest daily maximum temperature |
|||
|Flavour specific mandatory output parameters: |
|||
* <#YearMaxTempHD format=HH:nn> ''for Cumulus 1'', |
|||
* <#YearMaxTempHD format=HH:mm> ''for Cumulus MX'' |
|||
|<#YearMaxTempLD> |
|||
|- |
|||
|<#YearHumH> |
|||
|This year's high humidity |
|||
|<#YearHumHT> |
|||
|<#YearHumHD> |
|||
|- |
|||
|<#YearHumL> |
|||
|This year's low humidity |
|||
|<#YearHumLT> |
|||
|<#YearHumLD> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#YearPressH> |
|||
|This year's high pressure |
|||
|<#YearPressHT> |
|||
|<#YearPressHD> |
|||
|- |
|||
|<#YearPressL> |
|||
|This year's low pressure |
|||
|<#YearPressLT> |
|||
|<#YearPressLD> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#YearGustH> |
|||
|This year's high wind gust |
|||
|<#YearGustHT> |
|||
|<#YearGustHD> |
|||
|- |
|||
|<#YearWindH> |
|||
|This year's high wind speed |
|||
|<#YearWindHT> |
|||
|<#YearWindHD> |
|||
|- |
|||
|<#YearWindRunH> |
|||
This year's highest Daily Wind Run |
|||
|n/a |
|||
|<#YearWindRunHD> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#YearRainRateH> |
|||
|This year's highest rainfall rate |
|||
|<#YearRainRateHT> |
|||
|<#YearRainRateHD> |
|||
|- |
|||
|<#YearHourlyRainH> |
|||
|This year's highest hourly rain |
|||
|<#YearHourlyRainHT> |
|||
|<#YearHourlyRainHD> |
|||
|- |
|||
|<#YearDailyRainH> |
|||
|This year's high daily rain |
|||
|n/a |
|||
|<#YearDailyRainHD> |
|||
|- |
|||
|<#YearMonthlyRainH> |
|||
|This year's high monthly rain |
|||
|n/a |
|||
|<#YearMonthlyRainHD> |
|||
|- |
|||
|<#YearLongestDryPeriod> |
|||
|Longest period without rain ending this year (days) |
|||
|n/a |
|||
|<#YearLongestDryPeriodD> |
|||
|- |
|||
|<#YearLongestWetPeriod> |
|||
|Longest period of rain every day ending this year (days) |
|||
|n/a |
|||
|<#YearLongestWetPeriodD> |
|||
|} |
|||
==All Time== |
|||
The web tags in the date/time column have the default format as seen on "records.htm" in the standard web pages. |
|||
These are also available in the admin interface on "records.html" where they appear in the first tab, although the format used there is different and not able to be edited (any time is shown after the date). |
|||
*The default format for an extreme month is to show the month name in full i.e. format 'MMMM' followed by the year in full. |
|||
*For an extreme day it shows the day of the month and the month name in full i.e. format "dd MMMM" (same for Cumulus 1 and Cumulus MX), prefixed with the word 'on' again ending with the year. |
|||
*For the highest/lowest within a day in the year it shows both time and date adding the word "at" before the time, and the word 'on' before the date (i.e. on the standard web page the time comes first, not as seen in admin interface). |
|||
You can change the default output on either the standard web template, or in your own file, by using the [[#Time.2FDate_.27format.27_Parameter|formats features described above, but this can involve complicated use of single and double quotes and there are differences between Cumulus 1 and Cumulus MX. Please see examples section above for advice. |
|||
Note that unlike the this month and this year web tags, the time and the date are both included in the default format of the standard time-stamp web tags for the 'highest minimum' and 'lowest maximum' temperatures, yet another inconsistency! |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:400px" | Function |
|||
!style="width:150px" | Date/Time |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Temperature & Humidity |
|||
|- |
|||
|<#tempH> |
|||
|All time high temperature |
|||
|<#TtempH> |
|||
|- |
|||
|<#tempL> |
|||
|All time low temperature |
|||
|<#TtempL> |
|||
|- |
|||
|<#mintempH> |
|||
|All time high minimum temperature |
|||
|<#TmintempH> |
|||
|- |
|||
|<#maxtempL> |
|||
|All time low maximum temperature |
|||
|<#TmaxtempL> |
|||
|- |
|||
|<#LowDailyTempRange> |
|||
|All time low daily temperature range |
|||
|<#TLowDailyTempRange> |
|||
|- |
|||
|<#HighDailyTempRange> |
|||
|All time high daily temperature range |
|||
|<#THighDailyTempRange> |
|||
|- |
|||
|<#apptempH> |
|||
|All time high apparent temperature |
|||
|<#TapptempH> |
|||
|- |
|||
|<#apptempL> |
|||
|All time low apparent temperature |
|||
|<#TapptempL> |
|||
|- |
|||
|<#feelslikeH> |
|||
|[[File:Badge vMx.png]]All time high feels like temperature (available from 3.6.0) |
|||
|<#TfeelslikeH> |
|||
|- |
|||
|<#feelslikeL> |
|||
|[[File:Badge vMx.png]]All time low feels like temperature (available from 3.6.0) |
|||
|<#TfeelslikeL> |
|||
|- |
|||
|<#humidexH> |
|||
|[[File:Badge vMx.png]]All time high Canadian Humidity Index (available from 3.7.0) |
|||
|<#ThumidexH> |
|||
|- |
|||
|<#heatindexH> |
|||
|All time high USA heat index |
|||
|<#TheatindexH> |
|||
|- |
|||
|<#dewpointH> |
|||
|All time high dew point |
|||
|<#TdewpointH> |
|||
|- |
|||
|<#dewpointL> |
|||
|All time low dew point |
|||
|<#TdewpointL> |
|||
|- |
|||
|<#humH> |
|||
|All time high humidity |
|||
|<#ThumH> |
|||
|- |
|||
|<#humL> |
|||
|All time low humidity |
|||
|<#ThumL> |
|||
|- |
|||
|<#wchillH> |
|||
|All time greatest wind chill (i.e. lowest temperature, but highest wind speed) |
|||
|<#TwchillH> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#rrateM> |
|||
|All time high rain rate |
|||
|<#TrrateM> |
|||
|- |
|||
|<#rfallH> |
|||
|All time high daily rain |
|||
|<#TrfallH> |
|||
|- |
|||
|<#rfallhH> |
|||
|All time high hourly rain |
|||
|<#TrfallhH> |
|||
|- |
|||
|<#rfallmH> |
|||
|All time high monthly rain |
|||
|<#TrfallmH> |
|||
|- |
|||
|<#LongestDryPeriod> |
|||
|All time longest dry period (days) |
|||
|<#TLongestDryPeriod> |
|||
|- |
|||
|<#LongestWetPeriod> |
|||
|All time longest wet period (days) |
|||
|<#TLongestWetPeriod> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#pressH> |
|||
|All time high pressure |
|||
|<#TpressH> |
|||
|- |
|||
|<#pressL> |
|||
|All time low pressure |
|||
|<#TpressL> |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#gustM> |
|||
|All time high wind gust |
|||
|<#TgustM> |
|||
|- |
|||
|<#wspeedH> |
|||
|All time high average wind speed |
|||
|<#TwspeedH> |
|||
|- |
|||
|<#windrunH> |
|||
|All time high daily wind run |
|||
|<#TwindrunH> |
|||
|} |
|||
==Monthly All Time Records== |
|||
There are a set of tags for monthly all-time highs and lows, in other words the highest and lowest values for a particular month of the year. To supply both optional input, and optional output parameters, separate them with spaces, e.g. <#ByMonthTempHT mon=7 format=hh:nn>. In that example, the highest ever temperature in July is returned in the value after processing by Cumulus. |
|||
Each Monthly All Time Records web tag has an optional input parameter "mon=N" where N is the index of the month of the year that you want the value for (January=1 and so on). The corresponding date/time web tags are formatted like the all time records directly above this section. You can customise the date and time formats using the output 'format' parameter on the web tag. |
|||
If you don't supply an input parameter (or supply an invalid value like zero) the current month will be used. This is useful if you want to write a template that will always supply values for the current month and don't want to use a script to enter the correct input parameter by processing with that script before Cumulus processes the template. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px"|Web tag_name |
|||
!style="width:400px"|Function |
|||
!style="width:150px"|Date/Time |
|||
|- |
|||
|colspan="3" style="background:lightgray;"|Temperature & Humidity |
|||
|- |
|||
|<#ByMonthTempH> |
|||
|High Temperature |
|||
|<#ByMonthTempHT> |
|||
|- |
|||
|<#ByMonthTempL> |
|||
|Low Temperature |
|||
|<#ByMonthTempLT> |
|||
|- |
|||
|<#ByMonthHeatIndexH> |
|||
|High Heat Index |
|||
|<#ByMonthHeatIndexHT> |
|||
|- |
|||
|<#ByMonthWChillL> |
|||
|Greatest wind chill (i.e. lowest temperature and highest wind speed) |
|||
|<#ByMonthWChillLT> |
|||
|- |
|||
|<#ByMonthAppTempH> |
|||
|High Apparent Temperature |
|||
|<#ByMonthAppTempHT> |
|||
|- |
|||
|<#ByMonthAppTempL> |
|||
|Low Apparent Temperature |
|||
|<#ByMonthAppTempLT> |
|||
|- |
|||
|<#ByMonthFeelsLikeH> |
|||
|[[File:Badge vMx.png]]High Feels Like Temperature (available from 3.6.10) |
|||
|<#ByMonthFeelsLikeTempHT> |
|||
|- |
|||
|<#ByMonthFeelsLikeTempL> |
|||
|[[File:Badge vMx.png]]Low Feels Like Temperature (available from 3.6.10) |
|||
|<#ByMonthFeelsLikeTempLT> |
|||
|- |
|||
|<#ByMonthHumidexH> |
|||
|[[File:Badge vMx.png]]High Canadian Humidity Index (Humidex) - available from version 3.7.0 |
|||
|<#ByMonthHumidexHT> |
|||
|- |
|||
|<#ByMonthHumidexL> |
|||
|[[File:Badge vMx.png]]Low Canadian Humidity Index (Humidex) - available from version 3.7.0 |
|||
|<#ByMonthHumidexLT> |
|||
|- |
|||
|<#ByMonthDewPointH> |
|||
|High Dew Point |
|||
|<#ByMonthDewPointHT> |
|||
|- |
|||
|<#ByMonthDewPointL> |
|||
|Low Dew Point |
|||
|<#ByMonthDewPointLT> |
|||
|- |
|||
|<#ByMonthMinTempH> |
|||
|Highest Daily Minimum Temperature |
|||
|<#ByMonthMinTempHT> |
|||
|- |
|||
|<#ByMonthMaxTempL> |
|||
|Lowest Daily Maximum Temperature |
|||
|<#ByMonthMaxTempLT> |
|||
|- |
|||
|<#ByMonthHighDailyTempRange> |
|||
|High Daily Temp Range |
|||
|<#ByMonthHighDailyTempRangeT> |
|||
|- |
|||
|<#ByMonthLowDailyTempRange> |
|||
|Low Daily Temp Range |
|||
|<#ByMonthLowDailyTempRangeT> |
|||
|- |
|||
|<#ByMonthHumH> |
|||
|High Humidity |
|||
|<#ByMonthHumHT> |
|||
|- |
|||
|<#ByMonthHumL> |
|||
|Low Humidity |
|||
|<#ByMonthHumLT> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Pressure |
|||
|- |
|||
|<#ByMonthPressH> |
|||
|High Pressure |
|||
|<#ByMonthPressHT> |
|||
|- |
|||
|<#ByMonthPressL> |
|||
|Low Pressure |
|||
|<#ByMonthPressLT> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Wind |
|||
|- |
|||
|<#ByMonthGustH> |
|||
|High Wind Gust |
|||
|<#ByMonthGustHT> |
|||
|- |
|||
|<#ByMonthWindH> |
|||
|High Wind Speed |
|||
|<#ByMonthWindHT> |
|||
|- |
|||
|<#ByMonthWindRunH> |
|||
|High Daily Wind Run |
|||
|<#ByMonthWindRunHT> |
|||
|- |
|||
|colspan="4" style="background:lightgray;"|Rainfall |
|||
|- |
|||
|<#ByMonthRainRateH> |
|||
|High Rain Rate |
|||
|<#ByMonthRainRateHT> |
|||
|- |
|||
|<#ByMonthMonthlyRainH> |
|||
|High Monthly Rainfall |
|||
|<#ByMonthMonthlyRainHT> |
|||
|- |
|||
|<#ByMonthHourlyRainH> |
|||
|High Hourly Rain |
|||
|<#ByMonthHourlyRainHT> |
|||
|- |
|||
|<#ByMonthDailyRainH> |
|||
|High Daily Rain |
|||
|<#ByMonthDailyRainHT> |
|||
|- |
|||
|<#ByMonthLongestDryPeriod> |
|||
|Longest Dry Period |
|||
|<#ByMonthLongestDryPeriodT> |
|||
|- |
|||
|<#ByMonthLongestWetPeriod> |
|||
|Longest Wet Period |
|||
|<#ByMonthLongestWetPeriodT> |
|||
|} |
|||
==Day/Night/Sun/Moon== |
|||
These are updated each hour to refer to current time-zone |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:900px" | Function |
|||
|- |
|||
|<#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. |
|||
|- |
|||
|<#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. |
|||
|- |
|||
|<#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. |
|||
|- |
|||
|<#IsSunUp> |
|||
|A flag to indicate if the Sun is above the horizon or not, based on the sunrise and sunset times. |
|||
Possible values are 0 or 1, where 1 is when the Sun is above the horizon for the station location. |
|||
|- |
|||
|<#dawn> |
|||
|Start of last Civil Twilight at the station as at last midnight UTC |
|||
|- |
|||
|<#dusk> |
|||
|End of next Civil Twilight at the station as at last midnight UTC |
|||
|- |
|||
|<#daylightlength> |
|||
|Length of daylight in hours and minutes (dawn to dusk) |
|||
|- |
|||
|<#isdaylight> |
|||
|A flag to indicate if the location for the station is in civil daylight or not, based on the dawn and dusk times. |
|||
Possible values are 0 or 1, where 1 notes that it is currently within the hours of daylight. |
|||
|- |
|||
|<#tomorrowdaylength> |
|||
|A string giving an approximate predicted difference between the length of daylight (dawn to dusk) yesterday and length of daylight tomorrow. |
|||
This web tag is unreliable, and its use is not recommended. Its use is therefore not supported (i.e. you use it at your own risk). |
|||
|- |
|||
|<#moonphase> |
|||
|Current [[Lunar phase|phase of the moon]] in words, eg "New Moon" etc. The names used can be altered in [[Strings.ini#Moon_Phases|strings.ini]]. |
|||
|- |
|||
|<#MoonAge> |
|||
|Current '''approximate''' age of the Moon in days (0-29.53) |
|||
MX b3047 adds the 'dp' and 'rc' parameters Supports an optional 'dp' parameter, if supplied the result is returned to the specified number of decimal places. E.g <#MoonAge> gives "11" <#MoonAge dp=3> gives "11.234" |
|||
If the "dp" parameter is supplied, then also supplying "rc=y" in addition will cause any decimal comma to be converted to a decimal point. |
|||
|- |
|||
|<#moonrise> |
|||
|Current moonrise time at the station (if moon rises on current calendar day) |
|||
|- |
|||
|<#moonset> |
|||
|Current moonset time at the station (if moon sets on current calendar day) |
|||
|- |
|||
|<#MoonPercent> |
|||
|Current percentage of moon visible (negative value indicates 'waning') |
|||
MX b3047 adds the 'dp' and 'rc' parameters as <#MoonAge> above |
|||
|- |
|||
|<#MoonPercentAbs> |
|||
|Current percentage of moon visible (always positive) |
|||
MX b3047 adds the 'dp' and 'rc' parameters as <#MoonAge> above |
|||
|- |
|||
|<#SunshineHours> |
|||
|Hours of sunshine so far today (Solar sensor needed) |
|||
|- |
|||
|<#YSunshineHours> |
|||
|Total hours of sunshine yesterday (Solar sensor needed) |
|||
|- |
|||
|<#CurrentSolarMax> |
|||
|[[FAQ#What_is_this_.22Solar_Max.22_value_which_Cumulus_is_displaying.3F | Current theoretical maximum solar radiation]] |
|||
|- |
|||
|<#IsSunny> |
|||
|Returns 1 if the sun is shining, otherwise 0 (Solar sensor needed) |
|||
|} |
|||
==Alarms== |
|||
[[File:badge v1.png]]There are a set of tags available in Cumulus 1 for various alarm states. In Cumulus 1, the main page will change the colour of the relevant element when an alarm condition is entered or left. You can add sounds, and enable disable each alarm parameter on the Main Cumulus screen, Edit menu. |
|||
[[File:Badge vMx.png]]Alarms are also available in later MX versions. In MX, the alarm conditions are shown on the bottom of the Dashboard page of the user interface. You can add sounds, and enable/disable each alarm parameter on the Alarms screen within Settings menu. |
|||
For both flavours, there are web tags for each alarm condition, they give a value of '1' if the alarm condition is enabled and is still currently met; otherwise '0'. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:600px" |Function |
|||
|- |
|||
|<#LowTempAlarm> |
|||
|Low temperature alarm |
|||
|- |
|||
|<#HighTempAlarm> |
|||
|High temperature alarm |
|||
|- |
|||
|<#TempChangeUpAlarm> |
|||
|Temperature increase alarm |
|||
|- |
|||
|<#TempChangeDownAlarm> |
|||
|Temperature decrease alarm |
|||
|- |
|||
|<#LowPressAlarm> |
|||
|Low pressure alarm |
|||
|- |
|||
|<#HighPressAlarm> |
|||
|High pressure alarm |
|||
|- |
|||
|<#PressChangeUpAlarm> |
|||
|Pressure increase alarm |
|||
|- |
|||
|<#PressChangeDownAlarm> |
|||
|Pressure decrease alarm |
|||
|- |
|||
|<#HighRainTodayAlarm> |
|||
|High rain today alarm |
|||
|- |
|||
|<#HighRainRateAlarm> |
|||
|High rainfall rate alarm |
|||
|- |
|||
|<#HighWindGustAlarm> |
|||
|High wind gust alarm |
|||
|- |
|||
|<#HighWindSpeedAlarm> |
|||
|High wind speed alarm |
|||
|- |
|||
|<#DataStopped> |
|||
|1 if the station has apparently stopped sending data to Cumulus, otherwise 0 |
|||
|- |
|||
|<#DataSpikeAlarm> |
|||
|[[File:Badge vMx.png]] Available from version 3.7.0 |
|||
Alarm raised if a data spike is detected, or a data limit exceeded |
|||
|} |
|||
== Extreme Records == |
|||
There are a set of tags for the Cumulus record states. They give a value of '1' if the record has been exceeded; otherwise '0'. For daily records (e.g. temperature range), the record cannot be set until the end of the day when rollover starts. The tag is cleared in Cumulus 1 once the record has been viewed (via main screen or web tag). |
|||
=== Differences depending on Cumulus versions === |
|||
[[File:Badge v1.png]] Cumulus 1.9.x supports all the web tags listed in table below, with the exception of those relating to "humidex" and "feels like". |
|||
[[File:Badge v1.png]] For Cumulus 1 the tags are cleared in one of two ways: |
|||
#Generation of a web page where the web tag is set, clears the record for that web tag. |
|||
#Viewing of an extreme screen tab clears all records listed on that tab. |
|||
[[File:Badge vMx.png]] For versions up to 3.5.0 Cumulus MX works in a different way both in terms of how tags are set (see various topics in support forum) and how they are cleared (essentially the end of rollover clears records, so daily records are only shown for the few microseconds while rollover is being processed). From version 3.7.0, Cumulus MX offers all the web tags listed in table below, at earlier versions it offers a subset of those listed. |
|||
[[File:Badge vMx.png]] For MX these web tags will be set from the time of the record until a timeout value is met (by default each record remains set for 24 hours). |
|||
'''You can change the default MX timeout''': |
|||
*Add a <tt>RecordSetTimeoutHrs=NN</tt> entry to [[Cumulus.ini#Section:_Station|[Station] section in Cumulus.ini]] |
|||
*'''NN''' can be set to any reasonable integer representing hours (for the default set the number '''NN''' to '24'). |
|||
=== Table of web tags available for extreme records === |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:600px" |Function |
|||
|- |
|||
|<#recordsbegandate> |
|||
|The date that Cumulus began tracking all time records (does not prevent earlier record dates being set manually) |
|||
|- |
|||
|<#newrecord> |
|||
|Indicates when any tracked extreme is changed. |
|||
*{{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, |
|||
*0 otherwise |
|||
|- |
|||
|<#TempRecordSet> |
|||
|1 if any temperature-based extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighTempRecordSet> |
|||
|1 if the all-time highest temperature extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowTempRecordSet> |
|||
|1 if the all-time lowest temperature extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighTempRangeRecordSet> |
|||
|1 if the all-time high daily temperature range extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowTempRangeRecordSet> |
|||
|1 if the all-time low daily temperature range extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighAppTempRecordSet> |
|||
|1 if the all-time high apparent temperature extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowAppTempRecordSet> |
|||
|1 if the all-time low apparent temperature extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighHeatIndexRecordSet> |
|||
|1 if the all-time high USA heat index extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighHumidexRecordSet> |
|||
|[[File:Badge vMx.png]]1 if the all-time high Canadian Humidity index extreme has been updated, 0 if not (from version 3.7.0) |
|||
|- |
|||
|<#LowWindChillRecordSet> |
|||
|1 if the all-time greatest wind chill extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighFeelsLikeRecordSet> |
|||
|[[File:Badge vMx.png]]1 if the all-time high feels like temperature extreme has been updated, 0 if not (from version 3.6.0) |
|||
|- |
|||
|<#LowFeelsLikeRecordSet> |
|||
|[[File:Badge vMx.png]]1 if the all-time low feels like temperature extreme has been updated, 0 if not (from version 3.6.0) |
|||
|- |
|||
|<#HighDewPointRecordSet> |
|||
|1 if the all-time high dew point extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowDewPointRecordSet> |
|||
|1 if the all-time low dew point extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighMinTempRecordSet> |
|||
|1 if the all-time high minimum temperature extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowMaxTempRecordSet> |
|||
|1 if the all-time low maximum temperature extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighWindGustRecordSet> |
|||
|1 if the all-time high wind gust extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighWindSpeedRecordSet> |
|||
|1 if the all-time high wind speed extreme has been updated, 0 if not |
|||
|- |
|||
|<#RainRecordSet> |
|||
|1 if any rainfall based extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighRainRateRecordSet> |
|||
|1 if the all-time high rain rate extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighHourlyRainRecordSet> |
|||
|1 if the all-time high hourly rain extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighDailyRainRecordSet> |
|||
|1 if the all-time high daily rain extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighMonthlyRainRecordSet> |
|||
|1 if the all-time high monthly rain extreme has been updated, 0 if not |
|||
|- |
|||
|<#LongestDryPeriodRecordSet> |
|||
|1 if the all-time longest dry period extreme has been updated, 0 if not |
|||
|- |
|||
|<#LongestWetPeriodRecordSet> |
|||
|1 if the all-time longest wet period extreme has been updated, 0 if not |
|||
|- |
|||
|<#HumidityRecordSet> |
|||
|1 if either the highest or lowest humidity extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighHumidityRecordSet> |
|||
|1 if the all-time high humidity light extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowHumidityRecordSet> |
|||
|1 if the all-time low humidity extreme has been updated, 0 if not |
|||
|- |
|||
|<#PressureRecordSet> |
|||
|1 if either the highest or lowest pressure extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighPressureRecordSet> |
|||
|1 if the all-time high pressure extreme has been updated, 0 if not |
|||
|- |
|||
|<#LowPressureRecordSet> |
|||
|1 if the all-time low pressure extreme has been updated, 0 if not |
|||
|- |
|||
|<#WindRecordSet> |
|||
|1 if any wind speed based extreme has been updated, 0 if not |
|||
|- |
|||
|<#HighWindrunRecordSet> |
|||
|1 if the all-time high wind run extreme has been updated, 0 if not |
|||
|} |
|||
==Special tags== |
|||
===OS WMR Series=== |
|||
There are a set of tags for the WMR928, WR100/200 extra sensors: |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:600px" |Function |
|||
|- |
|||
|n/a |
|||
|Now incorporated into the Extra Sensors section above |
|||
|} |
|||
===Davis=== |
|||
'''Please be aware that the tags available are not the same in all versions. |
|||
[[File:Badge vMx.png]]At present this table has not yet been updated for latest MX version.''' |
|||
All (see note for THSWindex) of the following web tags for the Davis PWS are available from Cumulus 1.9.2. Most of the following web tags are available in Cumulus MX 3.0.0 beta from build 3019, Storm tags from 3021. |
|||
'''Both flavours update the values of the reception tags every 15 minutes.''' In Cumulus 1 this applies from 1.9.3, in 1.9.2 they were read, and updated, every minute, in earlier versions not available. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:120px" |Applicability |
|||
!style="width:600px" |Function |
|||
|- |
|||
!<#DavisTotalPacketsReceived> |
|||
|1.9.2 onwards and MX |
|||
|Total number of data packets received. |
|||
|- |
|||
!<#DavisTotalPacketsMissed> |
|||
|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. |
|||
|- |
|||
!<#DavisMaxInARow> |
|||
|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. |
|||
|- |
|||
!<#DavisNumCRCerrors> |
|||
|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. |
|||
|- |
|||
!<#DavisNumberOfResynchs> |
|||
|1.9.2 onwards and MX |
|||
|Number of times the console resynchronised with the transmitter |
|||
|- |
|||
!<#DavisFirmwareVersion> |
|||
|1.9.2 onwards and MX |
|||
|The console firmware version |
|||
|- |
|||
!<#THWindex> |
|||
|1.9.x |
|||
|A derived temperature using Temperature/Humidity/Wind values read from Davis DLL in Cumulus 1.9.x. |
|||
*The THW Index uses humidity and temperature (like Heat Index), but includes the cooling effects of wind (like wind chill). |
|||
*Available from 1.9.2 Build 1009 (Aug 2011). |
|||
|- |
|||
!<#THSWindex> |
|||
|(1.9.x and) MX |
|||
|A heat stress indicator using Temperature/Humidity/Solar/Wind values. |
|||
*The THSW Index uses humidity and temperature (like the Heat Index), but also includes the heating effects of sunshine, and the cooling effects of wind. |
|||
*Therefore requires Davis station with solar sensor. |
|||
[http://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1223&context=animalscinbcr Approx calculation]: Decrease heat index by 1 unit for each 1 mph increase in wind speed, and for each, either 3 Langley increase in solar radiation, or 10% increase in cloud cover. |
|||
'''IMPORTANT NOTES:''' |
|||
#Although this tag is available in Cumulus 1.9.x, there is an issue somewhere in the Davis code that prevents Cumulus 1 obtaining the value (so tag always displays zero). |
|||
#Search the forum for several discussions about "THSW". |
|||
#Cumulus MX reads "LOOP2" packets, and the correct value for this tag can be read there and displayed on 'Now' template. |
|||
|- |
|||
!<#battery> |
|||
|1.x.x and MX |
|||
|The console battery condition in volts. eg "4.82v" |
|||
|- |
|||
!<#txbattery> |
|||
<#txbattery channel=1> |
|||
|1.8.9 onwards and MX |
|||
|The transmitter battery condition, by default it returns the status of all transmitters. (This was displayed from version 1.9.4 to 1.8.9 on the main screen). |
|||
'''Cumulus 1.9.3 onwards Only:''' The optional 'channel' parameter returns the status for a particular transmitter, up to channel=8. The channel result is just the string "ok" or "LOW" for a low battery |
|||
|- |
|||
!<#StormRain> |
|||
|1.x.x and MX |
|||
|The console 'storm rain' current amount (build 1090 onwards for Cumulus 1; 3021 onwards for MX) |
|||
|- |
|||
!<#StormRainStart> |
|||
|1.x.x and MX |
|||
|The console reported '''date''' of the start of the 'storm' (the console does not report start time, but it appears a minimum of 2 tips within 3 hours will trigger a storm start, so using <#LastRainTipISO> in a script might help), but standard Cumulus [[Webtags#Time.2FDate_.27format.27_Parameter| date/time formatting]] can be applied to that date. |
|||
|} |
|||
===Davis WLL === |
|||
New from version 3.6.0. Not available for earlier MX, not available for Cumulus 1. |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" |Web tag_name |
|||
!style="width:600px" |Function |
|||
|- |
|||
|<#DavisReceptionPercent tx=1> |
|||
|WLL transmitter reception percentage (replace 1 by any other transmitter number up to 8) |
|||
|- |
|||
|<#DavisTxRssi tx=0> |
|||
|WLL RSSI of the WiFi connection |
|||
|- |
|||
|<#DavisTxRssi tx=1> |
|||
|WLL RSSI of Transmitter #1 (replace 1 by any other transmitter number up to 8) |
|||
|} |
|||
===Fine Offset=== |
|||
The following tags are specific to the Fine Offset series of PWS |
|||
{| class="wikitable" border="1" |
|||
|- |
|||
!style="width:150px" | Web tag_name |
|||
!style="width:600px" | Function |
|||
|- |
|||
|<#Light> |
|||
|Current Lux value "Fine Offset only" |
|||
|- |
|||
|<#SensorContactLost> |
|||
|1 if the station has lost contact with its remote sensors "Fine Offset only" |
|||
0 if contact has been established |
|||
|} |
|||
=== 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. |
|||
'''CURRENT CONDITIONS: ''' |
|||
<#RCtemp>, <#RCdew>, <#RCheatindex>, <#RChum>, <#RCinhum>, <#RCintemp>, <#RCpress>, <#RCrfall>, <#RCrrate>, <#RCwchill>, <#RCwgust>, <#RCwspeed>, <#RCwlatest> |
|||
'''TODAY''' |
|||
<#RCpressTH>, <#RCpressTL>, <#RCrrateTM>, <#RCtempTH>, <#RCtempTL>, <#RCwgustTM>, <#RCdewpointTH>, <#RCdewpointTL>, <#RCwchillTL>, <#RCheatindexTH>, <#RCapptempTH>, <#RCapptempTL> |
|||
'''RECENT HISTORY''' |
|||
<#RCRecentOutsideTemp>, <#RCRecentWindSpeed>, <#RCRecentWindGust>, <#RCRecentWindLatest>, <#RCRecentWindChill>, <#RCRecentDewPoint>, <#RCRecentHeatIndex>, <#RCRecentPressure>, <#RCRecentRainToday>, <#RCRecentUV> |
|||
Although 'Apparent Temperature' is not included as a tag, it can be [[FAQ#What_formula_does_Cumulus_use_for_Apparent_Temperature.3F | calculated]] in a script from the RC tags for 'outside temperature', 'wind speed', and 'relative humidity' values. In php language this is <tt>$RCapptempCALC = round(<#temp> + (0.33 * (<#hum> / 100 * 6.105 * exp (17.27 * <#temp> / (237.7 + <#temp>) ))) - (0.7 * $wspeed) - 4.0, 2);</tt>. |
|||
There are other derivatives that can be calculated similarly from a set of simultaneous values, as described below the recent history section. |
|||
You need some understanding of Hyper-Text Markup Language to do this correctly, but here are simple examples. |
|||
From '''version 3.5.4''' build 3075, all web tags (except 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. |
|||
# Navigate to '''\CumulusMX\interface''' folder. |
|||
# Open the file '''now.html''' in an editor designed for code (some examples were listed earlier) |
|||
# Near the bottom of the file edit it by inserting HTML comment delimiters (opening after </thead>, closing before </table>) so it looks like this: |
|||
<pre><table id="SolarTable" style="width:100%"> |
|||
<thead> |
|||
<tr> |
|||
<th> Solar</th> |
|||
<th></th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
<!-- |
|||
<tr> |
|||
<td>Solar Radiation</td> |
|||
<td><span id="SolarRad">--</span></td> |
|||
<td>W/m<sup>2</sup></td> |
|||
</tr> |
|||
<tr> |
|||
<td>Sunshine Today</td> |
|||
<td><span id="SunshineHours">--</span></td> |
|||
<td>hrs</td> |
|||
</tr> |
|||
<tr> |
|||
<td>UV</td> |
|||
<td><span id="UVindex">--</span></td> |
|||
<td></td> |
|||
</tr> |
|||
--> |
|||
</table> </pre> |
|||
IMPORTANT NOTES: |
|||
#The above approach works on "now.html", but it does not work on other pages where table rows are dynamically created by an external script, so the existing rows in the table body are dummies whose content is ignored. |
|||
*An alternative technique is to delete the whole table and any "<div> ... </div>" that surrounds only that table, deleting entire code should work on all the HTML pages. |
|||
=== Adding derivatives not shown on the existing admin interface page === |
|||
=Example of '''List Web Tags''' output for MX= |
|||
An application processing interface (api) is used to obtain the values (or in some cases entire tables) shown on many of the web pages in the admin interface. These api are hard coded within the MX code and so you can not edit them. However, in a few cases, the api being used does provide more values than are coded to be shown on a web page. The standard '''\CumulusMX\interface\now.html''' does not include temperature trend for example, but because there is a '''temptrend: inp.TempTrend.toString()''' defined, you can easily add it to the "now" page by a simple insert of the middle row shown here in its context: |
|||
This is from an earlier version than the latest, it appears here simply to show how the web tag option can list tags (although these are separated by comma rather than the new line separator Cumulus uses). |
|||
<pre><tr> |
|||
<td>Outdoor Temperature</td> |
|||
<td><span id="OutdoorTemp">--</span></td> |
|||
<td><span class="TempUnit">--</span></td> |
|||
</tr> |
|||
<tr> |
|||
<td>Trend</td> |
|||
<td><span id="TempTrend">--</span></td> |
|||
<td><span class="TempUnit">--</span> hour<sup>-1</sup></td> |
|||
</tr> |
|||
<tr> |
|||
<td>Dew Point</td> |
|||
<td><span id="OutdoorDewpoint">--</span></td> |
|||
<td><span class="TempUnit">--</span></td> |
|||
</tr></pre> |
|||
You can't add any derivatives into any table unless the value (for the derivative you want to add) is already defined in the related api and JavaScript files. |
|||
There is a section of the support forum devoted to [https://cumulus.hosiene.co.uk/viewforum.php?f=28 Cumulus MX interface customisation], so you can see what other people are doing. There is also [https://cumulus.hosiene.co.uk/viewforum.php?f=36 another sub-forum] for making suggestions on what you would like added to MX. |
|||
AirQuality1, AirQuality2, AirQuality3, AirQuality4, AirQualityAvg1, AirQualityAvg2, AirQualityAvg3, AirQualityAvg4, AllocatedMemory, altimeterpressure, altitude, apptemp, apptempH, apptempL, apptempTH, apptempTL, apptempYH, apptempYL, avgbearing, avgtemp, avgtempY, battery, bearing, BearingRangeFrom, BearingRangeFrom10, BearingRangeTo, BearingRangeTo10, bearingTM, bearingYM, beaudesc, beaufort, beaufortnumber, build, ByMonthAppTempH, ByMonthAppTempHT, ByMonthAppTempL, ByMonthAppTempLT, ByMonthDailyRainH, ByMonthDailyRainHT, ByMonthDewPointH, ByMonthDewPointHT, ByMonthDewPointL, ByMonthDewPointLT, ByMonthGustH, ByMonthGustHT, ByMonthHeatIndexH, ByMonthHeatIndexHT, ByMonthHighDailyTempRange, ByMonthHighDailyTempRangeT, ByMonthHourlyRainH, ByMonthHourlyRainHT, ByMonthHumH, ByMonthHumHT, ByMonthHumL, ByMonthHumLT, ByMonthLongestDryPeriod, ByMonthLongestDryPeriodT, ByMonthLongestWetPeriod, ByMonthLongestWetPeriodT, ByMonthLowDailyTempRange, ByMonthLowDailyTempRangeT, ByMonthMaxTempL, ByMonthMaxTempLT, ByMonthMinTempH, ByMonthMinTempHT, ByMonthMonthlyRainH, ByMonthMonthlyRainHT, ByMonthPressH, ByMonthPressHT, ByMonthPressL, ByMonthPressLT, ByMonthRainRateH, ByMonthRainRateHT, ByMonthTempH, ByMonthTempHT, ByMonthTempL, ByMonthTempLT, ByMonthWChillL, ByMonthWChillLT, ByMonthWindH, ByMonthWindHT, ByMonthWindRunH, ByMonthWindRunHT, chillhours, cloudbase, cloudbaseunit, cloudbasevalue, ConsecutiveDryDays, ConsecutiveRainDays, cooldegdays, cooldegdaysY, CpuCount, CpuName, cumulusforecast, cumulusforecastenc, currcond, currcondenc, CurrentSolarMax, currentwdir, dailygraphperiod, DataStopped, date, DavisFirmwareVersion, DavisMaxInARow, DavisNumberOfResynchs, DavisNumCRCerrors, DavisTotalPacketsMissed, DavisTotalPacketsReceived, dawn, day, daylength, daylightlength, dayname, DaysSince30Dec1899, DaysSinceRecordsBegan, dew, dewpointH, dewpointL, dewpointTH, dewpointTL, dewpointYH, dewpointYL, DiskFree, DiskSize, DisplayMode, domwindbearing, domwindbearingY, domwinddir, domwinddirY, dusk, ErrorLight, ET, ExtraDP1, ExtraDP10, ExtraDP2, ExtraDP3, ExtraDP4, ExtraDP5, ExtraDP6, ExtraDP7, ExtraDP8, ExtraDP9, ExtraHum1, ExtraHum10, ExtraHum2, ExtraHum3, ExtraHum4, ExtraHum5, ExtraHum6, ExtraHum7, ExtraHum8, ExtraHum9, ExtraTemp1, ExtraTemp10, ExtraTemp2, ExtraTemp3, ExtraTemp4, ExtraTemp5, ExtraTemp6, ExtraTemp7, ExtraTemp8, ExtraTemp9, forecast, forecastenc, forecastnumber, forum, graphperiod, gustM, GW1000FirmwareVersion, heatdegdays, heatdegdaysY, heatindex, heatindexH, heatindexTH, heatindexYH, HighAppTempRecordSet, HighDailyRainRecordSet, HighDailyTempRange, HighDewPointRecordSet, HighHeatIndexRecordSet, HighHourlyRainRecordSet, HighHumidityRecordSet, HighMinTempRecordSet, HighMonthlyRainRecordSet, HighPressAlarm, HighPressureRecordSet, HighRainRateAlarm, HighRainRateRecordSet, HighRainTodayAlarm, HighTempAlarm, HighTempRangeRecordSet, HighTempRecordSet, HighWindGustAlarm, HighWindGustRecordSet, HighWindrunRecordSet, HighWindSpeedAlarm, HighWindSpeedRecordSet, hour, hourlyrainTH, hourlyrainYH, hum, humH, humidex, HumidityRecordSet, humL, humTH, humTL, humYH, humYL, inhum, intemp, interval, isdaylight, IsFreezing, IsRaining, IsSunny, IsSunUp, LastDataReadT, LastRainTipISO, LatestError, LatestErrorDate, LatestErrorTime, LatestNOAAMonthlyReport, LatestNOAAYearlyReport, latitude, LeafTemp1, LeafTemp2, LeafTemp3, LeafTemp4, LeafWetness1, LeafWetness2, LeafWetness3, LeafWetness4, LeakSensor1, LeakSensor2, LeakSensor3, LeakSensor4, Light, LightningDistance, LightningStrikesToday, LightningTime, location, LongestDryPeriod, LongestDryPeriodRecordSet, LongestWetPeriod, LongestWetPeriodRecordSet, longitude, longlocation, LowAppTempRecordSet, LowDailyTempRange, LowDewPointRecordSet, LowHumidityRecordSet, LowMaxTempRecordSet, LowPressAlarm, LowPressureRecordSet, LowTempAlarm, LowTempRangeRecordSet, LowTempRecordSet, LowWindChillRecordSet, maxtempL, MemoryStatus, metdate, metdateyesterday, mintempH, minute, MinutesSinceLastRainTip, month, MonthAppTempH, MonthAppTempHD, MonthAppTempHT, MonthAppTempL, MonthAppTempLD, MonthAppTempLT, MonthDailyRainH, MonthDailyRainHD, MonthDewPointH, MonthDewPointHD, MonthDewPointHT, MonthDewPointL, MonthDewPointLD, MonthDewPointLT, MonthGustH, MonthGustHD, MonthGustHT, MonthHeatIndexH, MonthHeatIndexHD, MonthHeatIndexHT, MonthHighDailyTempRange, MonthHighDailyTempRangeD, MonthHourlyRainH, MonthHourlyRainHD, MonthHourlyRainHT, MonthHumH, MonthHumHD, MonthHumHT, MonthHumL, MonthHumLD, MonthHumLT, MonthLongestDryPeriod, MonthLongestDryPeriodD, MonthLongestWetPeriod, MonthLongestWetPeriodD, MonthLowDailyTempRange, MonthLowDailyTempRangeD, MonthMaxTempL, MonthMaxTempLD, MonthMinTempH, MonthMinTempHD, monthname, MonthPressH, MonthPressHD, MonthPressHT, MonthPressL, MonthPressLD, MonthPressLT, MonthRainRateH, MonthRainRateHD, MonthRainRateHT, MonthTempH, MonthTempHD, MonthTempHT, MonthTempL, MonthTempLD, MonthTempLT, MonthWChillL, MonthWChillLD, MonthWChillLT, MonthWindH, MonthWindHD, MonthWindHT, MonthWindRunH, MonthWindRunHD, MoonAge, MoonPercent, MoonPercentAbs, moonphase, moonrise, moonset, newrecord, nextwindindex, OsLanguage, OsVersion, press, PressChangeDownAlarm, PressChangeUpAlarm, pressH, pressL, pressTH, pressTL, presstrend, presstrendenglish, presstrendval, pressunit, PressureRecordSet, pressYH, pressYL, ProgramUpTime, r24hour, RainRecordSet, rainunit, RcapptempTH, RcapptempTL, Rcdew, RcdewpointTH, RcdewpointTL, Rcheatindex, RcheatindexTH, Rchum, Rcinhum, Rcintemp, Rcpress, RcpressTH, RcpressTL, RCRecentDewPoint, RCRecentHeatIndex, RCRecentOutsideTemp, RCRecentPressure, RCRecentRainToday, RCRecentUV, RCRecentWindChill, RCRecentWindGust, RCRecentWindLatest, RCRecentWindSpeed, Rcrfall, Rcrrate, RcrrateTM, Rctemp, RctempTH, RctempTL, Rcwchill, RcwchillTL, Rcwgust, RcwgustTM, Rcwlatest, Rcwspeed, realtimeinterval, RecentDewPoint, RecentHeatIndex, RecentHumidity, RecentOutsideTemp, RecentPressure, RecentRainToday, RecentSolarRad, RecentTS, RecentUV, RecentWindAvgDir, RecentWindChill, RecentWindDir, RecentWindGust, RecentWindLatest, RecentWindSpeed, recordsbegandate, rfall, rfallH, rfallhH, rfallmH, rfallY, RG11RainToday, RG11RainYest, rhour, rmidnight, rmonth, rollovertime, rrate, rrateM, rrateTM, rrateYM, ryear, SensorContactLost, shortdayname, shortmonthname, shortyear, snowdepth, snowfalling, snowlying, SoilMoisture1, SoilMoisture10, SoilMoisture11, SoilMoisture12, SoilMoisture13, SoilMoisture14, SoilMoisture15, SoilMoisture16, SoilMoisture2, SoilMoisture3, SoilMoisture4, SoilMoisture5, SoilMoisture6, SoilMoisture7, SoilMoisture8, SoilMoisture9, SoilTemp1, SoilTemp10, SoilTemp11, SoilTemp12, SoilTemp13, SoilTemp14, SoilTemp15, SoilTemp16, SoilTemp2, SoilTemp3, SoilTemp4, SoilTemp5, SoilTemp6, SoilTemp7, SoilTemp8, SoilTemp9, SolarRad, solarTH, solarYH, stationtype, StormRain, StormRainStart, sunrise, sunset, SunshineHours, SystemUpTime, TapptempH, TapptempL, TapptempTH, TapptempTL, TapptempYH, TapptempYL, Tbeaudesc, Tbeaufort, Tbeaufortnumber, TdewpointH, TdewpointL, TdewpointTH, TdewpointTL, TdewpointYH, TdewpointYL, temp, TempChangeDownAlarm, TempChangeLastHour, TempChangeUpAlarm, tempH, tempL, temprange, temprangeY, TempRecordSet, tempTH, tempTL, temptrend, temptrendenglish, temptrendtext, tempunit, tempunitnodeg, tempYH, tempYL, TgustM, TheatindexH, TheatindexTH, TheatindexYH, ThighDailyTempRange, ThourlyrainTH, ThourlyrainYH, THSWindex, ThumH, ThumL, ThumTH, ThumTL, ThumYH, ThumYL, THWindex, time, timehhmmss, timeUTC, TlongestDryPeriod, TlongestWetPeriod, TlowDailyTempRange, TmaxtempL, TmintempH, tomorrowdaylength, TpressH, TpressL, TpressTH, TpressTL, TpressYH, TpressYL, TrfallH, TrfallhH, TrfallmH, TrrateM, TrrateTM, TrrateYM, TsolarTH, TsolarYH, TtempH, TtempL, TtempTH, TtempTL, TtempYH, TtempYL, TUVTH, TUVYH, TwchillH, TwchillTL, TwchillYL, TwgustTM, TwgustYM, TwindrunH, TwindTM, TwindYM, TwspeedH, txbattery, update, UV, UVTH, UVYH, version, wchill, wchillH, wchillTL, wchillYL, wdir, wdirdata, webcam, wetbulb, wgust, wgustTM, wgustYM, WindRecordSet, WindRoseData, WindRosePoints, windrun, windrunH, windrununit, windrunY, WindSampleCount, windTM, windunit, windYM, wlatest, wsforecast, wsforecastenc, wspddata, wspeed, wspeedH, Ybeaudesc, Ybeaufort, Ybeaufortnumber, year, YearAppTempH, YearAppTempHD, YearAppTempHT, YearAppTempL, YearAppTempLD, YearAppTempLT, YearDailyRainH, YearDailyRainHD, YearDewPointH, YearDewPointHD, YearDewPointHT, YearDewPointL, YearDewPointLD, YearDewPointLT, YearGustH, YearGustHD, YearGustHT, YearHeatIndexH, YearHeatIndexHD, YearHeatIndexHT, YearHighDailyTempRange, YearHighDailyTempRangeD, YearHourlyRainH, YearHourlyRainHD, YearHourlyRainHT, YearHumH, YearHumHD, YearHumHT, YearHumL, YearHumLD, YearHumLT, YearLongestDryPeriod, YearLongestDryPeriodD, YearLongestWetPeriod, YearLongestWetPeriodD, YearLowDailyTempRange, YearLowDailyTempRangeD, YearMaxTempL, YearMaxTempLD, YearMinTempH, YearMinTempHD, YearMonthlyRainH, YearMonthlyRainHD, YearPressH, YearPressHD, YearPressHT, YearPressL, YearPressLD, YearPressLT, YearRainRateH, YearRainRateHD, YearRainRateHT, YearTempH, YearTempHD, YearTempHT, YearTempL, YearTempLD, YearTempLT, YearWChillL, YearWChillLD, YearWChillLT, YearWindH, YearWindHD, YearWindHT, YearWindRunH, YearWindRunHD, yesterday, YSunshineHours |
|||
Revision as of 06:49, 4 October 2020
- Type the URL which is displayed (when MX starts running) into your browser (replace the * with the IP address, or use 'localhost') and the admin interface should appear. You will be viewing your admin interface on the same network as the the MX engine is using, so what you type might be something like http://192.168.1.xy:8998 and you may need to look at your hub or router to see what to use for x and y as they represent the device where MX is running.
- If this is a 'clean' installation, i.e. you don't have an existing Cumulus.ini file defining station type and units to be used, the first thing you will need to do is to go to the settings screen.
- When that page is displayed it always shows the options to set the station type and units.
- Before you leave this page, you can make any other configuration settings by picking a section and clicking it to show the selections within that section.
- Now go to bottom of this page and click the 'Save' button.
Having set the station type, and other settings, you will need stop Cumulus MX and start it again.
The API interface
The current data is transferred from the MX engine to the Admin interface as a JSON string accessed via a Application Program Interface (api). To see the full content type into your browser the same IP reference as for the admin interface and add a few more items i.e. something like http://192.168.1.x:y/api/data/currentdata and you may need to look at your hub or router to see what to use for x and y as they represent the device where MX is running.
Many browsers (e.g Firefox) allow you to specify the type of a file you want to view. So if you specify json as the type this will make the browser show it in a long but fairly readable format. This api is how the current data (now.html) page in the admin interface gets its data. Each table cell contains a span element and each span element is given an id attribute whose value matches one of the items in the json stream coming via the api.
This same api can be used to get weather data into another device, although you may prefer to use MQTT instead as that is more easily customised to just share the few weather values you might want.
Technical aside
When reading the support forum (or articles in this Wiki), you may see mention of AJAX and WebSockets. They are both methods of exchanging information between a web page and the data source. In the Cumulus MX context, they represent two ways of updating the data shown on an admin interface page like now.html or todayyest.html.
Asynchronous JavaScript and XML (AJAX) is the widely used name for what Microsoft invented as XMLHttpRequest (late 1999, Internet Explorer 5.0) now it is implemented in all browsers and no longer purely Microsoft feature. Put as simply as I can, it lets code written into JavaScript ask for updated information from the Cumulus MX engine to update the numbers on the web page. In the standard Cumulus 1 trends.htm web page, AJAX was used to load an updated graph into the web page each time the client pressed a button requesting a graph.
WebSockets is an improvement on AJAX. While AJAX needs the client to make a request before an update can be made, WebSockets adds the option that the source can generate the request and do a remote update. Thus when you open todayyest.html, the MX engine gets a request from that web page to insert the various sub-tables into that web page. Subsequently, when WebSocket use is enabled, the MX engine sends updates with new figures, until you close the web page and a Connection Closed message is sent instead.
The MQTT interface
Until this section is written, please see Cumulus.ini#MQTT for the information you can put into settings, and where to enter it.
The Data Log Viewing and Editing interface
The Data logs tab in the admin interface, gives access to screens that can display the contents of 3 types of log files:
- The standard log file; there is one of these for each month - choose menu item Data logs (yes same name as tab)
- The Extra Sensor log File; there is one of these for each month - choose menu item Extra Data Logs
- The Daily Summary log file; there is only one of these - choose menu item Dayfile
General points common to web pages for editing standard and extra sensor logs
For the first two web pages, but not the daily summary log web page:
- On this screen,you see a box for selecting the log you want to display. The default month and year (shown on loading the web page) is taken from yesterday's date. No log is loaded at start up. You can either type in a period (one or two digit representing month, then hyphen, then four digits representing year) or select year then click month in the data picker (this is produced by the bootstrap software MX uses, it is not the date picker provided by your browser), when you click on the month the box is updated with selected period.
- Next to it is a "Load" button. Press it and the Cumulus MX engine will generate an application programming interface (api) table containing a maximum of 10 lines taken from the log file selected and it is sent in dataTables software format to the web page.
Web page for editing daily summary log only
There is no need to select this log, the Cumulus MX engine will generate an application programming interface (api) table containing just 10 (at most) lines from log file and it is sent in dataTables software format to the web page.
General points common to all 3 web pages for editing all logs
For all 3 web pages
The application programming interface only takes a copy of just 10 (or less if not all ten available) lines from log file and sends those to the admin interface.
The Refresh button will get the 10 lines currently displayed from the MX engine again. Useful if the log file is being updated by another process, or you wisely took a back up before you started editing, you have mucked up the editing, so you replace the original file with the backup and this button gets you access to the ten lines from that replaced copy. For the dayfile.txt, of course MX does a backup for you every day, so you could use that to replace a mucked up edit.
The dataTables software that shows the log on the web page includes pagination. The full (up to) ten lines received from the Cumulus MX engine are shown at a time.
- There is an icon to move to first page
- An icon to move to previous page (if there is an earlier page)
- A set of numbers, click a number (not all shown) to go to that page
- An icon to move to next page (if there is a later page)
- There is an icon to move to last page
When you choose another page, the api has to fetch the (up to) 10 lines for that page. These replace the dataTables insert you saw before
- When you select a line, two buttons are enabled:
- Edit - rather obviously brings up (by the altEditor software that generates it) a dialog (dataTables calls this a modal) showing all fields and letting you change the contents of most individual fields. Scroll down and in the footer are two buttons:
- Save will send the edited line back to the MX engine where the log file is then read into an array, and the relevant array element is replaced by the line received. After that the log file is overwritten from the amended array. After that the log file as a whole is converted back to dataTables format and returned by the api that delivered the table originally.
- Close. You can close this dialog in 3 ways:
- clicking that Close button
- Clicking the small x at the top right
- Clicking anywhere outside the dialog
- Delete - rather obviously brings up a dialog (known as modal by the altEditor software that generates it) showing all fields. Scroll down and in the footer are two buttons:
- The second Delete button on the modal will send the existing line back to the MX engine where the log file is then read into an array, and next MX deletes the relevant array element whose date matches the line received. At present, MX software in the engine does not check the times match! After that the log file is overwritten from the amended array. After that the log file as a whole is converted back to dataTables format and returned by the api that delivered the table originally.
- Close. You can close this dialog in 3 ways:
- clicking that Close button
- Clicking the small x at the top right
- Clicking anywhere outside the dialog
- Edit - rather obviously brings up (by the altEditor software that generates it) a dialog (dataTables calls this a modal) showing all fields and letting you change the contents of most individual fields. Scroll down and in the footer are two buttons:
Be aware
- The api expects the log file to contain all the fields defined in the version of MX that is being used.
- Lines in the log files created by earlier versions of Cumulus (Cumulus 1 or MX) may have fewer fields
- The way that MX has been written is inconsistent in the way it deals with fields that MX now expects but at the time that any log line was created did not exist. When adding the missing fields, some are added with empty string as content and some are added with a single space as content. When the editing modal is opened it may display placeholder text where a missing field is empty, but if you don't see that place-holder, there is probably a space included in the supposedly empty field (that you can't see), but that space (if not removed) could muck up any number you now want to store there.
- If you do edit a line, and then Save, then that particular line (but no others in the log file) will change its length to that used by the current version of MX and you will see additional trailing field separators (commas, semicolons, or whatever defined for your locale) in that line making it seem different from its neighbours. Again you may spot an inconsistency in content as some gaps may appear between delimiters where spaces have been added for fields that were originally missing.
Changing Settings
All settings are stored in Cumulus.ini, so when you stop and restart MX, it can continue without you entering settings again.
Adjusting the majority of the settings is best done using these MX "admin interface" screens simply because for some settings the interface does validation (whilst editing the file directly could introduce invalid settings), you will see that Settings is the penultimate option in the navigation bar, and it has a drop down for the various settings screens that are now described.
- For most screens a HTML form element is used for editing, its content is determined by one JSON file, the allowed settings are fixed by a second JSON file, and there is a Save button to send the contents of that form for processing.
- That Save button must be clicked (and an acknowledgement displayed that the form processing has completed) before the edited settings are accepted by MX.
- Note that some settings take immediate effect, some settings are only read when MX starts, so it may be necessary to stop and restart MX to ensure your new settings take effect
- To make it easy to change settings, such setting screens uses tick boxes, radio buttons, and drop down selection boxes, so the choices available are clearly laid out.
- These form based MX settings screens do some validation, and if you make an error detected by the validation, the contents change to a red colour (red text and red boxes), that means invalid data is present which must be corrected before the form can be sent by pressing Save button.
- Generally, a whole section goes red, not just the item at fault (as determined by JSON file specifying valid options)
- One, or more, items on the page will have an error message added by the form processing in those validation fail cases, indicating porecisely which item(s) need(s) to be corrected.
If you attempt to set these settings by directly editing the file where they are stored, there is a danger of either making a typo or of choosing an illegal value for a particular attribute.
There are however some read only settings that can not be found in any of the setting screens, for these MX cannot set the values, it can only read them. As MX cannot set the values, you need to edit the Cumulus.ini file directly, and the referenced Wiki page identifies read-only settings that can only be adjusted by adding parameters directly in the file. The configuration article lists the read-write settings as well, and tells you what values are accepted for those attributes, and also explains some of the differences in the settings available between Cumulus 1 and MX.
Note that if you change settings, that some settings do not take effect while MX is running, while other settings do take effect instantly (The developer has not provided a list anywhere of which settings do, and which do not, take effect immediently, although sometimes a release notice mentions this for a new setting) - anyway, you may need to restart Cumulus MX to get the new setting picked up. When you exit MX, it saves the read-write settings in Cumulus.ini, and when you restart it it uses the read-only, and read-write, settings it reads from that file.
Station Settings
Each setting has a hint beside it (with a small 'i' for information before each hint). If you have used Cumulus 1, the layout and section headings will be familiar. No settings takes effect until Save button pressed.
Like all the settings pages, there are headings with settings below them that are collapsed so click headings to see the items under them.
The table here for the [Station] section will explain how MX stores the selections you make here, and give a bit more detail about each item and the values it can take.
Please note that, in the Options section, there are two settings that take effect immediately Save is pressed, but are not written to Cumulus.ini when MX is closed, so will be reset when MX is restarted; these two exceptions are to use Debugging logging and to use Data Logging. The first adds extra output to the log file created in "CumulusMX/MXDiags" folder reporting in detail each output task MX does. The second adds extra output to the log file created in "CumulusMX/MXDiags" folder reporting in detail each input received from the weather station.
Station Type
Select the one that matches your weather station. If you are unsure, look at Supported Devices article because it explains how alternative brands are mapped to particular generic types.
Units
Steve Loft designed Cumulus 2, so the units you selected effected how a value was shown, but not how the value was stored. Consequently in Cumulus 2, you could change units at any time easily.
Cumulus 3 (MX) reverts to the approach used by Cumulus 1, the units you choose in the settings determine how values are stored, therefore you choose units when you first start MX and don't change them again (unless you are prepared to edit all the existing values in log files, including all the extreme records).
So for Cumulus MX, it does not matter what units the weather station uses, every reading is converted to units you select here, and generally every thing Cumulus does is based on those units. There is one exception, which only affects those users in USA; internally Cumulus uses Celsius for most calculations, if you have requested Fahrenheit, MX does a conversion from its internal values when writing entries in log files, web tags, and NOAA reports; that means if the weather station outputs in Fahrenheit, there is one conversion on reading the station, and a second conversion on output.
Davis Connection
As you will guess, here is where you enter settings for how Cumulus interacts with your Davis station, see hints by selections.
Davis WeatherLink Live
There are several sub-sections, see hints by inputs.
Ecowitt GW1000 Settings
For equivalent brands please see Supported Devices. See hints by selections.
Log interval
This is interval time (selected from a drop-down), i.e. the interval between one MX log of current values in the Standard log files and the Extra Sensor Files and the next entry in those logs.
- A shorter time interval here has advantage of a greater chance of logging daily maximum and minimum values, but leads to bigger files. Because the log only records spot values (not, as one Cumulus 1 enhancement requested, maximum and minimum since last log entry, which is the approach taken by one of Cumulus's software rivals) there remains a good chance of missing the extremes when logging.
- Conversely, choosing a longer time here increases that probability of missing extremes, but reduces the storage needs on the device running MX.
- For station types that don't have a separate logger, when MX is not running no weather data is captured, so the standard and extra sensor logs will only cover times when MX is running.
- If the weather station you use has a separate logger, setting the log interval here to match the interval used by the separate logger means that on restarting MX when it reads archive data during catch-up it will store spot values at the same interval whether storing archive or live data
- If the station logger interval and this log interval are set to same, then entries in the log files will be at same interval when MX is running and when the Cumulus log entries are populated from station log entries. If they disagree, the Cumulus log will store lines at the station logging interval during reading archive on restart and at the interval set here when MX is running normally; you might not want your Cumulus logs to have an inconsistent interval.
- The normal reason for disagreement between the MX interval and separate logger interval is when MX may be stopped for long periods; most separate loggers are cyclic, they overwrite older entries, so the interval for the separate logger is selected long enough to avoid any chance of over-writing during the period when MX is not running; whilst the MX interval is set short enough to maximise the number of spot readings stored.
- When MX is restarted and reads archived readings, Davis stations, in particular, can struggle to do a correct catch-up if the intervals do not match; with Davis stations MX can be forced to download every log in the logger and thus be stuck in reading archive stage for a long time.
- Calculations like average temperature (calculated by summing all processed measurements and dividing by number of samples) and wind run (calculated by summing all wind speeds and dividing by sum of all intervals between processed measurements) are biased if there is an inconsistency in interval between measurements being processed by MX. If you don't run MX all the time, it can only process what is in the station logger for the times when MX is not running. An average will be skewed (and so not an accurate average) if some of the inputs to that average are based on rapid sampling while MX is running, and some of the inputs taken from infrequent logs when MX is not running.
Davis users
From version 3.7.0 if you use a Davis station, a warning will be output if the log interval set here does not match the Davis logger interval. The developer says:
This is just a warning. Its best to keep the logger intervals the same to avoid excessively long start-ups, but it isn't mandatory. I have put the warning in because lots of people aren't aware they have the issue. Some people may choose to run with a MX interval of say 5 minutes and a station logger of 30 minutes because they say need to cope with extended offline periods. That is a conscious decision though, and they can ignore the warning.
To change the logging interval on a Davis to match the Cumulus logging interval:
- You can use the WeatherLink software if you have it,
- or use a terminal emulator connected to the logger and use the "SETPER xx" command where xx is the log interval in minutes.
Log rollover
Cumulus 1 was originally designed to allow you to match meteorological practice of rollover at 9 am in winter and 10 am in summer (so all days are exactly 24 hours long even when clocks change), but other options can be set.
Cumulus 2 worked on UTC, so the rollover functionality was different.
Cumulus MX operates on the time provided by the device it is running on, it offers a choice between midnight rollover, 9 a.m. rollover, and 9 a.m. rollover adjusted when daylight saving time is reported by the device. Only the last of the 3 options (or no DST) ensures all days are 24 hours long, the other options will have a day of 23 or 25 hours when clocks change (DST starts or ends).
Location
In this section enter:
- Latitude
- Longitude
- The above two are entered as degrees, minutes, and seconds, as this is most accurate way to specify an angular position (internally MX uses decimal degrees with 18 decimal places as 17 of those are needed for one arc second)
- You may need to look these up, don't forget there are 3 numbers (degree, minute, second) and a hemisphere option to select correctly for each
- The longitude and latitude must be right to get sun rise/set calculated correctly.
- Altitude (not used in standard Cumulus functionality, but must be right if you send an alternative pressure reading to an external site)
- Name
- Description
- The name and description are combined with other fixed words on the standard web pages, so must work in that context, and you are advised to look at the generated web page at CumulusMX/web/index.htm to check your choices work with those added words.
People often struggle with these settings. However, these are not settings you have to get right first time, so a mistake is a learning experience.
Options
You will probably find it hard to find this section as it is some way down on the Station settings web page, but it is an important set of settings.
Some settings offer choice from just two options as summarised in the table. The other Options settings are described below table.
| Label | Not ticked | Ticked |
|---|---|---|
| Use bearing zero when calm | Reports bearing from weather station | Takes into account if wind is blowing, if it is not, the resting bearing is invalid |
| Calculate average wind speed | Use wind speed from weather station | Use rolling average of next selection to smooth out individual spikes |
| Use speed for average calculation | Use each 'latest' reading from weather station be it a gust or not for above calculation | Use the average wind speed output from weather station as input to rolling average above |
| Use 100% for 98% humidity | Report the humidity reading from station, even if station never reports 100% | Assume if station says 98 or 99, MX should report 100% |
| Calculate dew point | Use dew point from weather station (it can be calculated using lots of different formulae), if it is available | Use the formula MX has selected for calculating dew point (not same as Cumulus 1), select if weather station does not calculate dew point |
| Calculate wind chill | Use wind chill calculated by weather station (different formulas can be used) | Use the formula MX has selected for calculating wind chill (not same as Cumulus 1), select if weather station does not make its calculation available to MX |
| Synchronise station clock (DAVIS and INSTROMET only) | Don't worry if weather station clock gets out of sync with MX time. | Once a day try to ensure that weather station clock and MX time differ by less than 1 minute |
| Cumulus pressure trend names | Use what weather station reports as the pressure tendency | Let MX work out whether pressure is steady, rising/falling slowly, or rising/falling quickly, select if weather station does not make pressure trend information available |
| Davis VP 1-minute barometer update | Accept if weather station only updates pressure reading and trend information at quarter hour intervals | Force Davis station to update pressure reading and trend information every minute |
| Round wind speeds | Use wind speeds to the accuracy implied by the number of decimal places resulting from the conversion of reading from station to your chosen units | Express wind speeds in integers for your chosen units, rounding away decimal places resulting from unit conversion |
| Ignore LACROSSE clock | Use the time supplied by weather station when writing to standard log | Use the time supplied by device MX is running on when writing to standard log |
Extra Sensors - any sensors whose readings are logged in the standard log file are not extra. You tick here if you want Cumulus to log sensors using the extra sensors log file. Both log files are known as monthly logs in that a new log is created for each new month. (This is nothing to do with the special log that Cumulus 1 maintained for multiple temperature and humidity readings, as it is not available in MX).
Debug logging is used to switch on extra debugging information (about what Cumulus does in its processing) in the MXDiags log file. It only remains on until either it is turned off here or Cumulus is closed. Use a parameter -debug for adding debugging when you start Cumulus if you want the debugging to persist.
Data logging is used to switch on extra debugging information (about interaction between weather station and Cumulus) in the MXDiags log file. It only remains on until either it is turned off here or Cumulus is closed. Use a parameter -logging for adding data logging when you start Cumulus if you want the data logging to persist.
Stop second instance Invokes code that stops you having 2 copies of MX running at same time and conflicting.
Forecast
See tips by each setting.
Solar
See tips by each setting.
Annual Rainfall
The terminology here might be confusing, MX allows you to report seasonal rainfall, i.e. optionally what is reported as this year's rain starts on the first of September say, rather than 1 January. You choose by selecting a month a "Start of rainfall season".
However, the way MX has been written, does not fully implement this functionality, and users might not see the correct annual rainfall figure in all months of their season. MX calculates the figure it reports for this year's rain by summing:
- the rainfall it reports for today
- the amount in "year to date" entered here, if current calendar year matches the "Year to which year-to-date amount applies" entered here
- the amount in dayfile.txt (daily rainfall field) for each log file line starting with one with date matching First of month specified in "Start of rainfall season" and continuing to end of file.
If, you don't choose January here, there is a difficulty with the year-to-date and year to which it applies, because MX assumes the "year-to-date" is applied January to December of the "Year to which year-to-date amount applies" and will therefore incorrectly alter the this year's rain during parts of two different seasons! Consequently, as you go from December to January your "year-to-date" rainfall amount reported suddenly decreases; and when the month changes to that specified in "Start of rainfall season", you find the season re-starts with not zero rain but with this year's rain added in again!
The advice is to review these settings every month and check whether you want them to still apply or need to revise them.
Graphs
See tips by each setting.
Internet Settings
All settings entered here are stored in Cumulus.ini. No settings take effect until Save button pressed.
All retain their settings when MX is restarted. No settings take effect until Save button pressed. This includes FTP logging in Web/FTP settings section, (it is not in this image as it is further down), which is used to add additional information to MXDiags about standard File Transfer Process actions; it will persist across stopping and restarting MX, so you must switch it off here (or with MX stopped within Cumulus.ini FTP site section.
The MX settings on this web page have a lot of similarities with the Cumulus 1 settings
- this MX web page does not cover all of the Cumulus 1 Internet Settings.
- MX has more options than Cumulus 1 had,
- some defaults are different in the two flavours.
Like Cumulus 1, MX has an External Programs section. Here you can enter a command and (in separate box) parameters for 3 possible timings (at real-time, at interval, and at end of day). Typically, on a windows device you would enter the name of a batch file (filename ends in .cmd). On a device running Linux, it could be a shell command file (ends in .sh) or indeed a command like "php" to run a php script whose name is specifed in parameters box. The final parameter might be preceded by ">" to direct the output to a log file.
- In Cumulus 1, you had one setting to upload the standard files (web pages) and a second setting to upload the standard images (moon image, and the graphs)
- MX has one option for the "uploading the standard files" (web pages), a second option "include graph files" (JSON files used by charts), a third option for "generating the moon image", a fourth option for "uploading the moon image". See image where the graph file option is arrowed.
Each section for an external web site has a number of parameters to set, once set MX will automatically upload to that site the weather values in the correct format. Windy has been added to the external web sites that can be automatically updated.
The main new feature (not in Cumulus 1) within this settings page is a Custom Http section. Within here you can define commands (in URL format) to be executed either at some multiple of seconds interval, and/or at a selected intervals in minutes, and/or at end of day (in EOD sequence shown below, the Custom HTTP is run before external programs are run, and that is before upload of Extra Files at EOD).
- In each of these you can use web tags to supply values for parameters to the command.
- Typically this would be used to send information to a remote web server.
- Here is a Custom HTTP example
https://the_URL_here/your_api_here?winddir=<#avgbearing>&windspeedmph=<#wspeed>&windgustmph=<#wgust>&tempf=<#temp>&rainin=<#rhour>&baromin=<#press>&dewptf=<#dew>&humidity=<#hum>&uv=<#UV>"
- No settings take effect until Save button pressed.
- You need to turn on enhanced debug logging to see a confirmation that the http has run such as that shown here:
2018-07-21 16:05:00.821 Custom HTTP Minutes update 2018-07-21 16:05:01.037 Custom HTTP Minutes response: OK: ok! (24.2)
Extra Web Files
This is an extension of the Cumulus 1 facility on the "Files" tab of its Internet Settings.
How to use these settings is explained for both Cumulus flavours on this wiki page, MX has an extra "end of day" (EOD) option, but otherwise you fill it out exactly the same way. Settings in one table cell are stored when you click in another table cell.
Although, there is no Save button as clicking in another cell stores previous edit, the "Enter" button on many keyboards can optionally be used to be sure you have saved all edits made before you leave the screen.
Although to tick both real-time and EOD seems nonsensical, MX will let you tick both for any selected file(s), as it wil then do any processes, and uploads, at both intervals. I don't see why you should do that for normal running, but you might tick both to test a template without waiting for EOD, and after it has been processed once, remove the unwanted real-time tick, so from then onwards it just happens at EOD.
If you have moved from Cumulus 1, and are therefore using an existing Cumulus.ini, these screens may be partly pre-populated, but because mX adds extra options you might need to:
- change some paths in local column, (if your Cumulus 1 and your MX locations are different)
- if you have moved to a Raspberry Pi, or other Unix-derived operating system, remember that path names in Windows use "\" as directory separator, but all other systems use "/".
- There is more advice available at Setting_up_Raspberry_Pi#Configuration_files.
- untick one column, and tick another, now that EOD is an option for the timing as well as real-time and (normal logging/ftp) interval.
- edit some templates (local files) where the process column is ticked because of Web tags differences (some output modifiers are interpreted differently), you will need to revisit every web tag in every template to check whether the output format will need to be added, or amended, to give the output you want.
- you should not need to change remote file names, providing that you have not changed any directories on your web site as (like in Cumulus 1), for extra files, the remote path/file name required ignores any directories specified on Internet Settings screen for FTP settings.
- if you host your own web server, then you might need to change remote paths, if you have moved your server to a new device
- if you use a web server provided by a hosting company, and you change to a different company or they update their offering, then again you might need to update remote column
- the exception to this is if either you host your own web site and/or you are moving them web site to a new location; in these cases your remote file paths may need updating.
Calibration settings
This is identical to Cumulus 1 screen functionality, already explained in Cumulus 1 FAQ here and "Dealing with rogue measurements" in this wiki.
NOAA report settings
This is identical to Cumulus 1 functionality, the various settings available on this screen are already explained for the settings file here.
Just a quick reminder here that while Cumulus 1 is case insensitive for the code for the different ways to specify a month, MX only accepts upper case ('MM' for digits, 'MMM' for 3 letter month etc.), read more about the naming here.
MySQL settings
Cumulus MX includes functionality not in Cumulus 1, and this is one example of a new feature. It is designed to automate updating of MySQL databases whose schema has each table based on one of the Cumulus log files. This MX feature was developed from this script for Cumulus 1.
IMPORTANT
- The MX automatic standard updates described below only work if the database table they are updating has columns named exactly as defined in the standard update.
- The order of those columns does not matter, both CumulusMx.exe and ExportMySQL.exe use column names in their INSERT IGNORE statements.
- All the MX updates will work even if you have defined additional columns in the standard tables and update those in a separate process.
- But when extra columns are added as at versions 3.6.0 and 3.7.0, the MX updates will NOT work unless you have added the extra columns introduced in those releases with correct names.
- For those releases, the release announcement includes a script to run to add the extra columns needed for those (and subsequent) releases.
Brief background on SQL
It was IBM who first invented the concept of Relational Databases in the 1970s and they needed a language for all aspects of interaction with the new database and they called it Structured (English) Query Language. The brackets indicate the word that was later removed. You may find when SQL is talked about, it is either pronounced "sequel" (as if there is still a "E" after the "S") or the 3 letters are simply spelt out.
- SQL is not Structured in the modern computing usage of that word concerning languages that can implement decision trees; instead the word structured here comes from the ability to make a query from a main query and a sub-query, although for some people it is a useful reminder that the key words must appear in a particular order.
- SQL is not just for running Queries, it can give and revoke access permissions, create and drop tables, and do many more tasks than just query a database to get results.
- SQL is a Language as it does have a set vocabulary, a defined sequence in which key words must appear, and it is used for describing tasks to a database.
A relational database has to satisfy a number of conditions, but the basic one is that all data appears in a table with rows and columns. The columns have a particular order, but there is no control over the order of rows, so you can't specify a row number, you either specify a primary key that identifies a particular row, or you specify a sort by the value in any column in a particular order and SQL then returns your selected rows in that sorted order.
Like happened with video recorders and browsers, there was a relational database war, and thus division in language adoption, in the 1980s between 2 big players IBM's SQL and Ingres' QUEL, each gaining popularity in different ways, but the latter lost out, with newcomer Oracle taking the lion share of the commercial usage of SQL soon so very widely adopted, it achieved world dominance. There were a number of minor players who implemented their own relational databases, and initially their own languages, but SQL obtained a ISO definition in 1985 and was then widely adopted, surviving the invention of the internet, and the move from mainframes to small devices.
MySQL is one of the rivals, but all versions of SQL are related and the dialect differences are comparatively minor compared to the commonality of the majority of the language. SQL is designed to be largely independent of how data is stored, so from 2000 as per newer standard for SQL, it now works with XML as well as relational databases. That said, because it can define creation of columns, some SQL code is dependent on how data is stored in a particular database system.
Implementation
Mono and .Net implement SQL capability, and this is utilised by Cumulus MX in the queries it generates. However, for SQL to work on your web site, you need to have a relational database available on your web server that accepts the MySQL that MX generates. It is worth saying that one difference between MySQL and the SQL standard is the former can insert multiple rows in one MySQL statement, but in the standard for SQL the specification says only one row can be inserted by one statement. Having made that clear, the SQL that is generated by the MX engine does only insert one row at a time, so the SQL MX generates is standard SQL.
MX does not include a database to install on your web site. Note, this does not mean your web server must have a MySQL database, as other products will understand the updating SQL (because of the dialect, commonality, and standard-meeting points I have just made), so the automatic updating should always work. One common difference between products is which data types available, so it is just possible that you might have a database that does not understand the column definitions in the MX option to create a table for you using MySQL dialect, so do be prepared in case you have to create each table yourself using a different method, the SQL to create a table is fairly simple, it even starts "CREATE TABLE table_name", but it is the list of columns with their data types and sizes that follows that is tricky if you don't know what is allowed on the database you are using.
Equally, the separate application, ExportMySQL.exe mentioned in its context below, includes SQL to create a table (with MYSQL data types) and add multiple rows in one instruction, so it is only able to work with databases that use MySQL (the clue is in the name of the application), or databases where the tables have already been set up so it is just issuing Insert Ignore SQL.
Mandatory section
- Server Details - expand this drop down as it is used for essential information for any access to the database on your web server:
- Enter your host name or a IPv4 address for your web server. If you host your own server, it might be something like 127.0.0.1. It will be the same as you enter for host in the "internet settings" screen.
- Enter the port for communicating with database server e.g. 33106. (Your web server provider should tell you whether the port is this or another number)
- Enter the User Name for updating your database. (You may be able to set up user names on your database with different permissions, you need to state here one with updating permissions)
- Enter the password for updating your database. (This will be set up for each user name)
- Enter the name of the database that holds the tables you wish to update. (You probably have set this up, ask your provider if you need help)
Optional Sections
The remaining 6 drop-down sections are optional, you choose which you want to use, they appear on the screen in a different order to how I explain them below.
- Some of the optional settings described below, allow you to choose which log file to use for such automatic updates and what to call the table uploaded to (uploads will not work before the required table has been created).
- Alternatively, you can devise your own schema, create that table, and then write the SQL to update your table using web tags to supply all the values.
- You need to turn on enhanced debug logging to see any confirmation that the standard or custom SQL has run. With enhanced logging you will see messages like:
2020-04-09 10:00:01.047 MySQL: 2 rows were affected.
Standard Daily Summary Table
- 1.Dayfile.txt upload
- This section is about uploading to a database table that contains one row for each day.
- This feature takes the set of values that MX has just used for the line added to this log file at the end of the day, and soon afterwards inserts those same values into a new row (with columns named as per SQL example below) in a database table.
- If you don't have a table in your database for this upload (skip to step after SQL if you do), first
- Choose Table name - the default table name is "Dayfile", but you can choose any other name
- Now move down the screen and click the Save button, and wait for MX to pop up Settings Saved message
- Now find "Create database table" section below the Save button and click Create Dayfile.
- MX will confirm when table has been created.
- This will create the table using the following SQL (here using default table name) (the feels like columns were added in MX version 3.6.0):
CREATE TABLE Dayfile (LogDate date NOT NULL ,HighWindGust decimal(4,1) NOT NULL,HWindGBear varchar(3) NOT NULL,THWindG varchar(5) NOT NULL,MinTemp decimal(5,1) NOT NULL,TMinTemp varchar(5) NOT NULL,MaxTemp decimal(5,1) NOT NULL,TMaxTemp varchar(5) NOT NULL,MinPress decimal(6,1) NOT NULL,TMinPress varchar(5) NOT NULL,MaxPress decimal(6,1) NOT NULL,TMaxPress varchar(5) NOT NULL,MaxRainRate decimal(4,1) NOT NULL,TMaxRR varchar(5) NOT NULL,TotRainFall decimal(6,1) NOT NULL,AvgTemp decimal(4,1) NOT NULL,TotWindRun decimal(5,1) NOT NULL,HighAvgWSpeed decimal(3,1),THAvgWSpeed varchar(5),LowHum decimal(4,0),TLowHum varchar(5),HighHum decimal(4,0),THighHum varchar(5),TotalEvap decimal(5,1),HoursSun decimal(3,1),HighHeatInd decimal(4,1),THighHeatInd varchar(5),HighAppTemp decimal(4,1),THighAppTemp varchar(5),LowAppTemp decimal(4,1),TLowAppTemp varchar(5),HighHourRain decimal(4,1),THighHourRain varchar(5),LowWindChill decimal(4,1),TLowWindChill varchar(5),HighDewPoint decimal(4,1),THighDewPoint varchar(5),LowDewPoint decimal(4,1),TLowDewPoint varchar(5),DomWindDir varchar(3),HeatDegDays decimal(4,1),CoolDegDays decimal(4,1),HighSolarRad decimal(5,1),THighSolarRad varchar(5),HighUV decimal(3,1),THighUV varchar(5),HWindGBearSym varchar(3),DomWindDirSym varchar(3),PRIMARY KEY(LogDate, 'MaxFeelsLike', 'decimal(4,1)' ,'TMaxFeelsLike', 'varchar(5)','MinFeelsLike', 'decimal(4,1)','TMinFeelsLike', 'varchar(5)' ) COMMENT = "Dayfile from Cumulus"
- With the table existing, all you need to do is:
- Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQL quoted above] to happen at end of day
- Now move down the screen and click the Save button, and wait for MX to pop up Settings Saved message.
- Now, to populate your table with past rows:
- If you are using Windows, open a command window in the folder where "CumulusMX.exe" is found. Type ExportMySql.exe dayfile
- If you are using another operating system, send the following instruction to the terminal in the folder where you installed MX. sudo mono ExportMySql.exe dayfile
- At the end of the meteorological day, MX will now automatically run the SQL to add a new row with the daily summary values as mentioned at the start of this section.
Another daily summary table
- 2. Custom upload - at rollover
- Use this option with caution - I found that when I ran MX on a Windows PC, this feature worked (although I abandoned it as it did not do all I wanted), but when I tried this feature with MX running on a Raspberry Pi it simply did not work (the first few web tags used reported correctly the values from day that had just ended, but subsequent web tags, from dew point in example below, were useless as they reported the values from first minute of day just starting - the SQl runs in a separate thread in MX to that handling web tags and it appeared the web tags rolled over before the SQL finished even being defined by MX!
- In the previous option, you have no ability to vary the schema (which columns are updated), it will update a column for Total Evaporation even if your weather station cannot calculate that. It will update columns for total hours of sunshine, highest solar radiation level, and the maximum UV in the day even if you cannot measure these. It will not update columns for other parameters that Cumulus processes like Lightening, Soil Moisture, pollutant values, Chill Hours, for whether snow was falling or lying, or the depth of snow if you wanted to be recording those in your daily summary.
- MX provides this alternative option, again doing an upload as part of roll over to next day (sequence shown below, the Custom EOD SQL is run after the day reset to new date.
- In this section you can specify the schema, and say which columns are to be updated with three selections:
- Save - a button after all option sections, until you click it any changes you make in this section have no effect
- A tick box to enable or disable this upload (so you can leave the SQL recorded, but stop running it when you like.
- The SQL you want to run, what you type in this small text box should include INSERT IGNORE (or REPLACE) to insert a row, or include UPDATE to change columns in a row that already exists, like any SQL it must include the name of the table, the columns to be updated, and the values you want to insert into the columns are either expressed as web tags, as SQL functions on web tags, or as a sub-query reading the values from somewhere else.
- Here is an example of a suitable query that MX can process for you
- [note includes yesterday tags e.g. for primary key <#metdateyesterday format=yyyy-MM-dd>, but as caution above says it might, or might not, process correct web tag content so other web tags migt also need to be yesterday versions),
- I have used the SUBSTRING function at one point,
- as it is a custom update the column names listed here are different from the standard example
- I don't have a sub-query in this example, but any SQL that is syntactically valid could appear here, and you could have more than one query in sequence.
- Here is an example of a suitable query that MX can process for you
INSERT IGNORE INTO `test_daily_summary` (`MaxRainRate`, `TMaxRainRate`, `HighHourRain`, `THighHourRain`, `TotRainFall`, `SnowFalling`, `SnowLying`, `SnowDepth`, `CumChillHours`, `LogDate`, `RollOver`, `MinTemp`, `TMinTemp`, `HeatDegDays`, `AvgTemp`, `MaxTemp`, `TMaxTemp`, `CoolDegDays`, `LowDewPoint`, `TLowDewPoint`, `LowHum`, `TLowHum`, `HighHum`, `THighHum`, `HighDewPoint`, `THighDewPoint`, `GreatWindChill`, `TGreatWindChill`, `LowAppTemp`, `TLowAppTemp`, `HighAppTemp`, `THighAppTemp`, `HighHeatInd`, `THighHeatInd`, `MinPress`, `TMinPress`, `MaxPress`, `TMaxPress`, `HighAvgWSpeed`, `THighAvgWSpeed`, `StrongestWindGust`, `TStrongestWindGust`, `BearStrongestWindGust`, `BearStrongestWindGustSym`,`BearDomWind`, `BearDomWindSym`, `TotWindRun`) VALUES ('<#rrateTM>', '<#TrrateTM>', '<#hourlyrainTH>', '<#ThourlyrainTH>', '<#rfall> ', '<#snowfalling>', '<#snowlying>', '<#snowdepth>', '<#chillhours>', '<#metdateyesterday format=yyyy-MM-dd>', '(1 * SUBSTRING(<#rollovertime>,0,2))', '<#tempYL>', '<#TtempYL> ', '<#heatdegdays> ', '<#avgtemp>', '<#tempTH>', '<#TtempTH> ', '<#cooldegdays> ', '<#dewpointTL>', '<#TdewpointTL>', '<#humTL>', '<#ThumTL>', '<#humTH>', '<#ThumTH>', '<#dewpointTH>', '<#TdewpointTH>', '<#wchillTL>', '<#TwchillTL>', '<#apptempTL>', '<#TapptempTL>', '<#apptempTH>', '<#TapptempTH>', '<#heatindexTH>', '<#TheatindexTH>', '<#pressTL>', '<#TpressTL>', '<#pressTH>', '<#TpressTH>', '<#windTM>', '<#TwindTM>', '<#wgustTM>', '<#TwgustTM>', '<#bearingTM>', '<#directionTM>', '<#domwindbearing>', '<#domwinddir>', '<#windrun>', '<#feelslikeTH>','<#TfeelslikeTH>','<#feelslikeTL>','<#TfeelslikeTL>','<#humidexTH>','<#ThumidexTH>');
- Again before you enable this option, there is a facility lower down this setting page (under the heading Create database table) where you can type some SQL to be run immediately, that can create the table you want this option to update, (although it could even populate any table with historic data, it is only intended for a small query). I am using a table that already exists as I have used it for testing changes to my PHP scripts, so I did not need to create a table before I enabled the query shown above.
Standard Monthly table
- 3.Standard log file upload
- Cumulus starts a new log file for each new month, that is why this is called the monthly log.
- This database table has one row for each line in any monthly log and therefore the same table contains all months.
- This feature takes the set of values that MX has just added to the monthly log file, and soon afterwards if this feature is enabled, MX inserts those same values into a new row in a database table.
- If you don't have a table in your database for this upload (skip to step after SQL if you do), first
- Choose Table name - the default table name is "Monthly", but you can choose any other name
- Now move down the screen and click the Save button, and wait for MX to pop up Settings Saved message
- Now find "Create database table" section below the Save button and click Create Monthly.
- MX will confirm when table has been created.
- The SQL used to create the table is (columns marked NOT NULL have been in use for all Cumulus versions, the other columns have been added from various different versions)
CREATE TABLE Monthly ('LogDateTime', 'DATETIME NOT NULL', 'Temp', 'decimal(4,1) NOT NULL', 'Humidity', 'decimal(4,1) NOT NULL',
'Dewpoint', 'decimal(4,1) NOT NULL', 'Windspeed', 'decimal(4,1) NOT NULL', 'Windgust', 'decimal(4,1) NOT NULL','Windbearing' 'smallint(3) unsigned zerofill NOT NULL', 'RainRate', 'decimal(4,$rainDec) NOT NULL', 'TodayRainSoFar', 'decimal(4,$rainDec) NOT NULL', 'Pressure', 'decimal(6,2) NOT NULL', 'Raincounter', 'decimal(6,2) NOT NULL', 'InsideTemp', 'decimal(4,1) NOT NULL', 'InsideHumidity', 'decimal(4,1) NOT NULL', 'LatestWindGust', 'decimal(5,1) NOT NULL', 'WindChill', 'decimal(4,1) NOT NULL', 'HeatIndex', 'decimal(4,1) NOT NULL', 'UVindex', 'decimal(4,1)', 'SolarRad', 'decimal(5,1)', 'Evapotrans', 'decimal(4,1)', 'AnnualEvapTran', 'decimal(5,1)', 'ApparentTemp', 'decimal(4,1)', 'MaxSolarRad', 'decimal(5,1)', 'HrsSunShine', 'decimal(3,1)', 'CurrWindBearing', 'varchar(3)', 'RG11rain', 'decimal(4,1)', 'RainSinceMidnight', 'decimal(4,1)', 'WindbearingSym', 'varchar(3)','CurrWindBearingSym', 'varchar(3)', 'FeelsLike', 'decimal(4,1)') COMMENT = "Monthly logs from Cumulus";
- With the table existing, all you need to do is:
- Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQL quoted above] to happen automatically.
- Now move down the screen and click the Save button, and wait for MX to pop up Settings Saved message.
- The upload you select here will happen every time MX creates a new line in the monthly log file, it might be every 10 minutes, but you may have configured a different interval.
- Separately, to populate your table with past rows:
- If you are using Windows, open a command window in the folder where "CumulusMX.exe" is found. Type ExportMySql.exe monthly
- If you are using another operating system, send the following instruction to the terminal in the folder where you installed MX. sudo mono ExportMySql.exe monthly
Table created from items updated at standard interval
- 4. Custom upload - minutes interval
- One way you could use this option, is to replace the monthly log file upload if you wanted to change the schema, by leaving out some columns if your weather station is not able to measure all the derivatives included in the standard schema.
- You could use this option to add columns that represent fields in your Extra Sensor log file, by specifying the corresponding web tags
- This feature allows you to specify your own SQL for an upload to be repeated every NN minutes. Unlike the Monthly log file upload option you choose what schema (columns) are in the table that you are uploading a new row to and indeed exactly what SQL is used.
- Apart from the need to press the Save button that follows all the options, there are 3 items just for this option:
- A tick box to enable or disable this upload (so you can leave the SQL recorded, but stop running it when you like.
- The SQL you want to run, it should include INSERT IGNORE (or REPLACE or UPDATE) to insert/replace/update a row, include (as all SQL needs) the name of the table, include the columns to be updated and include the values either expressed as web tags or derived from a sub-query.
- A drop down for the number of minutes between runs, the default is 10, but if your weather station updates less frequently, maybe you will choose 15, 20, 30, or 60 as the interval out of the 11 available in drop down.
Table updated at real time interval
- 5. Realtime.txt upload
- Cumulus MX can be set to recreate a file called Realtime.txt on a very frequent basis. The real time interval defines the time from the end of doing one real time update until the start of the next real time update. The file is recreated, in that unlike other log files, MX does not add new rows in each update, the file only ever contains a single line of values.
- MX does not use this realtime.txt file in any of its supplied components, so that file by default is not available on your web server.
- There is the ability elsewhere (Internet Settings screen) to upload this log file to your web server, should you wish to use it. The most common use is as a source for Ajax (JavaScript based) updating of web pages on the same very frequent basis.
- The option being described here is an alternative to having that log file on your web server, instead MX in this option MX updates a database table, adding a new row at the same very frequent interval.
- In this standard option, where you cannot specify which columns to include, MX will put into a database table row, the same set of values it would put into that log file on recreation.
- It is important to stress, this database table has rows added, so it is not equivalent to the uploaded file that contains a single line.
- Cumulus MX can be set to recreate a file called Realtime.txt on a very frequent basis. The real time interval defines the time from the end of doing one real time update until the start of the next real time update. The file is recreated, in that unlike other log files, MX does not add new rows in each update, the file only ever contains a single line of values.
- If you don't already have a table in your database with the right columns for this upload, first
- Choose Table name - the default table name is "Realtime", but you can choose any other name
- Now move down the screen and click the Save button, and wait for MX to pop up Settings Saved message
- Now find "Create database table" section below the Save button and click Create Realtime.
- MX will confirm when table has been created.
- With the table existing, there are 3 steps left:
- Enable - tick here when you are ready for this action of creating new rows to happen automatically.
- Enter in the text box a retention string in format retainVal=NNN retainUnit=XXXX where NNN is a number from 1 to 3 digits long, and XXX is a time unit e.g. second, minute, hour, day, week, month, quarter, or year.
- Because the updates are so frequent this database table grows very quickly, and you need to say when it should delete the older rows so the table never has too many rows. If you think about it, after a few days, you probably do not need to look at this very detailed level of values information within a day. In that case set retention to delete after a few days retainVal=3 retainUnit=day.
- Now move down the screen and click the Save button, and wait for MX to pop up Settings Saved message.
Another table unpdated at an interval measured in seconds
- 6. Custom upload - seconds interval
- This feature allows you to specify your own SQL for an upload to be repeated every NN seconds. This caters for when you want something like the values in "realtime.txt" but want to specify your own schema (set of column names) or your own interval between updates (independent of what has been selected for real-time interval). Like the other custom options, this might be because you have extra sensors or do not have sensors for all items in standard log file.
- Apart from the Save button below all options, there are 3 items specifically for this option:
- A tick box to enable or disable this upload (so you can leave the SQL recorded in Cumulus.ini for when you want to use it again, but start/stop running it as and when you like).
- The SQL you want to run, it should include INSERT IGNORE (or REPLACE or UPDATE) to insert a row, the name of the table, the columns to be updated and the values you include in your SQL are expressed as web tags. You can have more than one SQL statement in this box (end each with semi-colon) so you might want to add a delete "DELETE FROM YourTableName WHERE LogDateTime < DATE_SUB(NOW(), INTERVAL 7 DAY);" after your update/insert command to replicate the retention option of the previous feature, in this case deleting rows over a week old.
- The number of seconds between runs, the default is 10, but if your weather station updates less frequently, maybe you will choose 40 or 60 as the interval. In theory the number of seconds specified here might represent anything between how frequently your weather station reports readings and several hours.
Alarms
This is identical to Cumulus 1 functionality, apart from using a new default location for the files "\CumulusMX\interface\sounds", and the list of alarms available is extended in MX compared to Cumulus 1.
The alarms available are already explained elsewhere in this wiki, so are not repeated here.
Some alarms are shown at the bottom of the Dashboard page of this administrative interface. They also feed a set of Webtags|web tags so you can use them in web pages.
FTP Now
This is similar to the option in the file menu of Cumulus 1 to do an update now. Depending on which build of MX you are using, the functionality varies. On latest build it does whatever updates are set up to happen at normal updating interval whether these are by FTP to your web site, or by copying files between local and remote filenames with path (although both could be on same device).
Editing the Admin Interface
The admin interface provided with MX is generated from some application programming interface (api) produced by MX engine, some JSON files specifying options, some JavaScript files populating content, some cascade styling sheet files determining look, and some HTML files specifying structure. Theoretically, all of this could be customised to suit you as the developer's choices might not match your desires.
Caution against editing Admin Interface
The general advice is do not change any files that are part of the MX package, they are a package and therefore there are interdependencies. Also updating to a newer release is more complicated if you have edited any files, because you need to implement any changes in that release and they will overwrite any edits you have made.
The files as provided in the MX package are a compromise, for example they include reporting on solar measurements but not all weather stations include such measurements.
Given that the admin interface is not shared with anyone else, it could be argued its look and content is not that important. In particular this interface is the only way to change settings, so do not change anything that stops those setting screens from working!
Finally, if you don't like the look of the admin interface, then why are you looking at the admin interface? If it to change settings, does it matter how it looks? If you are looking at the admin interface to see your weather readings and derivations, then why not look at your web pages, as you can edit your web pages to show information in whatever way suits you.
Caution when updating if you have edited Admin Interface
Remember, if you decide to download a new release if you overwrite any file(s) that you have edited, your edit will be lost. It is less likely that a new release will change the interface files than other files, but some releases do change these files. Remember, each release zip contains all MX files, even those not changed since previous release. The release notice will usually give some idea of whether interface files have changed, but it may not list which interface files have been added, modified, or removed.
General points for editing
If you do decide to change any file, I suggest you maintain a back-up copy of the original elsewhere (so it can be gone back to) and you save the edited file under a new name (so you can't lose my edited file by installing a new release).
If you are editing files, use Brackets, Notetab lite, notepad++, or on a Mac BB-edit, i.e. use an editor designed for code. Do not use a word processor, a Microsoft or Google editor or Dreamweaver or any other web editor. The encoding that should be used is UTF, if your editor does not mention encoding, it is the wrong sort of editor!
Changing the look
You need some understanding of Cascading Style Sheets (CSS) to do this, but all you need to do is to edit the relevant style sheet either in \CumulusMX\interface\css or in the relevant folder within the lib folder. Beware, making a change to make one web page in the admin interface look right, might ruin web page in the interface, so making changes is not easy!
You can change the look, it is all defined in .css files. However, because MX makes use of standard libraries (bootstrap, datatables, alcapa etc.) there are a multitude of .css files used and it might not be easy to work out which one to edit. Each HTML page has links to a number of css files.
You will probably make use of developer functions in your browser to inspect any element whose look you wish to change to see where its different properties are defined. It is better to make any such edits at a high level, rather than on any CSS just for that particular element. But don't forget to check every web page in the interface still looks okay as if you do make a change to improve one page it may worsen another page.
As always when editing, keep a copy of original so you can go back to it; keep a copy of your edited file, so installing a new release does not lose you edited file.
Removing Solar Figures
If your weather station does not have solar instrumentation you might wish to remove some of the display elements that relate to that. Of course they will come back when the next release overwrites your change!
You need some understanding of Hyper-Text Markup Language to do this correctly, but here are simple examples.
- Navigate to \CumulusMX\interface folder.
- Open the file now.html in an editor designed for code (some examples were listed earlier)
- Near the bottom of the file edit it by inserting HTML comment delimiters (opening after </thead>, closing before </table>) so it looks like this:
<table id="SolarTable" style="width:100%">
<thead>
<tr>
<th> Solar</th>
<th></th>
<th></th>
</tr>
</thead>
<!--
<tr>
<td>Solar Radiation</td>
<td><span id="SolarRad">--</span></td>
<td>W/m<sup>2</sup></td>
</tr>
<tr>
<td>Sunshine Today</td>
<td><span id="SunshineHours">--</span></td>
<td>hrs</td>
</tr>
<tr>
<td>UV</td>
<td><span id="UVindex">--</span></td>
<td></td>
</tr>
-->
</table>
IMPORTANT NOTES:
- The above approach works on "now.html", but it does not work on other pages where table rows are dynamically created by an external script, so the existing rows in the table body are dummies whose content is ignored.
- An alternative technique is to delete the whole table and any "<div> ... </div>" that surrounds only that table, deleting entire code should work on all the HTML pages.
Adding derivatives not shown on the existing admin interface page
An application processing interface (api) is used to obtain the values (or in some cases entire tables) shown on many of the web pages in the admin interface. These api are hard coded within the MX code and so you can not edit them. However, in a few cases, the api being used does provide more values than are coded to be shown on a web page. The standard \CumulusMX\interface\now.html does not include temperature trend for example, but because there is a temptrend: inp.TempTrend.toString() defined, you can easily add it to the "now" page by a simple insert of the middle row shown here in its context:
<tr>
<td>Outdoor Temperature</td>
<td><span id="OutdoorTemp">--</span></td>
<td><span class="TempUnit">--</span></td>
</tr>
<tr>
<td>Trend</td>
<td><span id="TempTrend">--</span></td>
<td><span class="TempUnit">--</span> hour<sup>-1</sup></td>
</tr>
<tr>
<td>Dew Point</td>
<td><span id="OutdoorDewpoint">--</span></td>
<td><span class="TempUnit">--</span></td>
</tr>
You can't add any derivatives into any table unless the value (for the derivative you want to add) is already defined in the related api and JavaScript files.
There is a section of the support forum devoted to Cumulus MX interface customisation, so you can see what other people are doing. There is also another sub-forum for making suggestions on what you would like added to MX.
