MX on Windows OS: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
10,250 bytes added ,  18:15, 27 August 2021
m
m (→‎Introduction: add link to Linux page)
(20 intermediate revisions by the same user not shown)
Line 6: Line 6:
If you are not running MX using the Microsoft Windows Operating System, then please see [[MX on Linux]] page instead.
If you are not running MX using the Microsoft Windows Operating System, then please see [[MX on Linux]] page instead.


=Download MX release=
There are various related pages to get more information:
*Go to [[:Category:Terminology]] for links to pages that explain terminology used by Cumulus (some of these need updating for MX)
*Go to [[:Category:Cumulus MX]] for links to all pages in this Cumulus Wiki that relate specifically to MX
*[[MX Administrative Interface|Admin interface]] provides information on configuration and web pages for viewing your weather data locally
*Go to [[:Category:Cumulus Files]] for links to all pages describing the sub-folders and files used by MX
*If you encounter a problem when running MX, see [[What to do when I have a problem with MX]]
*The [[Cumulus MX FAQ]] page was created with snippets from the forum, but nobody has yet sorted this out into a useful page or updated it for recent releases
*If you want to use a script language, you might want to read [[PHP|PHP Hypertext Preprocessor and JavaScript]] page


Decide whether you want latest release, by looking in the [https://cumulus.hosiene.co.uk/viewforum.php?f=40 support forum] to see if any bugs are reported with it.
=Already have Cumulus?=


Read the relevant release announcement at [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Cumulus MX Announcements and Download - PLEASE READ FIRST], because that may describe one-off tasks associated with that release.
== Report and data files to copy across from any previous Cumulus location ==


== Latest MX release ==
All the (optional) files in the [[Reports folder]] can be copied across from a previous installation. It should not matter which release created past files, although ideally you need to ensure that the report naming and encoding described on that linked page remain the same.


# To find the link to latest release distribution zip in the Cumulus Wiki, open the [[Software#Current_Release|Software page and navigate to the Current_Release section]].
<br>
# Download the MX distribution from the link that appears there, Mark will update it for each release he makes.


== Earlier MX releases ==
Whilst you should copy ALL the files in the [[data folder]], from any old installation into the new installation, there are several extra considerations:
* '''Your new MX installation will ignore any entries prior to the MX Start Date'''  when it reads from [[Monthly log files]], such as [[Standard log files]], and [[Extra Sensor Files]]:
**  See [[Cumulus.ini#Data_Logging|'''StartDate=xxxxx''']] parameter, edit using ''Station Settings → Common Options → Advanced Options → Records Began date''
* Be aware your new installation has to use the same "locale" as the old installation, or MX will struggle as the locale affects how new lines are stored, and how MX expects old lines to have been stored the same way.
* If your old installation, is on a different operating system to the Microsoft Windows for your new installation, remember that Microsoft Windows uses different line terminators to all other operating systems, although MX should cope with mixed line terminators, any third party routines reading your data files will probably not accept a line terminator change.
* If your previous Cumulus installation was of the legacy software, version 1.9.4, or earlier, then you need to do a lot of reading:
** [[Amending dayfile]] tells you about how MX is far more fussy about the content in [[dayfile.txt]]
** [[:Category:Ini Files|.ini files]] explains how time-stamps are formatted differently in the extreme tracking files
** [[Migrating from Cumulus 1 to MX]] gives some advice about differences in settings, but be aware that the way MX handles settings varies by release, and information on the linked page may be out of date
 
==Configuration Files to copy across from any previous Cumulus installation==
 
There are two configuration files that are not included in any MX release:
*[[strings.ini]] (Windows is case insensitive, so your file might have capitals) – optional file to customise output
*[[Cumulus.ini]] (Windows is case insensitive,so your file might be all lower case) – main configuration file
 
Just copy the existing files from old to new installation, if
# Your locale (Language settings in the Settings app, Regional Settings in the Windows Control Panel, even on Windows 10) is still the same
# All files on your new install are in same paths as on your old install (some settings involve specifying paths)
# Your old installation has a relatively recent MX release (compare the "y" in 3.y.z,between old and new installation,  a difference of more than 1 means you do not have a recent release)
# Your old installation was on computer running Microsoft Windows Operating System,  (not a Linux computer)
 
 
If you are upgrading from an older release, please read the table for advice.
 
{| class="wikitable"
|-
! scope="col" style="width:450px; color:blue" | Cumulus.ini !! scope="col" style="width:450px; color:navy" | strings.ini
|-
| Your old installation will have this file. In general, ''if your old installation was any release before 3.8.0'', the advice is give  the old file a different name when you copy it across to the new installation, and let MX create the file as you work through all the settings.
| '''This is an optional file'''.  Its [[strings.ini|purpose]] is to allow customisation of some of the outputs from Cumulus. You might want to use customisation to abbreviate (or extend) some outputs, or to change those outputs into another language.
|-
| When you work through the Settings pages, MX will create this file if it does not exist.
* If your old installation was of the legacy software then do consult [[Migrating from Cumulus 1 to MX]]
* As MX evolves, the former "read-only" settings in this file are becoming "advanced" settings in the interface.
| You create a “strings.ini” file by '''selecting some of the parameter'''s from the [[Samplestring.ini]] file that is included in each MX release, and ''modifying the value for the listed attributes'' as you type just those you selected (under the same group titles - these are enclosed in [ ] as before).
 
The sections that appear in '''samplestring.ini''', and the parameters that appear within a section, depend upon which release you are using.  So be cautious if you try to reuse a "strings.ini" file originally created by the legacy software, you may find you need to specify your customisation using different parameters in the latest "samplestring.ini".
|-
|  The content of "Cumulus.ini" is changing as MX is developed, the [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Release Announcements] normally list any new parameters as they appear in the file, without always mentioning those that have become redundant. The announcements tend to avoid any detail, so you have to guess ''from the attribute'' what values it might take, and generally have no idea of where to make any change.
 
To remove any parameters no longer used in this file, see [[Cumulus.ini#How_to_Remove_Redundant_parameters_from_file|remove redundant parameters]]
 
If your old file contains any [[Cumulus.ini (Cumulus 1)|legacy read-only]] parameters not yet converted into advanced settings, or any [[Cumulus.ini (MX 3.0.0 to 3.7.0)|MX read-only parameters not yet converted into advanced settings]], you may need to manually add such missing parameters back into new file by stopping MX (after finishing all the settings you can configure in the interface), doing an external file edit, and then restarting MX
| The content of "samplestring.ini" is changing as MX is developed:
* Therefore, your existing “strings.ini” might need to be modified.
* There is no automatic way to check your “strings.ini” file, if MX does not understand any parameter in this file, it ignores it.
* Instead, you need to manually check each parameter you have in your “strings.ini” file to see if that parameter is still in the “samplestring.ini” included in the release you have installed.
* You may also find new parameters in “samplestring.ini” that you wish to add to your “strings.ini” file to tailor new functionality to your preferences.
|}


If you previously used an older release of Cumulus, but in this new installation will be using the latest release (latest is what is normally best, unless it has bugs), you may want to read up on all the changes between your old release and the current release, not just changes that affect the configuration file.


'''If the latest release has bugs''' (it is impossible for the developer to check all the ways in which versatile MX can be used), you can '''download'', whatever older version of MX you have decided is sufficiently bug-free to install, from [https://github.com/cumulusmx/CumulusMX/releases CumulusMX/releases].
=Cumulus Software=


=Where to store the download zip =
Note use of plural in section name above, the following sub-sections will install various packages produced by Developer Mark Crossley.


#It is up to you, where you store the download, but it is a good idea to store it on a separate disc, or partition, if you have a choice.
==Packages to install==
#* Whether this location is the default, or you are asked to select location will depend on whether your browser's default settings have been changed.
#When download completes, use the mouse to click on the download file name, this should ask if you want to extract (unzip) it.
#*Decide where you want the full distribution to be stored, again you might have somewhere where you backup files.


=Where to unzip distribution files=
<big>We shall install the Cumulus software listed on [[Software]] page</big>:
# '''CumulusMX''':
#* '''CumulusMX.exe''' is written in C#, that has been developed by Mark Crossley, but still contains some code by Steve Loft
#* Download '''CumulusMX zip file’’’ from the link at[[Software#Latest_build_distribution_download]]
# [[Software#Create_Missing|'''Create Missing''']]:
#* '''CreateMissing.exe''' is also written in C#, created, and developed, by Mark Crossley
#* Download '''Create Missing zip file''' from the link at [[Software#Create_Missing]]
#** This takes you to a github page with a "ReadMe" providing minimal instructions
#*  Using '''CreateMissing.exe''' is fully documented at [[Calculate_Missing_Values#CreateMissing.exe]] in this Wiki
#* (it will populate missing fields in [[standard log files]] and/or missing lines in [[dayfile.txt]]).
# '''ExportToMySQL'''
#*  '''ExportToMySQL.exe''' is also written in C# by Mark Crossley
#* Download '''Export To My SQL zip file''' from the link at [[Software#ExportToMySQL]]
#** This takes you to a github page with a "ReadMe" providing minimal instructions
#* '''ExportToMySQL.exe''' is not (at the time this was written) documented in this Wiki although [[MX_Administrative_Interface#MySQL_settings]] does describe a similar utility (written by Steve Loft) that was actually included within early CumulusMX zip downloads.


The only rule about where you put the MX files is "avoid the 'Program File' hierarchy".
As at 9 March 2020, another utility, '''CreateRecord''', has been initialised in the Github areas managed by the developer where Cumulus is worked on, although it appears to be just a concept (any code on the developer's computer has not yet been included) on github.  This will, if my understanding is correct, read [[dayfile.txt]] and use that to update the various [[:Category:Ini Files|extreme record files]].


Best practice is to place MX files in the root directory of any disc or partition where you have frequent updating.
== Earlier MX releases ==


MX uses a number of different computer languages and multiple components. It is best to keep the path short, to remove any possibility of path name being truncated as it is passed between components.
Check if posts in the [https://cumulus.hosiene.co.uk/viewforum.php?f=40 Cumulus Support Forum] tell you that the current release of MX has one or more bug(s) that affects one or more aspect(s) of MX functionality that you intend to use.  


Remember, it is impossible for the developer to check all the ways in which versatile MX can be used:
* Different weather station types (the developer only has a Davis),
* Different computer types (development is mostly on Microsoft Windows),
* Plus a whole host of optional features, and different external upload sites, (typically each of these optional features are only used by a sub-set of Cumulus users).


=Other executables=
Anyway, '''you can download any earlier build, without the bug''', from [https://github.com/cumulusmx/CumulusMX/releases CumulusMX/releases].


As well as ''CumulusMX.exe'', you will find [[Software#Create_Missing|'''CreateMissing.exe''']] and [[Software#ExportToMySQL|'''ExportToMySQL.exe''']] zips to download from the ''Software'' page.  These should be unzipped so their executables are added to same folder as '''CumulusMX.exe'''.  Both have been written in C# by Mark Crossley to work with MX. You need to ensure that you use the right version of these utilities for the MX release you are running, so if you are using an old MX release, you might need to go directly to the [https://github.com/cumulusmx Cumulus MX github] page, and navigate to the utility of interest, to download an older version of these utilities.
You need to ensure that you use the right version of "CreateMissing.exe" and "ExportToMySQL.exe" utilities for the MX release you are running, so if you are using an old MX release, you will need to go directly to the [https://github.com/cumulusmx Cumulus MX github] page, and navigate to the utility of interest, to download an older version of these utilities that matches your older MX.


Although you might not need them immediately, these utilities may be useful in future.  Simple Instructions for using these executables are on the github page where they are found, again links exist on '''Software''' page in this Wiki. Note that for Windows, you don't quote the ".exe" when  running them.


Using '''CreateMissing.exe''' is fully documented at [[Calculate_Missing_Values#CreateMissing.exe]] in this Wiki.
=Where to store the download zip, and where to extract the files =


'''ExportToMySQL.exe''' is not (at the time this was written) documented in this Wiki although [[MX_Administrative_Interface#MySQL_settings]] does describe a similar utility (written by Steve Loft) that was actually included in early MX release downloads.
# Most browsers, if you don't change any options, will download to the Current User's folder that is called "Download" (or associated with a link of that name)
#* Some people change the default, so they can place all downloads onto a separate partition, or a separate disc, mostly because it helps to keep downloads safe in case your main computer disc fails.
# It is good practice to backup your existing MX installation, if you have one, before you install a new MX release over it (as if there is a bug in the new release,people regress back to their old one)
# When download completes, use the mouse (those unable to use the mouse should do the equivalent keyboard action) to click on the download file name, this should ask if you want to extract (unzip) it.
# The only rule about where you put the MX files is "avoid the 'Program File' hierarchy".
#* MX uses a number of different computer languages and multiple components. It is best to keep the path to where you install it short, to remove any possibility of path name being truncated as it is passed between components.
#* Best practice is to place MX files in the root directory of any disc or partition where you can have frequent updating
#* Normally, you will unzip over any existing MX installation, so you retain all files not part of the release distribution
 
If you already have MX installed, you should be following the [[Updating MX to new version|Upgrade]] page advice:
* It is not a good idea to skip too many in-between releases
* Read the relevant release announcement at [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887 Cumulus MX Announcements and Download - PLEASE READ FIRST], for all in-between releases just in case particular releases have one-off tasks associated with that release.


= Requirements for running MX on Windows =
= Requirements for running MX on Windows =
Line 81: Line 162:


Talking about command windows, if you want to check that the port is open for listening (i.e. able to access the admin interface) type <code>netstat -an | findstr 8998</code> into the command window.
Talking about command windows, if you want to check that the port is open for listening (i.e. able to access the admin interface) type <code>netstat -an | findstr 8998</code> into the command window.




Line 87: Line 167:


We need to run MX in order for it to generate a web server that will enable us to see the [[MX_Administrative_Interface|admin interface]] where we can change [[Cumulus.ini|settings]], view our weather data, or edit various [[:Category:Cumulus_Files|Cumulus files]] (extreme records or log files).   
We need to run MX in order for it to generate a web server that will enable us to see the [[MX_Administrative_Interface|admin interface]] where we can change [[Cumulus.ini|settings]], view our weather data, or edit various [[:Category:Cumulus_Files|Cumulus files]] (extreme records or log files).   


There are two ways to run MX:
There are two ways to run MX:
Line 94: Line 173:


It is recommended that you run MX interactively to begin with, as this means you will see any messages it outputs, and can respond to those.  Once you are happy that MX is running smoothly, then run it as a service, as that will run in background, and you don't need to watch for messages.
It is recommended that you run MX interactively to begin with, as this means you will see any messages it outputs, and can respond to those.  Once you are happy that MX is running smoothly, then run it as a service, as that will run in background, and you don't need to watch for messages.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 102: Line 178:
!style="width:30px" | Step
!style="width:30px" | Step
!style="width:600px" | Interactively
!style="width:600px" | Interactively
!style="width:600px" | As Service
!style="width:400px" | As Service
|-
|- style="vertical-align:top;"
|Setting up
! scope="row" |Setting up
| To run Cumulus MX, Windows needs to know
| To run Cumulus MX, Windows needs to know
# which '''.exe''' you want to run (ExportToMySQL.exe, CalculateMissing.exe, or CumulusMX.exe)
# which '''.exe''' you want to run (ExportToMySQL.exe, CalculateMissing.exe, or CumulusMX.exe)
Line 111: Line 187:
Therefore it is best to always start MX using what Windows calls a '''shortcut''', because when creating the shortcut you can enter all the required information into the properties.   
Therefore it is best to always start MX using what Windows calls a '''shortcut''', because when creating the shortcut you can enter all the required information into the properties.   


There are 3 ways on Windows to create a shortcut to run MX:
There are 3 ways on Windows to create a shortcut to run the CumulusMX executable:
#Create a shortcut on your desktop (and/or the taskbar) for the '''CumulusMX.exe''' executable <code>cmd.exe /C start CumulusMX C:\CumulusMX\CumulusMX.exe -debug</code>, the "-debug" is ''optional'', it starts the logging in debugging mode so the log created in MXDiags folder has more information. There are other optional parameters all listed later.
#Create a shortcut on your desktop (and/or the taskbar) for the '''CumulusMX.exe''' executable <code>cmd.exe /C start CumulusMX C:\CumulusMX\CumulusMX.exe -debug</code>, the "-debug" is ''optional'', it starts the logging in debugging mode so the log created in MXDiags folder has more information. There are other optional parameters all listed later.
#*In that shortcut define the path where the executable is located as the path to start in.
#*In that shortcut define the path where the executable is located as the path to start in.
Line 131: Line 207:
#** all optional parameters are listed later
#** all optional parameters are listed later
#**'''Start in''' <code>\CumulusMX</code> (include a drive specifier if necessary)
#**'''Start in''' <code>\CumulusMX</code> (include a drive specifier if necessary)
| # Navigate to the folder with your MX installation.
|
# Install MX service (as an administrative user) using <code>CumulusMX.exe - install</code>
# '''Navigate to the folder with your MX installation'''.
#* There are other optional parameters (e.g. -port, -debug, -locale) you can add by editing registry
# '''Install MX service''' (as an administrative user) using <code>CumulusMX.exe - install</code>
# '''MX is now set up as a service'''.
# There are other optional parameters (e.g. -port, -debug, -locale) you can add by editing registry
#* To add parameters to the service when it starts automatically you will have to edit the registry
#* To add parameters to the service when it starts automatically you will have to edit the registry
#*# Right click the Windows button at left hand edge of taskbar (often at bottom of your screen)
#*# Right click the Windows button at left hand edge of taskbar (often at bottom of your screen)
Line 144: Line 222:
#*# Select '''Modify'''
#*# Select '''Modify'''
#*# You should see '''"C:\CumulusMX\CumulusMX.exe"'''
#*# You should see '''"C:\CumulusMX\CumulusMX.exe"'''
#*#* This assumes that you have installed your MX in that system partition path, adjust the '''C:''' if you have installed your MX in another partition, in above and in examples below
#*# Now you can add parameters as per [[#Optional_parameters_to_add_to_the_instruction_to_run_the_MX_engine]]
#*# Now you can add parameters as per [[#Optional_parameters_to_add_to_the_instruction_to_run_the_MX_engine]]
#*#* For example modify to ''' "C:\CumulusMX\CumulusMX.exe" -port 9000''' to add port
#*#* For example modify to ''' "C:\CumulusMX\CumulusMX.exe" -port 9000''' to add port
#*#* For example modify to ''' "C:\CumulusMX\CumulusMX.exe" -debug''' to add full debugging
#*#* For example modify to ''' "C:\CumulusMX\CumulusMX.exe" -debug''' to add full debugging
# MX is now set up as a service.
# The service will stop itself if it detects that the computer is going into standby:
 
The service will stop itself if it detects that the computer is going into standby:
# In your MX release distribution, navigate to '''CumulusMX\MXutils\windows'''.
# In your MX release distribution, navigate to '''CumulusMX\MXutils\windows'''.
# Find file '''CreateCmxResumeFromStandbyTask.ps1''' for resuming MX after Microsoft Windows has gone into standby.
# Find file '''CreateCmxResumeFromStandbyTask.ps1''' for resuming MX after Microsoft Windows has gone into standby.
#  The script MUST be run with Administrator priveldges.
#  The script MUST be run with Administrator privileges.
# Type <code>CreateCmxResumeFromStandbyTask</code>, and press '''Enter''', this will create a Scheduled Task.  
# Type <code>CreateCmxResumeFromStandbyTask</code>, and press '''Enter''', this will create a Scheduled Task.  
#* The scheduled task will exist from now on, and will automatically restart the service (on resume from standby/hibernate).
#* The scheduled task will exist from now on, and will automatically restart the service (on resume from standby/hibernate).
|-
|- style="vertical-align:top;"
| (Re-)Starting MX
! scope="row" | (Re-)Starting MX
|  # First '''start the MX engine''' using your shortcut (created in one of the 3 ways as above), if it has not started when you started your computer
|  # First '''start the MX engine''' using your shortcut (created in one of the 3 ways as above), if it has not started when you started your computer
# Next '''start the admin interface''', it does not need to run all the time, but only when you need it , it normally runs on port 8998 (to vary that there is a '''-port''' parameter that is followed by required port and that port parameter has to be entered every time you start MX if you are not using the default port). More information on admin interface [[MX Administrative Interface|in separate article]].
# Next '''start the admin interface''', it does not need to run all the time, but only when you need it , it normally runs on port 8998 (to vary that there is a '''-port''' parameter that is followed by required port and that port parameter has to be entered every time you start MX if you are not using the default port). More information on admin interface [[MX Administrative Interface|in separate article]].


Try '''start /min C:\Cumulus\CumulusMX.exe''' to run MX as a minimised package (although in Windows you can change the properties of the shortcut you use to start minimised).
Try '''start /min C:\Cumulus\CumulusMX''' to run MX as a minimised package (although in Windows you can change the properties of the shortcut you use to start minimised).
 
Note that you may sometimes want to use one or more of the optional parameters when starting MX.
| There are two ways to start MX service:
| There are two ways to start MX service:
* Either, use the Services applet:- services.msc (You can pass parameters using this tool, but they are not saved for future use)
* Either, use the Services applet:- services.msc (You can pass parameters using this tool, but they are not saved for future use)
* Or, use the service command line tool:- <code>sc start CumulusMX [optional parameters for start-up here]</code> using Command window or Powershell window or Terminal window (one of these will be offered when you right click the Windows/Start symbol) and type '''exit''' to leave that window.
* Or, use the service command line tool:- <code>sc start CumulusMX</code> using Command window or Powershell window or Terminal window (one of these will be offered when you right click the Windows/Start symbol) and type '''exit''' to leave that window.
|-
 
| Checking MX is still running
Note that you may sometimes want to use one or more of the optional parameters when starting MX, as per previous row.
|-  
! scope="row"| Checking MX is still running
| Simply look in the Command window or Powershell window or Terminal window you used to start MX and left open.
| Simply look in the Command window or Powershell window or Terminal window you used to start MX and left open.
| You can use <code>sc query CumulusMX</code> at any time to check that the service is running.
| You can use <code>sc query CumulusMX</code> at any time to check that the service is running.
|-
|-
| Deleting shortcut/service
! scope="row"| Deleting shortcut/service
| If you have set up your short-cut in the '''Startup''' folder, you need to delete that short-cut (or move it to a sub-folder), to stop MX automatically starting when you restart your computer
| If you have set up your short-cut in the '''Startup''' folder, you need to delete that short-cut (or move it to a sub-folder), to stop MX automatically starting when you restart your computer
| To remove the Cumulus system service run <code>CumulusMX.exe - uninstall</code> as an Administrator using Command window or Powershell window or Terminal window (one of these will be offered when you right click the Windows/Start symbol) and type '''exit''' to leave that window.
| To remove the Cumulus system service:
|-
* Either run <code>CumulusMX.exe - uninstall</code> as an Administrator using Command window or Powershell window or Terminal window (one of these will be offered when you right click the Windows/Start symbol) and type '''exit''' to leave that window.
| Stopping MX
* Or select '''Services''' from "Start", as an administrator, in the ''services applet'' that loads navigate to the one labelled Cumulus, and delete that.
|- style="vertical-align:top;"
! scope="row"| Stopping MX
| The recommended way is to click into the command window in which MX is running, ''hold down Control key'' and press '''C'''. It is normal for there to be a short wait, then a message "Cumulus Terminating" and then after another short wait, it will say "Cumulus Stopped" and immediately after that the command window  will be closed by MX.
| The recommended way is to click into the command window in which MX is running, ''hold down Control key'' and press '''C'''. It is normal for there to be a short wait, then a message "Cumulus Terminating" and then after another short wait, it will say "Cumulus Stopped" and immediately after that the command window  will be closed by MX.


Line 186: Line 269:
|}
|}


= Optional parameters to add to the instruction to run the MX engine =
As seen above, in Microsoft Windows, we leave off the file extension when we want to run one of the Cumulus executables, but we might need to add a parameter (starts with a minus symbol), and that parameter might need to be followed with a value.
== -install parameter for installing as Windows Service==
Use '''CumulusMX -install''' to install MX as a Windows service.
By default, MX's Microsoft Windows service is installed to run under the System account.
System does not have permissions for network access, that it turn means that any batch file that MX initiates as an external program will be restricted to actions that a System account can do, that excludes actions that a network access account can do.
== -uninstall parameter for uninstalling the Windows Service==
Use '''CumulusMX -uninstall''' to uninstall the service that runs MX.
== -Port parameter for changing HTTP Port ==
When Cumulus starts, it will display the URL of the user interface.
It runs on port 8998 by default; if this is not suitable for some reason you can over-ride it using the '-port' parameter on the command line, e.g. to use port 9999 instead:
:<code>CumulusMX -port 9999</code>
== -debug parameter for adding debugging ==
This is only available for [https://cumulus.hosiene.co.uk/viewtopic.php?p=138839#p138839 release 3.4.4 - Build 3068] onwards. This switches on debug and data logging from the start-up of Cumulus MX by adding a parameter:
:<code>CumulusMX -debug</code>
MX has a default level of logging that stores in the [[MXdiags_folder]] folder a log file that shows some of the interaction with the weather station and some of the output actions done as MX runs. A new log is started each time MX is restarted.
If there is a problem, then there is a great benefit in actually increasing the level of detail in these logs; and that is done either within the settings (on recent MX releases this is on '''Program Settings''' page of admin interface - please see [[:Category:Diagnostics]] page for details) or the above command.
== Beta builds of MX ==
The following two parameters are not available since MX came out of 3.0.0 beta.
=== -wsport parameter for web sockets ===
Beta builds in MX version 3.0.0 had an optional parameter <code>CumulusMX -wsport nnnn</code> that determined which port (represented by a 4 digit number ''nnnn'') was used for '''Web Sockets'''.
Note use of this parameter is now deprecated, as it has been incorporated into '''-port''' parameter described earlier.  The reason is that [https://cumulus.hosiene.co.uk/viewtopic.php?f=40&t=17887&p=138815&hilit=sockets#p138815 Web Sockets in all builds since 3045] use the same port for web sockets as for the HTTP port of the [[MX_Administrative_Interface#The_API_interface|Admin Interface]]. 
=== -Logging parameter for debugging of data flow between station and MX===
Use '''CumulusMX -Logging=1''' (for the station to MX transfers to have increased debugging logging).
Note use of this parameter is now deprecated, as it has been incorporated into '''-debug''', see above.


=Access to admin interface=
=Access to admin interface=
Line 200: Line 330:
# Look at your hub or router (this should have come with instructions on how to access its settings in your browser) and on one screen it should show what devices are connected to your LAN and wifi.  
# Look at your hub or router (this should have come with instructions on how to access its settings in your browser) and on one screen it should show what devices are connected to your LAN and wifi.  
# Look for the IPv4 address, for example 192.168.1.64, it has assigned to the device where MX is running. That is what should replace the "*".   
# Look for the IPv4 address, for example 192.168.1.64, it has assigned to the device where MX is running. That is what should replace the "*".   


However, there is one more complication, either the Windows networking settings may change, or else your hub or router may reconfigure, both can happen at any time, and both can assign a different IPv4 address to the device running MX.
However, there is one more complication, either the Windows networking settings may change, or else your hub or router may reconfigure, both can happen at any time, and both can assign a different IPv4 address to the device running MX.
Line 215: Line 344:
#* a subnet mask of 255.255.255.0 and  
#* a subnet mask of 255.255.255.0 and  
#*gateway address between 192.168.1.1 and 192.168.1.254 (depending on the address of your hub/router).
#*gateway address between 192.168.1.1 and 192.168.1.254 (depending on the address of your hub/router).


=One-off essential settings=
=One-off essential settings=
Line 224: Line 352:


So when you first use MX you will need it to access the settings where you tell MX what type of station you have and what units you want to use, and set various timing options.  The settings you see may vary, depending on which MX release you have installed, so are not described here.  It is best to work through all the settings listed, as although some have defaults, you might want to vary them from default.
So when you first use MX you will need it to access the settings where you tell MX what type of station you have and what units you want to use, and set various timing options.  The settings you see may vary, depending on which MX release you have installed, so are not described here.  It is best to work through all the settings listed, as although some have defaults, you might want to vary them from default.
=Upgrade to a new MX release=
If at any time, you need to upgrade to a newer release of MX, it is basically a case of installing the new release over the existing one, but more guidance at [[Updating MX to new version|upgrade]] MX.


=One-off optional uploads=
=One-off optional uploads=
Line 238: Line 362:


The contents of that sub-folder may change when you upgrade MX, so this task might need to be repeated.
The contents of that sub-folder may change when you upgrade MX, so this task might need to be repeated.


== webfiles sub-folder in releases from 3.10.1 onwards ==
== webfiles sub-folder in releases from 3.10.1 onwards ==
Line 298: Line 421:


You may find [[PHP|this wiki page]] useful for understanding more about the different script languages.
You may find [[PHP|this wiki page]] useful for understanding more about the different script languages.
= Optional parameters to add to the instruction to run the MX engine =
<div style="background: LemonChiffon;padding:5px; margin:2px;">
[[File:Crystal Clear info.png|40px]] This section does not cover all optional parameters and needs a contributor to update it!
</div>
== Beta builds of MX ==
=== web sockets ===
Beta builds in MX version 3.0.0 had an optional parameter <code>CumulusMX -wsport nnnn</code> that determined which port (represented by a 4 digit number ''nnnn'') was used for '''Web Sockets'''.
That parameter is now deprecated as Web Sockets in all builds since 3045 uses the same port as the rest of the [[MX_Administrative_Interface#The_API_interface|Admin Interface]], see Port parameter below.
=== Debugging of data flow between station and MX===
Use '''CumulusMX -Logging=1''' (for the station to MX transfers to have increased debugging logging).
Although this is not mentioned in any release announcements, it appears that use of this parameter is now deprecated as it appears that on all recent MX releases this effect is incorporated into the '''-debug''' parameter.  Perhaps someone could confirm whether this is true.
== Parameter for changing Port ==
When Cumulus starts, it will display the URL of the user interface.
It runs on port 8998 by default; if this is not suitable for some reason you can over-ride it using the '-port' parameter on the command line, e.g. to use port 9999 instead:
:<code>CumulusMX -port 9999</code>
== Parameter for adding debugging ==
MX has a default level of logging that stores in  the [[MXdiags_folder]] folder a log file that shows some of the interaction with the weather station and some of the output actions done as MX runs. A new log is started each time MX is restarted.
If there is a problem, then there is a great benefit in actually increasing the level of detail in these logs; and that is done either within the settings (on recent MX releases this is on '''Program Settings''' page of admin interface - please see [[MXdiags_folder]] page for details) or by adding a parameter:
:<code>CumulusMX -debug</code>
Obviously this log file continues to grow, the longer MX is left running, and if debugging is switched on the file will grow in size must faster. Consequently, the default is not to add the extra debugging information and the settings can be used to switch it off again if you do have it switched on. Since this parameter is applied when you start MX, it applies while MX continues to run. Obviously, it must be applied every time you start MX if you want this increased level of logging to continue every time you restart MX.
5,838

edits

Navigation menu