5,838
edits
m (cut) |
m (→User Interface) |
||
As with Cumulus 1, if there are any settings which are not currently available via the user interface, you can change them by stopping Cumulus and editing [[Cumulus.ini]]. Follow that link to see what you can add in that file, and (if you are swapping from Cumulus 1 to MX) how that file varies between Cumulus flavours.
== Changing Settings ==
This is done using the MX "user interface", 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.
Most settings are '''best made using these screens''' rather than in the file that stores them, as each setting screen uses tick boxes, radio buttons, and drop down selection boxes, wherever possible, so the choices available are clearly laid out. There are however some settings that can not be found in any of the setting screens, for these you need to edit the [[Cumulus.ini]] file directly, and the referenced Wiki page gives details of which settings can only be adjusted by adding parameters in the file, and tells you what values are accepted for those attributes.
=== Station Settings ===
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. Like all the settings pages, the headings are collapsed and need to be clicked to see the items under them. The table [[Cumulus.ini#Section:_Station|here]] 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.
=== Internet Settings ===
This has a lot of similarities with the [[Cumulus_Screenshots#Sites.2FOptions_Tab|Cumulus 1 settings]], except that this screen only covers what was on the main tab in Cumulus 1. Again there are hints, MX has more options than Cumulus 1 had, and some defaults are different in the two flavours. Windy has been added to the external web sites that can be automatically updated.
The main new feature within this settings page is a '''Custom Http''' section. Within here you can define commands to be executed at some multiple of seconds interval, at one of 1 specified intervals in minutes and at end of day (before external programs, and that is before EOD for Extra Files). In each of these you can use web tags to supply values for parameters to the command. You need to turn on enhanced debug logging to see confirmation that the http has run:
<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. How to use these settings is explained for both Cumulus flavours on another Wiki page [[Customised_templates#What_to_select_on_the_.27Files.27_tab_of_the_Internet_Settings_screen_within_the_.27Configuration.27_menu|here]], MX has an extra "end of day" option (leave "realtime" and normal updating columns blank if you tick the new column), but otherwise you fill it out exactly the same way. If you have moved from Cumulus 1, you might need to:
# change some paths in local column, as you may be referencing some files moved when you installed MX
# 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 where the process column is ticked because of [[Webtags|Web tags differences]] meaning that some output modifiers are interpreted differently.
=== 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.
=== NOAA report settings ===
This is identical to Cumulus 1 functionality, the various settings available on this screen are already explained [[Cumulus.ini#Section:_NOAA|elsewhere]] in this wiki.
=== MySQL settings ===
Cumulus MX includes functionality not in Cumulus 1, and this is one example of a new feature. It was developed from [[ImportCumulusFile|this script]] for Cumulus 1. If you want to insert historic data (i.e. from before you first use this feature in MX), the script just referenced can be used, or you can write your own SQL.
'''Mandatory section'''
* Server Details - expand this drop down as it is used for essential information for any access to database
*# 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 is the same as you enter for host in the "internet settings" screen.
*# Enter the port for communicating with database server e.g. 33106.
*# Enter the User Name for updating your database.
*# Enter the password for updating your database.
*# Enter the name of the database that holds the tables you wish to update
'''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.
* 1.''Dayfile.txt upload''
** 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
** There are 3 items to use, 2 in this section and below all the option sections a Save button:
**# Enable - tick here when you are ready for this action [using the schema (set of column names) in the SQL quoted below] to happen at end of day
**# Table name - the default table name is "Dayfile", but you can choose any other name
**# Save - a button after all option sections, until you click it any changes you make in this section have no effect
** Before you reach the end of day that will use this option you do need to create the required database table, and you will find the necessary option lower down on the setting page '''Create Dayfile'''. Do not use the Create action until you have chosen a table name in the upload section (if you don't want default table name) and have clicked Save to tell MX to use your chosen name. Once you have done that, click this Create Dayfile option and it will create the table using the following SQL (here using default table name):
<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)) COMMENT = "Dayfile from Cumulus"</pre>
*2. ''Custom upload - at rollover''
** In the previous option, you have no ability to vary the schema, 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 record whether snow was falling or lying, or the depth of snow even if you are recording those.
** MX provides this alternative option, again doing an upload as part of roll over to next day, but here 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 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 I have had to include some yesterday tags e.g. for primary key ('''<#metdateyesterday format=yyyy-MM-dd>''') and that I have added a second query with sub-query after the first to update a field for which there is no web tag, note the extra quotes and brackets required to define a value in this way]:
<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`, `BearDomWind`, `BearDomWindSym`, `TotWindRun`) VALUES ('<#rrateTM>', '<#TrrateTM>', '<#hourlyrainTH>', '<#ThourlyrainTH>', '<#rfall> ', '<#snowfalling>', '<#snowlying>', '<#snowdepth>', '<#chillhours>', '<#metdateyesterday format=yyyy-MM-dd>', '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>', '<#domwindbearing>', '<#domwinddir>', '<#windrun>'); UPDATE `test_daily_summary` SET `DailyChillHours`= "(<#chillhours> - (SELECT `CumChillHours` FROM `test_daily_summary` WHERE `LogDate` = '(DATE_SUB(<#metdateyesterday format=yyyy-MM-dd>, INTERVAL 1 DAY)))'";</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.
*3.''Monthly log file upload''
** Just like with the dayfile.txt upload option, you select the table name in this option and click Save button, then use a separate option, lower down this settings page, to create the necessary table and that option is '''Create Monthly'''.
** This feature allows you to upload the file that Cumulus creates each month to log detailed measurements on a regular basis, apart from the Save button below it there are just two items:
**# A tick box, where you tick if you want a standard table structure to be used to reflect the fields in the [[Monthly_log_files|detailed log file]]
**# A text box where you can change the default table name to one that suits you better. Do not leave this blank, SQL requires a table name.
** 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.
*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.
** 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.
*5. ''Realtime.txt upload''
** This feature allows you to upload the file that Cumulus recreates on the most frequent basis. MX does not use the realtime.txt file in any of its supplied components, so that file by default is not available on your web server. There is an option elsewhere (Internet Settings screen) to upload this file, but an alternative is to get MX to put the values it would put into that file into a database table and this option is to do that.
**Apart from the Save button below all options, there are 3 items specifically for this option:
**# A tick box to enable this very frequent upload
**# A text box where you can change the default table name
**# A text box where you enter 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 like "days"
** 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=days''.
*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 own interval between updates. In theory the number of seconds specified here might represent anything between how frequently your weather station reports readings and several hours.
**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, but stop running it 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.
=== Alarms ===
This is identical to Cumulus 1 functionality, apart from using a new default location for the files "\CumulusMX\interface\sounds", the alarms available are already explained [[Cumulus.ini#Section:_Alarms|elsewhere]] in this wiki.
The alarms are shown at the bottom of the Dashboard page of the user interface. They also feed a set of [[Webtags#Alarms|Webtags]].
=== 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 User Interface ==
=== Caution against editing User 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. 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 user 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 user interface, then why not look at your web pages, apart from settings, they should show you the same information, and you can edit your web pages to show information in whatever way suits you.
=== Caution when updating if you have edited User Interface ===
Remember, if you decide to download a new release to not overwrite any file(s) that you have edited, or 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 Notetab lite, notepad++ (for windows), or BB-edit on a Mac, 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
=== Changing the look ===
|
edits