Cumulus.ini: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
6,827 bytes removed ,  05:11, 14 June 2022
m
no edit summary
mNo edit summary
(One intermediate revision by the same user not shown)
Line 153: Line 153:
The MX software offers much functionality and flexibility.  Consequently, it has an extensive set of configuration settings, fortunately apart from the initial settings of model and units (see next sub-section), recent releases have simplified many of the settings for optional features by providing particular selections to affect a whole range of others (for predicted uses), instead of forcing you to individually work through every individual setting.
The MX software offers much functionality and flexibility.  Consequently, it has an extensive set of configuration settings, fortunately apart from the initial settings of model and units (see next sub-section), recent releases have simplified many of the settings for optional features by providing particular selections to affect a whole range of others (for predicted uses), instead of forcing you to individually work through every individual setting.


==First run of MX==
<big>Please see [[First Run of MX]] for how to set up settings when you first use MX.</big>
 
This Wiki page does not explain how to start using MX, please see [[MX on Linux]], [[MX on Windows OS]], and [[MX Administrative Interface]] as appropriate.
 
The key fact relevant here is that no Cumulus release distribution contains a '''Cumulus.ini''' file. So when you first use the software,  you will need to use the [[MX_Administrative_Interface#Changing_Settings|admin interface]] to enter all settings (some have defaults that might be right for you) as described later in this page, and that will lead to creation of the main configuration file.
 
# If you start Cumulus MX without a configuration file, and you have a screen attached so you can see the output from the engine, it will show this: [[File:engineoutput.png|800px|center]]
# As you can see, it is running, but it does not know what station type, so it cannot connect to it, and will not do anything more.
#Open the [[MX Administrative Interface|admin interface]] (either type in http://localhost:8998/ or http://IP Address of your CumulusMX computer:8998/ in your browser of choice), and from the Dashboard interface select Settings and then from the dropdown Config Wizard: [[File:dashboardwiz.jpg|800px|center]] Note this easier than re-typing everything plus "wizard.html" in the URL box of your browser.
#The following screen will open [[File:wizard1.jpg|800px|center]]
#*This is the First Time Setup Wizard which will lead you through the 6 steps that are the minimum requirements to get station up and running with CumulusMX. There is a Next button at the bottom of the page that will take you through these steps. However, the Next button will allow you to move on even though some fields have not been completed. This is not a good idea, however, as CumulusMX will not function correctly if you do not enter these fields so DO NOT click on Next until all the fields on a Wizard page are completed. This is especially true of the Latitude and Longitude settings and the Unit settings. Please make sure that the Unit settings are what you want to use as once set they CANNOT be changed without causing major problems.
#* The settings that are displayed to you in the Station part vary depending on the station type you have selected (and the particular MX release), so there is not a screenshot to show you the other settings for your station type.
#* Location = Your Station name and description, your latitude and longitude (in decimal format (Google Maps provides this if you pin your location), and your height above Sea Level in feet/metres.
#* Units = The units you are going to use for Temperature, Wind, Pressure and Rain. As stated these cannot be changed after their original settings as it will render all CumulusMX stored data invalid, so make sure you set them correctly.
#* Station = Select a Station type from the dropdown box and once you have set this additional settings will appear that are pertinent to the station type you have selected. It is important to get this correct as failure to do so will result in CumulusMX being unable to find your Weather Station.
#* Logging = This is frequency that CumulusMX will store data in the log files. It defaults to 5 minutes but may be changed to other values by clicking on the dropdown. This is also where you set the data Rollover Time to either 9am or Midnight which tells CumulusMX when you consider your end of metrological day processing should take place.
#* Internet = Local Copy or FTP. Local copy assumes you are running your own Internet Web Server on which you will host your own or the default web site and when you click on it a path field will open up so you can tell CumulusMX where to put your files. FTP assumes you will be using a Hosting Company (most people use this option) for your Web Site and once you click on FTP further fields will open up and it is here that you put the details given to you by your Hosting Service in order to FTP the web files to your Web Site. You can set both if you wish but be aware of the extra load that this may impose on your CumulusMX computer.
#* Actions = This where you set the time intervals for CumulusMx to upload standard file and realtime files to your Web Host. Standard files are the files required for a web site and this is called the Normal Interval. To enable it you click on the first box, but if you want these files to be go to Web Host as well you must also click on the FTP box as well. Note this interval is in minutes and that is set on the Normal Interval box (default 15 minutes). Realtime files are those required to run features on your web site like the Gauges. This is in seconds, but please be careful setting it below 5 seconds, as depending on the speed of you Internet connection and the response of your Web Host it may be possible to set a time when the FTP task never completes leading to incorrect readings. The default is 30 seconds and as with the Normal settings you have to enable it and and tick on FTP if you want these files sent to your Web Host.
#* at this point you have set up the minimum settings to get CumulusMX up and running and you will notice that Next button has changed to All Done. When you click on this two things will happen, your initial Cumulus.ini file will be saved and a popup will appear on you Browser and additional line will appear in CumulusMX.exe saying the Station Type has changed - restart required.
# Optionally, use [[Samplestring.ini]] file as a guide to create a [[Strings.ini|strings.ini]] file (look up the cross reference if you want to do this now, but you can leave it to later) where you can tailor a number of texts that Cumulus produces.
#* The advantage of creating your '''strings.ini''' file now, is that it is read when MX starts, and we will shortly restart MX.
# Closing MX is required in order to pick up main configuration file you created in the Wizard and then find your Weather Station.
# MX must be stopped correctly, because it has to do a number of actions after it receives a request to close:
#* If you have a screen attached to the device running the MX engine, you can click in that screen and terminate Cumulus MX by typing '''C''' while holding down the control key (or equivalent if you are using an apple mac).
#* If you are connecting to MX from a remote device, then type into that remote session the control '''C'''.
#* Otherwise do whatever is needed to end the MX executable on your installation.
# Restart Cumulus MX, it will read your new settings (in '''Cumulus.ini''' and the optional '''strings.ini''') on re-starting, it will find the weather station, and start reading the weather data from it. On this first access to your weather station, it will not read any archive data (there is a way to modify [[today.ini]] so it can read what is in the separate logger), but from now (until you stop it) it will read (and from time to time log) the live data while MX remains running.


==What happens if I upgrade MX?==
==What happens if I upgrade MX?==
Line 2,256: Line 2,230:
|}
|}


