Category:Cumulus MX: Difference between revisions

1,593 bytes added ,  11:23, 27 April 2020
m
Line 574: Line 574:
<pre> /home/pi/CumulusMX/cumulusmx.sh -s</pre>
<pre> /home/pi/CumulusMX/cumulusmx.sh -s</pre>


= User Interface =
= Administrative Interface =
#Type the URL which is displayed (when MX starts running) into your browser (replace the * with the IP address, or use 'localhost') and the interface should appear. If this is a 'clean' installation, the first thing you will need to do is to go to the '''settings''' screen.  
 
#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.  
#*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.
#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.
#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.
Line 583: Line 585:


== Changing Settings ==
== 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.
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 them is best done using the MX "admin interface" screens, 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. To make it easy to change settings, each setting screen uses tick boxes, radio buttons, and drop down selection boxes, wherever possible, so the choices available are clearly laid out.
 
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.


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, and also explains some of the differences in the settings available between Cumulus 1 and MX.
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, 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 - anyway, you ''may'' need to restart Cumulus MX to get the new setting picked up. When you exit MX, it saves the settings in [[Cumulus.ini]], and when you restart it it uses the settings it reads from that file.
'''Note that if you change settings''', that '''some''' settings do not take effect while MX is running, while other settings do take effect instantly - anyway, you ''may'' need to restart Cumulus MX to get the new setting picked up. When you exit MX, it saves the settings in [[Cumulus.ini]], and when you restart it it uses the settings it reads from that file.


=== Station Settings ===
=== Station Settings ===
Line 595: Line 601:
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.
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:
The main new feature within this settings page is a '''Custom Http''' section. Within here you can define commands to be executed either at some multiple of seconds interval, and/or at a selected intervals in minutes, and/or 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 any confirmation that the http has run:
<pre>
<pre>
2018-07-21 16:05:00.821 Custom HTTP Minutes update
2018-07-21 16:05:00.821 Custom HTTP Minutes update
Line 601: Line 607:


=== Extra Web Files ===
=== 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  [[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" option, but otherwise you fill it out exactly the same way.   
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  [[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.   


Although to tick both real-time and EOD seems nonsensical, MX will let you do 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, after it has been processed once, remove the unwanted real-time tick.
Although to tick both real-time and EOD seems nonsensical, MX will let you for any selected file(s) do the 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''', you might need to:
'''If you have moved from Cumulus 1''', and are therefore using an existing Cumulus.ini, these screens may be partly pre-populated, despite that you might need to:
# change some paths in local column, as you may be referencing some files moved when you installed MX
# 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.
# 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.
# edit some templates (local files) where the process column is ticked because of [[Webtags|Web tags differences]] meaning that some output modifiers are interpreted differently.
# you should not need to change remote file names, providing that you have not changed any directories on your web site nor changed directories specified on Internet Settings screen for FTP settings.


=== Calibration settings ===
=== Calibration settings ===
Line 614: Line 621:


=== NOAA report settings ===
=== 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.
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. 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.).


=== MySQL settings ===
=== 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.
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. It is designed to automate updating of MySQL databases whose schema has each table based on one of the Cumulus log files. 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.
 
If you want to insert historic data (i.e. from before you first use this feature in MX), the Cumulus 1 script just referenced can be used, or you can write your own SQL to do this one-off task.




Line 695: Line 704:
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).
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 ==
== Editing the Admin Interface ==


=== Caution against editing User Interface ===
=== 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. 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!  
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 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 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.
Finally, if you don't like the look of the admin 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 ===
=== Caution when updating if you have edited Admin 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.  
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.  


Line 749: Line 758:
*An alternative technique is to delete the whole table and any "&lt;div> .. &lt;/div>" that surrounds only that table, that will work on all the HTML pages.  
*An alternative technique is to delete the whole table and any "&lt;div> .. &lt;/div>" that surrounds only that table, that will work on all the HTML pages.  


=== Adding derivatives not shown on the existing interface page ===
=== Adding derivatives not shown on the existing admin interface page ===
It is a JavaScript file '''\CumulusMX\interface\js\dashboard.js''' that reads the real-time file and inserts particular content into position indicated by values of the HTML attribute "id" on the interface screens. The standard '''\CumulusMX\interface\now.html''' does not include temperature trend for example, but because there is a '''temptrend: inp.TempTrend.toString()''' defined in the JavaScript file, you can easily add it to the "now" page by a simple insert of the middle row here:
It is a JavaScript file '''\CumulusMX\interface\js\dashboard.js''' that reads the real-time file and inserts particular content into position indicated by values of the HTML attribute "id" on the admin interface screens. The standard '''\CumulusMX\interface\now.html''' does not include temperature trend for example, but because there is a '''temptrend: inp.TempTrend.toString()''' defined in the JavaScript file, you can easily add it to the "now" page by a simple insert of the middle row here:
<pre><tr>
<pre><tr>
           <td>Outdoor Temperature</td>
           <td>Outdoor Temperature</td>
5,838

edits