==Optional Structured Query Language Settings==


SQL is structured in the sense that keywords have to appear in the correct order, and there are rules about which words are mandatory. SQL is not just for running queries that read database tables, it can create database tables, give and revoke permissions, and do many more maintenance type tasks. SQL is a language in that each variant of SQL has a vocabulary and set of rules that are specific to that database server, although there is a sub-set, that is set by "ANSI", of words and constructions that all SQL dialects should obey.
==Optional Report Settings==
 
MX uses two types of SQL. One type is for SQLite database (see [[Cumulusmx.db]] and [[Diary.db]], that type stores data in rows that are numbered, and columns that are named. In a retrieval query you can sort ascending/descending on value in any column.  You can select a row by specifyimg content, but that gets translated into a row number to actually determine what is updated.
 
The file section '''[MySQL]''' is about a different type of database (i.e. Maria database, or Oracle MySQL) these implement a relational database that has to satisfy the rule 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 that what is returned from query should be sorted in an ascending/descending order of the value in a specified column.
 
Both "CumulusMX.exe" and "ExportToMySQL.exe" make use of the following settings:


* File Section is [NOAA]
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
!style="width:30px" | Executable
!style="width:30px" | Parameter Line Entry
!style="width:100px" | Function
!style="width:100px" | Introduced
!style="width:100px" | MX Section
!style="width:60px" | Label on Settings page
!style="width:20px" | Default
!style="width:300px" | Description
!style="width:300px" | Description
|-
|-
| CumulusMX.exe
| AutoCopy=0
| Data Logs menu
| Release 3.12.0
| An option "Update MySQL on Edit" allows you to decide whether MX issues SQL when you edit a data log or "dayfile.txt", so the same edit is made to the corresponding database table, provided that the table has been created with the default name and has the column names defined by default.
| NOAA Reports Settings &rarr; FTP Options
| Auto Copy NOAA report files
| 0 (disable)
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) if your report is to be copied to copy directory during the [[MX_Basic_info#MX_End_of_Day_Process|End of Day process]]
* Don't tick (value shown as 0 in Cumulus.ini) for no copy action
|-
|-
! rowspan="7" |CumulusMX.exe
| AutoFTP=0
| Settings menu &rarr; MySQL settings &rarr; General Options
| First with Cumulus 2
| An option "Buffer commands on failure" allows you to decide whether MX tries to run SQL commands again, if they fail. IMPORTANT: This is to cope with failure due to the database server going down; the option should not be ticked if you are testing new "custom" SQL and may have made a mistake in the coding. You need to ensure the SQL is either generated by MX as a fixed query, or has been tested and is correct synta before considering this option.
| NOAA Reports Settings &rarr; FTP Options
| Auto transfer NOAA report files
| 0 (disable)
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) to enable the file transfer process you have defined for MX, to upload the file for you (at first update time after rollover has completed)
* Don't tick (value shown as 0 in Cumulus.ini) to disable any file transfer process
|-
|-
| Settings menu &rarr; MySQL settings &rarr; Realtime.txt Upload
| AutoSave=1
| An option that can be enabled that automatically updates a "Realtime" table, each new row is effectively what is stored in the file [[realtime.txt]].
| First with Cumulus 2
| NOAA Reports Settings  
| Create NOAA files after daily rollover
|0
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) if you want MX to use the (optional) Reports functionality
* Don't tick (value shown as 0 in Cumulus.ini) if MX Reports functionality not required
|-
|-
| Settings menu &rarr; MySQL settings &rarr; Dayfile.txt Upload
| City=
| An option that can be enabled that at end of day ensures that a new line is added to [[dayfile.txt]] and a new row (with similar data) is inserted into a "Dayfile" table.
| First with Cumulus 2
| NOAA Reports Settings &rarr; Site Details
| City
| (empty)
| Enter here your hamlet, village, town, or city, name
|-
|-
| Settings menu &rarr; MySQL settings &rarr; Monthly log file Upload
| CoolingThreshold=22
| An option that can be enabled that automatically updates a "Monthly" table, every time a new line is added to the [[Standard_log_files|standard data log file]].
| First with Cumulus 2
| NOAA Reports Settings &rarr; Thresholds
| Cooling threshold
| 65<sup>o</sup> F or 18.3<sup>o</sup>C
| [[Heat/cold_degree_days_and_Chill_hours#Cold_Degree_Days|Cold Degree Days]] are a measure of the need to cool the air to make it more comfortable, based on time above, and temperature difference above, a threshold temperature. An international standard says 22 <sup>o</sup>Celsius is a suitable threshold to ensure comfort. For historical consistency, the default used by MX is based on the threshold used when Steve Loft first implemented this in [[Reports_folder#A_brief_history_of_these_reports|Cumulus 2 (enhancement request 44)]], and that was done to match some early look up tables.
|-
|-
| Settings menu &rarr; MySQL settings &rarr; Custom Upload - seconds interval
| CopyDirectory=
| An option that can be enabled that runs some predetermined SQL every time the specified number of seconds has elapsed.
| Release 3.12.0
| NOAA Reports Settings &rarr; Report Options
| Copy Directory
| (empty)
| The folder on the web server you host to which reports are to be copied
|-
|-
| Settings menu &rarr; MySQL settings &rarr; Custom Upload - minutes interval
| FTPDirectory=
| An option that can be enabled that runs some predetermined SQL every time the specified number of minutes has elapsed.
| First with Cumulus 2
| NOAA Reports Settings &rarr; FTP Options
| destination folder
| Depends on release:
* (3.1.0 to 3.11.4) blank
* (3.12.0 onwards) to match change in default web site script specification of '''Reports''' folder
| Specify the destination folder for file transfer to, on your FTP server
*Leave at default (for your release) and MX will work with the default web pages script supplied (at same release)
* Specify a folder relative to FTP root, and MX will upload reports to that folder instead (you are then responsible for writing any script on your web site to find each report and do any processing).
|-
|-
| Settings menu &rarr; MySQL settings &rarr; Custom Upload - at rollover
| HeatingThreshold=15.5
| An option that can be enabled that runs some predetermined SQL just after dayfile.txt has had a new line, but before other end-of-day actions occur.
| First with Cumulus 2
| NOAA Reports Settings &rarr; Thresholds
| Heating threshold
| 65<sup>o</sup> F or 18.3<sup>o</sup>C
|[[Heat/cold_degree_days_and_Chill_hours#Heat_Degree_Days| Heating Degree Days]] are a measure of the need for heating, based on time below, and temperature difference below, a threshold temperature. An international standard says 15.5 <sup>o</sup>Celsius is a suitable threshold to ensure comfort. For historical consistency, the default used by MX is based on the threshold used when Steve Loft first implemented this in [[Reports_folder#A_brief_history_of_these_reports|Cumulus 2 (enhancement request 44)]], and that was done to match some early look up tables.
|-
|-
| ExportToMySQL.exe
| MaxTempComp1=22
| parameters to utility
| First with Cumulus 2
| Determine which file read (and therefore which table updated, using table names set in table name parameters explained in next table)
| NOAA Reports Settings &rarr; Thresholds
|}
| Max temp comparison 1
WARNING: The SQL syntax for [https://mysqlconnector.net/ "My SQL Connector"] used by .NET and therefore by MX, differs in various ways from the MySQL Client or MARIA db syntax.
| (empty)
 
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the first comparison has been set to agree with the cooling degree day threshold in Celsius. Express in Fahrenheit if that is your chosen unit
Here is an example of what might be input as "predetermined SQL", showing how you can use conditionals and web tags:
<pre>
INSERT IGNORE INTO table_name_1 (primary_key, column_name_1, column_name_2 ....) VALUES ('<#primary_key>', '<#web tag_name_1 modifier_1>', '<#web tag_name_2 modifier_2>'  ....);
 
 
BEGIN NOT ATOMIC
IF '<#web tag>' = '---' THEN
simpler query to run if something not numeric;
ELSE
UPDATE table_name_2 SET  column_name_1 = '<#web tag_name_1 modifier_1>', column_name_2 =  '<#web tag_name_2 modifier_2>'  ....  WHERE primary_key = '<#primary_key>';
END IF
END;
</pre>
 
* Introduced in Cumulus MX 3.0.0 beta
* File Section is [MySQL]
* MX page is Settings menu &rarr; MySQL settings
 
{| class="wikitable" border="1"
|-
|-
!style="width:30px" | Parameter Line Entry
| MaxTempComp2=0
!style="width:100px" | MX Section
| First with Cumulus 2
!style="width:60px" | Label on Settings page
| NOAA Reports Settings &rarr; Thresholds
!style="width:20px" | Default
| Max temp comparison 2
!style="width:600px" | Description
| (empty)
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the second comparison has been set to agree with feezing point (I’m using Celsius). Express in Fahrenheit if that is your chosen unit
|-
|-
| BufferOnFailure=0
| MinTempComp1=15.5
| General Options
| First with Cumulus 2
| Buffer commands on failure
| NOAA Reports Settings &rarr; Thresholds
| 0 = ignore errors
| Min temp comparison 1
| Simple tick or not
| (empty)
*Tick (value shown as 1 in Cumulus.ini) if you want MX to store any commands that fail (see note above), and try them again (stored commands lost if MX is stopped)
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the first comparison has been set to agree with the heating degree day  threshold in Celsius. Express in Fahrenheit if that is your chosen unit
* Don't tick (value shown as 0 in Cumulus.ini) if you want MX to ignore any errors
|-
|-
| CustomMySqlMinutesCommandString=
| MinTempComp2=0
| Custom Upload - minutes interval
| First with Cumulus 2
| "SQL command" only shown if next parameter is ticked
| NOAA Reports Settings &rarr; Thresholds
| Min temp comparison 2
| (empty)
| (empty)
| See "predetermined SQL" example above
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the second comparison has been set to agree with feezing point (I’m using Celsius). Express in Fahrenheit if that is your chosen unit
|-
|-
| CustomMySqlMinutesEnabled=0
| MonthFileFormat='NOAAMO'MMyy'.txt'
| Custom Upload - minutes interval
| First with Cumulus 2
| Custom Minutes Enabled
| NOAA Reports Settings &rarr; Output Files
| 0 = don't display other options
| Monthly filename format
| Simple tick or not
| 'NOAAMO'MMyy'.txt' (note quotes round '''NOAAMO''' and round '''.txt''')
*Tick (value shown as 1 in Cumulus.ini) if you want the previous and next options to be displayed, and actioned
| Here you specify the filename template for MX to use when reading, or writing, monthly reports
* Don't tick (value shown as 0 in Cumulus.ini) if MX is not to action the previous and next settings
 
There is a prefix text in quotes,then comes a way to specify months (see [[Reports_folder#NOAA_style_Report_Naming]]), and finally comes the mandatory text extension.  e.g. "NOAAMO"MMMyyyy".txt" would also be valid.
|-
|-
| CustomMySqlMinutesIntervalIndex=6
| Name=Personal Weather Station
| Custom Upload - minutes interval
| First with Cumulus 2
| Interval:
| NOAA Reports Settings &rarr; Site Details
| 6 = 10 minutes
| Site Name
| Drop-down list of predetermined intervals:
* 0 = 1 minute
* 1 = 2 minutes
* 2 = 3 minutes
* 3 = 4 minutes
* 4 = 5 minutes
* 5 = 6 minutes
* 6 = 10 minutes
* 7 = 12 minutes
* 8 = 20 minutes
* 9 = 30 minutes
* 10 = 1 hour (60 minutes)
|-
| CustomMySqlRolloverCommandString=
| Custom Upload - at rollover
| "SQL command" only shown if next parameter is ticked
| (empty)
| (empty)
| See "predetermined SQL" example above
| What you would like to see in report title for your station name
|-
|-
| CustomMySqlRolloverEnabled=0
| NOAAUseUTF8=1
| Custom Upload - at rollover
| First with Cumulus 2
| Custom Rollover Enabled
| NOAA Reports Settings &rarr; Report Options
| 0 = don't display other options
| Use UTF-8 encoding
| Simple tick or not
| 1 (UTF-8)
*Tick (value shown as 1 in Cumulus.ini) if you want the previous and next options to be displayed, and actioned
| Please see [[Reports_folder#Encoding]]
* Don't tick (value shown as 0 in Cumulus.ini) if MX is not to action the previous and next settings
* Tick (value shown as 1 in Cumulus.ini) for default, modern files use UTF-8 encoding, this can display an extended range of characters, including the <sup>o</sup> degree symbol
* If unticked (0 appears in file), then iso-8859-1 encoding is used, this has a more restricted range of characters, and the <sup>o</sup> degree symbol is coded differently
|-
|-
| CustomMySqlSecondsCommandString=
| RainComp1=0.5
| Custom Upload - seconds interval
| First with Cumulus 2
| "SQL command" only shown if next parameter is ticked
| NOAA Reports Settings &rarr; Thresholds
| Rain comparison 1
| (empty)
| (empty)
| See "predetermined SQL" example above
| The report will count the number of days when the daily rainfall exceeds this threshold. In the parameter I have quoted, the first comparison has been set to the same as I have set else where as my significant rain threshold
|-
|-
| CustomMySqlSecondsEnabled=0
| RainComp2=
| Custom Upload - seconds interval
| First with Cumulus 2
| Custom Seconds Enabled
| NOAA Reports Settings &rarr; Thresholds
| 0 = don't display other options
| Rain comparison 2
| Simple tick or not
| (empty)
*Tick (value shown as 1 in Cumulus.ini) if you want the previous and next options to be displayed, and actioned
| The report will count the number of days when the daily rainfall exceeds this threshold.
* Don't tick (value shown as 0 in Cumulus.ini) if MX is not to action the previous and next settings
|-
|-
| CustomMySqlSecondsInterval=10
| RainComp3=
| Custom Upload - seconds interval
| First with Cumulus 2
| Interval (seconds):
| NOAA Reports Settings &rarr; Thresholds
| 10
| Rain comparison 3
| A number field, takes 1 to 59
| (empty)
| The report will count the number of days when the daily rainfall exceeds this threshold.
|-
|-
| Database=
| State=
| Server details
| First with Cumulus 2
| Database name:
| NOAA Reports Settings &rarr; Site Details
| State
| (empty)
| (empty)
| A text field where you enter the name of the database your tables are to be created/updated in
| Enter here your local authority area or region (state in USA)
|-
|-
| DayfileMySqlEnabled=0
| UseDotDecimal=0
| Dayfile.txt upload
| Release 3.9.5 - b3100
| Dayfile Enabled
| NOAA Reports Settings &rarr; Report Options
| 0
| Use a 'dot' decimal point
| Simple tick or not
| 0 (disable)
*Tick (value shown as 1 in Cumulus.ini) if you want MX to at end of day ensure that a new line is added to [[dayfile.txt]] and a new row (with similar data) is inserted into a "Dayfile" table
| Formatting real numbers for when NOAA report parsed by a script
* Don't tick (value shown as 0 in Cumulus.ini) if MX is only to ensure that a new line is added to dayfile.txt
 
Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) if you want NOAA reports to use decimal point even if locale says use decimal comma
* Don't tick (value shown as 0 in Cumulus.ini) if NOAA reports use the integer/decimal separator specified by locale
|-
|-
| DayfileTable=
| UseMinMaxAvg=0
| Dayfile.txt upload
| Release 3.12.0
| Table name
| NOAA Reports Settings &rarr; Report Options
| Dayfile
| Use WHO average or Integrated average
| Having defined this table, and saved the settings, click the "Create Dayfile" button to create the database table with the standard column names. If you change the name here, normal updates and "ExportToMySQl.exe"  will use the table name you define, but the option to update table when you edit "dayfile.txt" will fail (and if set to do so, keep failing as it repeats).
| 0 (integrated average)
|-
| Host=Localhost
| Server details
| Host name
| (empty)
| Set to whatever host name your database server has specified, if you host [[Your_Own_Server]], then you may be able to use "Localhost".
|-
| MonthlyMySqlEnabled=0
| Monthly logfile upload
| Monthly Log Enabled
| 0
| Simple tick or not
| Simple tick or not
*Tick (value shown as 1 in Cumulus.ini) if you want MX to at your standard logging interval ensure that a new line is added to [[Standard_log_files|standard data log file]] and a new row (with similar data) is inserted into a "Monthly" table.
* Tick (value shown as 1 in Cumulus.ini) if you want temperature averages quoted in NOAA reports to use WHO approach: (min + max)/2
* Don't tick (value shown as 0 in Cumulus.ini) if MX is only to ensure that a new line is added to standard data log file
* Don't tick (value shown as 0 in Cumulus.ini) if you want temperature averages quoted in NOAA reports to use integrated calculation: Sum of all temperature measurements divided by count of measurements
|-
|-
| MonthlyTable=
| YearFileFormat='NOAAYR'yyyy'.txt’
| Monthly logfile upload
| First with Cumulus 2
| Table name
| NOAA Reports Settings &rarr; Output Files
| Monthly
| Yearly filename format
| Having defined this table, and saved the settings, click the "Create Monthly" button to create the database table with the standard column names. You might wish to change the name here once a year, to stop the database table getting enormous, if so you might name the table something like "standard2020".  If you change the name here, normal updates and "ExportToMySQl.exe"  will use the table name you define, but the option to update table when you edit "MMMyyyyLog.txt" will fail (and if set to do so, keep failing as it repeats).
| 'NOAAYR'yyyy'.txt'
| Here you specify the filename template for MX to use when reading, or writing, yearly reports
 
There is a prefix text in quotes,then comes a way to specify months (see [[Reports_folder#NOAA_style_Report_Naming]]), and finally comes the mandatory text extension.  
|-
|-
| Pass=
|12hourformat=0
| Server details
| ???
| Password
| NOAA Reports Settings &rarr; Output Files
| (empty)
|Time format
| Set to whatever password is used for update access with the database user name (see below)
|0 (24 hour)  
|-
| How times are output on reports
| Port=3306
* 24 Hour (value shown as 0 in Cumulus.ini)
| Server details
* 12 Hour (value shown as 1 in Cumulus.ini)
| Port number
|}
| 3306
 
| The port related to the host name (defined above) for update access to your database server
 
|-
===Normal Mean Temperatures===
| RealtimeMySql1MinLimit=0
 
| Realtime.txt upload
* File Section is [NOAA]
| Limit Inserts:
* The parameters run from ‘’’NOAATempNormJan=’’’ to ‘’’NOAATempNormDec=’’
| 0 = false
* There is one box labelled for each month on the settings screens
| Simple tick or not
* All the defaults are (blank)
*Tick (value shown as 1 in Cumulus.ini)  
* What you enter is the mean temperature, long-term averages (say over 10 or 30 years if available) say is expected that month, often taken from local climate statistics, or your own past measurements
* Don't tick (value shown as 0 in Cumulus.ini)
 
See explanation beside and below setting
===Normal Precipitation===
 
* File Section is [NOAA]
Rainfall equivalents of mean temperature described above
 
 
==Optional Structured Query Language Settings==
 
SQL is structured in the sense that keywords have to appear in the correct order, and there are rules about which words are mandatory. SQL is not just for running queries that read database tables, it can create database tables, give and revoke permissions, and do many more maintenance type tasks. SQL is a language in that each variant of SQL has a vocabulary and set of rules that are specific to that database server, although there is a sub-set, that is set by "ANSI", of words and constructions that all SQL dialects should obey.
 
MX uses two types of SQL. One type is for SQLite database (see [[Cumulusmx.db]] and [[Diary.db]], that type stores data in rows that are numbered, and columns that are named. In a retrieval query you can sort ascending/descending on value in any column.  You can select a row by specifyimg content, but that gets translated into a row number to actually determine what is updated.
 
The file section '''[MySQL]''' is about a different type of database (i.e. Maria database, or Oracle MySQL) these implement a relational database that has to satisfy the rule 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 that what is returned from query should be sorted in an ascending/descending order of the value in a specified column.
 
Both "CumulusMX.exe" and "ExportToMySQL.exe" make use of the following settings:
 
{| class="wikitable" border="1"
|-
|-
| RealtimeMySqlEnabled=0
!style="width:30px" | Executable
| Realtime.txt upload
!style="width:100px" | Function
| Real time Enabled
!style="width:300px" | Description
| 0 = don't display other options
|-
| Simple tick or not
| CumulusMX.exe
*Tick (value shown as 1 in Cumulus.ini) if you want MX to at your real time interval ensure that a new realtime.txt file is created and a new row (with similar data) is inserted into a "Realtime" table.
| Data Logs menu
* Don't tick (value shown as 0 in Cumulus.ini) if MX is only to ensure that a new line is added to standard data log file
| An option "Update MySQL on Edit" allows you to decide whether MX issues SQL when you edit a data log or "dayfile.txt", so the same edit is made to the corresponding database table, provided that the table has been created with the default name and has the column names defined by default.
|-
|-
| RealtimeRetention=
! rowspan="7" |CumulusMX.exe
| Realtime.txt upload
| Settings menu &rarr; MySQL settings &rarr; General Options
| '''Data Retention value''' and '''Data Retention unit'''
| An option "Buffer commands on failure" allows you to decide whether MX tries to run SQL commands again, if they fail. IMPORTANT: This is to cope with failure due to the database server going down; the option should not be ticked if you are testing new "custom" SQL and may have made a mistake in the coding.  You need to ensure the SQL is either generated by MX as a fixed query, or has been tested and is correct synta before considering this option.
| "7" and "Days"
| The value field will take any number, the unit field is a dropdown:
* Seconds
* Minutes
* Hours
* Days
* Weeks
* Months
Taken together, these determine the period for which rows are kept in the table named in "RealtimeTable", any row older than this specification will be deleted as part of the automatic SQL
|-
|-
| RealtimeTable=Realtime
| Settings menu &rarr; MySQL settings &rarr; Realtime.txt Upload
| Realtime.txt upload
| An option that can be enabled that automatically updates a "Realtime" table, each new row is effectively what is stored in the file [[realtime.txt]].
| Table name
| Realtime
| Having defined this table, and saved the settings, click the "Create Realtime" button to create the database table with the standard column names. Remember that you can tailor the contents of "realtime.txt", if you want non-standard columns in this table, you have to create the table yourself.
|-
|-
| UpdateOnEdit=1
| Settings menu &rarr; MySQL settings &rarr; Dayfile.txt Upload
| General Options
| An option that can be enabled that at end of day ensures that a new line is added to [[dayfile.txt]] and a new row (with similar data) is inserted into a "Dayfile" table.
| Update MySQL on Edit
|-
| 1 = update the table when edit the file
| Settings menu &rarr; MySQL settings &rarr; Monthly log file Upload
| Simple tick or not
| An option that can be enabled that automatically updates a "Monthly" table, every time a new line is added to the [[Standard_log_files|standard data log file]].
*Tick (value shown as 1 in Cumulus.ini)
|-
* Don't tick (value shown as 0 in Cumulus.ini)
| Settings menu &rarr; MySQL settings &rarr; Custom Upload - seconds interval
Please see begining of previous table for explanation and warning about how all defaults must be set for this to work
| An option that can be enabled that runs some predetermined SQL every time the specified number of seconds has elapsed.
|-
| Settings menu &rarr; MySQL settings &rarr; Custom Upload - minutes interval
| An option that can be enabled that runs some predetermined SQL every time the specified number of minutes has elapsed.
|-
| Settings menu &rarr; MySQL settings &rarr; Custom Upload - at rollover
| An option that can be enabled that runs some predetermined SQL just after dayfile.txt has had a new line, but before other end-of-day actions occur.
|-
|-
| User=
| ExportToMySQL.exe
| Server details
| parameters to utility
| User name
| Determine which file read (and therefore which table updated, using table names set in table name parameters explained in next table)
| (empty)
| Database access user name, that matches with password described earlier
|}
|}
WARNING: The SQL syntax for [https://mysqlconnector.net/ "My SQL Connector"] used by .NET and therefore by MX, differs in various ways from the MySQL Client or MARIA db syntax.


Here is an example of what might be input as "predetermined SQL", showing how you can use conditionals and web tags:
<pre>
INSERT IGNORE INTO table_name_1 (primary_key, column_name_1, column_name_2 ....) VALUES ('<#primary_key>', '<#web tag_name_1 modifier_1>', '<#web tag_name_2 modifier_2>'  ....);




==Optional Report Settings==
BEGIN NOT ATOMIC
IF '<#web tag>' = '---' THEN
simpler query to run if something not numeric;
ELSE
UPDATE table_name_2 SET  column_name_1 = '<#web tag_name_1 modifier_1>', column_name_2 = '<#web tag_name_2 modifier_2>'  ....  WHERE primary_key = '<#primary_key>';
END IF
END;
</pre>
 
* Introduced in Cumulus MX 3.0.0 beta
* File Section is [MySQL]
* MX page is Settings menu &rarr; MySQL settings


* File Section is [NOAA]
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
!style="width:30px" | Parameter Line Entry
!style="width:30px" | Parameter Line Entry
!style="width:100px" | Introduced
!style="width:100px" | MX Section
!style="width:100px" | MX Section
!style="width:60px" | Label on Settings page
!style="width:60px" | Label on Settings page
!style="width:20px" | Default
!style="width:20px" | Default
!style="width:300px" | Description
!style="width:600px" | Description
|-
|-
| AutoCopy=0
| BufferOnFailure=0
| Release 3.12.0
| General Options
| NOAA Reports Settings &rarr; FTP Options
| Buffer commands on failure
| Auto Copy NOAA report files
| 0 = ignore errors
| 0 (disable)
| Simple tick or not
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) if your report is to be copied to copy directory during the [[MX_Basic_info#MX_End_of_Day_Process|End of Day process]]
*Tick (value shown as 1 in Cumulus.ini) if you want MX to store any commands that fail (see note above), and try them again (stored commands lost if MX is stopped)
* Don't tick (value shown as 0 in Cumulus.ini) for no copy action
* Don't tick (value shown as 0 in Cumulus.ini) if you want MX to ignore any errors
|-
|-
| AutoFTP=0
| CustomMySqlMinutesCommandString=
| First with Cumulus 2
| Custom Upload - minutes interval
| NOAA Reports Settings &rarr; FTP Options
| "SQL command" only shown if next parameter is ticked
| Auto transfer NOAA report files
| (empty)
| 0 (disable)
| See "predetermined SQL" example above
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) to enable the file transfer process you have defined for MX, to upload the file for you (at first update time after rollover has completed)
* Don't tick (value shown as 0 in Cumulus.ini) to disable any file transfer process
|-
|-
| AutoSave=1
| CustomMySqlMinutesEnabled=0
| First with Cumulus 2
| Custom Upload - minutes interval
| NOAA Reports Settings
| Custom Minutes Enabled
| Create NOAA files after daily rollover
| 0 = don't display other options
|0
| Simple tick or not
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) if you want MX to use the (optional) Reports functionality
*Tick (value shown as 1 in Cumulus.ini) if you want the previous and next options to be displayed, and actioned
* Don't tick (value shown as 0 in Cumulus.ini) if MX Reports functionality not required
* Don't tick (value shown as 0 in Cumulus.ini) if MX is not to action the previous and next settings
|-
|-
| City=
| CustomMySqlMinutesIntervalIndex=6
| First with Cumulus 2
| Custom Upload - minutes interval
| NOAA Reports Settings &rarr; Site Details
| Interval:
| City
| 6 = 10 minutes
| (empty)
| Drop-down list of predetermined intervals:
| Enter here your hamlet, village, town, or city, name
* 0 = 1 minute
|-
* 1 = 2 minutes
| CoolingThreshold=22
* 2 = 3 minutes
| First with Cumulus 2
* 3 = 4 minutes
| NOAA Reports Settings &rarr; Thresholds
* 4 = 5 minutes
| Cooling threshold
* 5 = 6 minutes
| 65<sup>o</sup> F or 18.3<sup>o</sup>C
* 6 = 10 minutes
| [[Heat/cold_degree_days_and_Chill_hours#Cold_Degree_Days|Cold Degree Days]] are a measure of the need to cool the air to make it more comfortable,  based on time above, and temperature difference above, a threshold temperature. An international standard says 22 <sup>o</sup>Celsius is a suitable threshold to ensure comfort. For historical consistency, the default used by MX is based on the threshold used when Steve Loft first implemented this in [[Reports_folder#A_brief_history_of_these_reports|Cumulus 2 (enhancement request 44)]], and that was done to match some early look up tables.
* 7 = 12 minutes
* 8 = 20 minutes
* 9 = 30 minutes
* 10 = 1 hour (60 minutes)
|-
|-
| CopyDirectory=
| CustomMySqlRolloverCommandString=
| Release 3.12.0
| Custom Upload - at rollover
| NOAA Reports Settings &rarr; Report Options
| "SQL command" only shown if next parameter is ticked
| Copy Directory
| (empty)
| (empty)
| The folder on the web server you host to which reports are to be copied
| See "predetermined SQL" example above
|-
|-
| FTPDirectory=
| CustomMySqlRolloverEnabled=0
| First with Cumulus 2
| Custom Upload - at rollover
| NOAA Reports Settings &rarr; FTP Options
| Custom Rollover Enabled
| destination folder
| 0 = don't display other options
| Depends on release:
| Simple tick or not
* (3.1.0 to 3.11.4) blank
*Tick (value shown as 1 in Cumulus.ini) if you want the previous and next options to be displayed, and actioned
* (3.12.0 onwards) to match change in default web site script specification of '''Reports''' folder
* Don't tick (value shown as 0 in Cumulus.ini) if MX is not to action the previous and next settings
| Specify the destination folder for file transfer to, on your FTP server
*Leave at default (for your release) and MX will work with the default web pages script supplied (at same release)
* Specify a folder relative to FTP root, and MX will upload reports to that folder instead (you are then responsible for writing any script on your web site to find each report and do any processing).
|-
|-
| HeatingThreshold=15.5
| CustomMySqlSecondsCommandString=
| First with Cumulus 2
| Custom Upload - seconds interval
| NOAA Reports Settings &rarr; Thresholds
| "SQL command" only shown if next parameter is ticked
| Heating threshold
| 65<sup>o</sup> F or 18.3<sup>o</sup>C
|[[Heat/cold_degree_days_and_Chill_hours#Heat_Degree_Days| Heating Degree Days]] are a measure of the need for heating, based on time below, and temperature difference below, a threshold temperature. An international standard says 15.5 <sup>o</sup>Celsius is a suitable threshold to ensure comfort. For historical consistency, the default used by MX is based on the threshold used when Steve Loft first implemented this in [[Reports_folder#A_brief_history_of_these_reports|Cumulus 2 (enhancement request 44)]], and that was done to match some early look up tables.
|-
| MaxTempComp1=22
| First with Cumulus 2
| NOAA Reports Settings &rarr; Thresholds
| Max temp comparison 1
| (empty)
| (empty)
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the first comparison has been set to agree with the cooling degree day threshold in Celsius. Express in Fahrenheit if that is your chosen unit
| See "predetermined SQL" example above
|-
|-
| MaxTempComp2=0
| CustomMySqlSecondsEnabled=0
| First with Cumulus 2
| Custom Upload - seconds interval
| NOAA Reports Settings &rarr; Thresholds
| Custom Seconds Enabled
| Max temp comparison 2
| 0 = don't display other options
| (empty)
| Simple tick or not
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the second comparison has been set to agree with feezing point (I’m using Celsius). Express in Fahrenheit if that is your chosen unit
*Tick (value shown as 1 in Cumulus.ini) if you want the previous and next options to be displayed, and actioned
* Don't tick (value shown as 0 in Cumulus.ini) if MX is not to action the previous and next settings
|-
|-
| MinTempComp1=15.5
| CustomMySqlSecondsInterval=10
| First with Cumulus 2
| Custom Upload - seconds interval
| NOAA Reports Settings &rarr; Thresholds
| Interval (seconds):
| Min temp comparison 1
| 10
| (empty)
| A number field, takes 1 to 59
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the first comparison has been set to agree with the heating degree day  threshold in Celsius. Express in Fahrenheit if that is your chosen unit
|-
|-
| MinTempComp2=0
| Database=
| First with Cumulus 2
| Server details
| NOAA Reports Settings &rarr; Thresholds
| Database name:
| Min temp comparison 2
| (empty)
| (empty)
| The report will count the number of days when this threshold is exceeded. In the parameter I have quoted, the second comparison has been set to agree with feezing point (I’m using Celsius). Express in Fahrenheit if that is your chosen unit
| A text field where you enter the name of the database your tables are to be created/updated in
|-
|-
| MonthFileFormat='NOAAMO'MMyy'.txt'
| DayfileMySqlEnabled=0
| First with Cumulus 2
| Dayfile.txt upload
| NOAA Reports Settings &rarr; Output Files
| Dayfile Enabled
| Monthly filename format
| 0
| 'NOAAMO'MMyy'.txt' (note quotes round '''NOAAMO''' and round '''.txt''')
| Simple tick or not
| Here you specify the filename template for MX to use when reading, or writing, monthly reports
*Tick (value shown as 1 in Cumulus.ini) if you want MX to at end of day ensure that a new line is added to [[dayfile.txt]] and a new row (with similar data) is inserted into a "Dayfile" table
 
* Don't tick (value shown as 0 in Cumulus.ini) if MX is only to ensure that a new line is added to dayfile.txt
There is a prefix text in quotes,then comes a way to specify months (see [[Reports_folder#NOAA_style_Report_Naming]]), and finally comes the mandatory text extension.  e.g. "NOAAMO"MMMyyyy".txt" would also be valid.
|-
|-
| Name=Personal Weather Station
| DayfileTable=
| First with Cumulus 2
| Dayfile.txt upload
| NOAA Reports Settings &rarr; Site Details
| Table name
| Site Name
| Dayfile
| (empty)
| Having defined this table, and saved the settings, click the "Create Dayfile" button to create the database table with the standard column names. If you change the name here, normal updates and "ExportToMySQl.exe"  will use the table name you define, but the option to update table when you edit "dayfile.txt" will fail (and if set to do so, keep failing as it repeats).
| What you would like to see in report title for your station name
|-
|-
| NOAAUseUTF8=1
| Host=Localhost
| First with Cumulus 2
| Server details
| NOAA Reports Settings &rarr; Report Options
| Host name
| Use UTF-8 encoding
| 1 (UTF-8)
| Please see [[Reports_folder#Encoding]]
* Tick (value shown as 1 in Cumulus.ini) for default, modern files use UTF-8 encoding, this can display an extended range of characters, including the <sup>o</sup> degree symbol
* If unticked (0 appears in file), then iso-8859-1 encoding is used, this has a more restricted range of characters, and the <sup>o</sup> degree symbol is coded differently
|-
| RainComp1=0.5
| First with Cumulus 2
| NOAA Reports Settings &rarr; Thresholds
| Rain comparison 1
| (empty)
| (empty)
| The report will count the number of days when the daily rainfall exceeds this threshold. In the parameter I have quoted, the first comparison has been set to the same as I have set else where as my significant rain threshold
| Set to whatever host name your database server has specified, if you host [[Your_Own_Server]], then you may be able to use "Localhost".
|-
|-
| RainComp2=
| MonthlyMySqlEnabled=0
| First with Cumulus 2
| Monthly logfile upload
| NOAA Reports Settings &rarr; Thresholds
| Monthly Log Enabled
| Rain comparison 2
| 0
| (empty)
| Simple tick or not
| The report will count the number of days when the daily rainfall exceeds this threshold.
*Tick (value shown as 1 in Cumulus.ini) if you want MX to at your standard logging interval ensure that a new line is added to [[Standard_log_files|standard data log file]] and a new row (with similar data) is inserted into a "Monthly" table.
* Don't tick (value shown as 0 in Cumulus.ini) if MX is only to ensure that a new line is added to standard data log file
|-
|-
| RainComp3=
| MonthlyTable=
| First with Cumulus 2
| Monthly logfile upload
| NOAA Reports Settings &rarr; Thresholds
| Table name
| Rain comparison 3
| Monthly
| (empty)
| Having defined this table, and saved the settings, click the "Create Monthly" button to create the database table with the standard column names. You might wish to change the name here once a year, to stop the database table getting enormous, if so you might name the table something like "standard2020".  If you change the name here, normal updates and "ExportToMySQl.exe"  will use the table name you define, but the option to update table when you edit "MMMyyyyLog.txt" will fail (and if set to do so, keep failing as it repeats).
| The report will count the number of days when the daily rainfall exceeds this threshold.
|-
|-
| State=
| Pass=
| First with Cumulus 2
| Server details
| NOAA Reports Settings &rarr; Site Details
| Password
| State
| (empty)
| (empty)
| Enter here your local authority area or region (state in USA)
| Set to whatever password is used for update access with the database user name (see below)
|-
|-
| UseDotDecimal=0
| Port=3306
| Release 3.9.5 - b3100
| Server details
| NOAA Reports Settings &rarr; Report Options
| Port number
| Use a 'dot' decimal point
| 3306
| 0 (disable)
| The port related to the host name (defined above) for update access to your database server
| Formatting real numbers for when NOAA report parsed by a script
|-
 
| RealtimeMySql1MinLimit=0
Simple tick or not
| Realtime.txt upload
* Tick (value shown as 1 in Cumulus.ini) if you want NOAA reports to use decimal point even if locale says use decimal comma
| Limit Inserts:
* Don't tick (value shown as 0 in Cumulus.ini) if NOAA reports use the integer/decimal separator specified by locale
| 0 = false
| Simple tick or not
*Tick (value shown as 1 in Cumulus.ini)
* Don't tick (value shown as 0 in Cumulus.ini)
See explanation beside and below setting
|-
| RealtimeMySqlEnabled=0
| Realtime.txt upload
| Real time Enabled
| 0 = don't display other options
| Simple tick or not
*Tick (value shown as 1 in Cumulus.ini) if you want MX to at your real time interval ensure that a new realtime.txt file is created and a new row (with similar data) is inserted into a "Realtime" table.
* Don't tick (value shown as 0 in Cumulus.ini) if MX is only to ensure that a new line is added to standard data log file
|-
| RealtimeRetention=
| Realtime.txt upload
| '''Data Retention value''' and '''Data Retention unit'''
| "7" and "Days"
| The value field will take any number, the unit field is a dropdown:
* Seconds
* Minutes
* Hours
* Days
* Weeks
* Months
Taken together, these determine the period for which rows are kept in the table named in "RealtimeTable", any row older than this specification will be deleted as part of the automatic SQL
|-
| RealtimeTable=Realtime
| Realtime.txt upload
| Table name
| Realtime
| Having defined this table, and saved the settings, click the "Create Realtime" button to create the database table with the standard column names. Remember that you can tailor the contents of "realtime.txt", if you want non-standard columns in this table, you have to create the table yourself.
|-
|-
| UseMinMaxAvg=0
| UpdateOnEdit=1
| Release 3.12.0
| General Options
| NOAA Reports Settings &rarr; Report Options
| Update MySQL on Edit
| Use WHO average or Integrated average
| 1 = update the table when edit the file
| 0 (integrated average)
| Simple tick or not
| Simple tick or not
* Tick (value shown as 1 in Cumulus.ini) if you want temperature averages quoted in NOAA reports to use WHO approach: (min + max)/2
*Tick (value shown as 1 in Cumulus.ini)  
* Don't tick (value shown as 0 in Cumulus.ini) if you want temperature averages quoted in NOAA reports to use integrated calculation: Sum of all temperature measurements divided by count of measurements
* Don't tick (value shown as 0 in Cumulus.ini)
|-
Please see begining of previous table for explanation and warning about how all defaults must be set for this to work
| YearFileFormat='NOAAYR'yyyy'.txt’
|-
| First with Cumulus 2
| User=
| NOAA Reports Settings &rarr; Output Files
| Server details
| Yearly filename format
| User name
| 'NOAAYR'yyyy'.txt'
| (empty)
| Here you specify the filename template for MX to use when reading, or writing, yearly reports
| Database access user name, that matches with password described earlier
 
There is a prefix text in quotes,then comes a way to specify months (see [[Reports_folder#NOAA_style_Report_Naming]]), and finally comes the mandatory text extension.
|-
|12hourformat=0
| ???
| NOAA Reports Settings &rarr; Output Files
|Time format
|0 (24 hour)  
| How times are output on reports
* 24 Hour (value shown as 0 in Cumulus.ini)
* 12 Hour (value shown as 1 in Cumulus.ini)
|}
|}


===Normal Mean Temperatures===
* File Section is [NOAA]
* The parameters run from ‘’’NOAATempNormJan=’’’ to ‘’’NOAATempNormDec=’’
* There is one box labelled for each month on the settings screens
* All the defaults are (blank)
* What you enter is the mean temperature, long-term averages (say over 10 or 30 years if available) say is expected that month, often taken from local climate statistics, or your own past measurements
===Normal Precipitation===
* File Section is [NOAA]
Rainfall equivalents of mean temperature described above


==Optional Third-party Upload Settings==
==Optional Third-party Upload Settings==
5,838

edits

Navigation menu