MX on Linux: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
4,891 bytes added ,  09:49, 11 April 2021
m
(5 intermediate revisions by 2 users not shown)
Line 409: Line 409:
*The "mono-complete" is the package we want.
*The "mono-complete" is the package we want.


It is important to note that MX requires the ''complete'' edition of mono. (There is also a cut-down developer edition of Mono that can be downloaded/installed, and that is the default installation).
With latest installs of rPi, you can also use <tt>sudo apt install mono-complete -y</tt>


It is important to note that MX requires the ''complete'' edition of mono. (There is also a cut-down developer edition of Mono that can be downloaded/installed, and that is the default installation).


= Completing Package Installation =
= Completing Package Installation =
Line 523: Line 524:


== Running Cumulus MX ==
== Running Cumulus MX ==
Whilst effectively MX is run by  '''sudo mono CumulusMX.exe''', you actually need to ensure all the other components are loaded, so you either have a package that runs it for you, or you click a shortcut that includes the necessary path setting.


(When this section of the notes was written, there were topics in the support forum about ways to use scripts for starting/stopping MX, but the distribution did not include any such controlling scripts.  
(When this section of the notes was written, there were topics in the support forum about ways to use scripts for starting/stopping MX, but the distribution did not include any such controlling scripts.  
Line 528: Line 533:
Subsequently, scripts were provided in the release package.
Subsequently, scripts were provided in the release package.


Perhaps someone would be kind enough to expand the first sub-section).
Perhaps someone would be kind enough to rewrite this section and sub-sections).
 
=== Optional parameters to add to the instruction to run the MX engine ===
 
Beta builds in MX version 3.0.0 had an optional parameter <tt>-wsport nnnn</tt> that determined which port (represented by a 4 digit number ''nnnn'') was used for '''WebSockets'''. That parameter is now deprecated as WebSockets in all builds since 3045 uses the same port as the rest of the [[MX_Administrative_Interface#The_API_interface|Admin Interface]]. The remaining parameters that are still available are described in subsequent sub-sections.
 
==== 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:
<pre>sudo mono CumulusMX.exe -port 9999</pre>
 
==== 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 ('''options''' section of ''station settings'') in admin interface  while MX is running, or by adding 1 or 2 parameters when you start MX.  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. Whether you start it with a parameter or enable it within settings, stopping MX will end the extra debugging, and on restart it will default back to no debugging unless turned on again with parameter or setting.
 
You can also add  '''CumulusMX.exe -debug''' (to have full debugging of actions by MX turned on as MX starts), and/or '''CumulusMX.exe -Logging=1''' (for the station to MX transfers to have increased debugging logging).
 
<pre>sudo mono CumulusMX.exe -debug -Logging=1</pre>
 
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.
 
The comments in the MX source suggests -debug turns on both debug and data logging (see [[MX_Administrative_Interface#Options|Station_Settings#Options]] in admin interface settings), but I believe that is wrong as per example above, there are 2 separate parameters.
 
 
==== Parameter for changing Locale ====
 
On Linux and (in particular) OS X, Cumulus MX may not be given the correct locale to use, and you may get the default US locale even if that is not your locale. It will output the local it is using when it starts; if it is not correct, close it down and start it again, this time specifying your locale on the command line, using the -lang parameter . For example, in the UK, on a non-Windows device type:
<pre>
sudo mono CumulusMX.exe -lang en-GB
</pre>
Other local examples:  '''CumulusMX.exe Current culture: English (United States)''', '''CumulusMX.exe -lang de-DE''',  '''CumulusMX.exe -lang el-GR''' (this is one of the locales that reads numbers with '''integer,decimal''' format), '''CumulusMX.exe -lang nl-NL'''.
 
If you are not sure what value you need to supply for the -lang parameter, there is a list here - http://msdn.microsoft.com/en-gb/library/ee825488%28v=cs.20%29.aspx. You need to supply the code in the first column ("Language Culture Name") in that list.
 
Note that this does not affect the language used by Cumulus MX (although it may in the future), it affects the decimal separator and the list separator.
 
Note that you ''may'' need to supply your administrator password after typing the 'sudo ...' command line. The system will prompt you for this if it is needed.


=== Running as a service ===
=== Running as a service ===


(awaiting someone to explain this)
(awaiting someone to explain this)
Use <tt>systemctl status cumulusmx.service</tt> in a terminal session to see status of Cumulus service


=== Running with a terminal session left open ===
=== Running with a terminal session left open ===
Line 544: Line 589:
*switch off monitor or TV attached to your Pi,  
*switch off monitor or TV attached to your Pi,  
*Just ensure you leave Pi on so that terminal session continues running.
*Just ensure you leave Pi on so that terminal session continues running.
Use <tt>ps -ef | grep -i cumulus | grep -v grep</tt> to see if Cumulus is running or not.


= A very quick introduction to Linux =
= A very quick introduction to Linux =
Line 549: Line 596:
This article is not the place to teach you Linux, you can find books and on-line articles for yourself, but I list here enough for you to understand the instructions used elsewhere in this article.
This article is not the place to teach you Linux, you can find books and on-line articles for yourself, but I list here enough for you to understand the instructions used elsewhere in this article.


If you have a Raspberry Pi with a monitor attached, you will see a raspberry icon that you can click to get access to many features including shutdown options.
If you have a Raspberry Pi with a monitor attached, you will see a raspberry icon that you can click to get Graphical User Interface access to many features, including shutdown options.
 
You might find [https://www.educative.io/blog/bash-shell-command-cheat-sheet bash-shell-command-cheat-sheet] useful if you are wanting to learn some useful commands to enter in terminal mode, but there are hundreds of other Linux command guides available online.


== su and sudo ==
== su and sudo ==
5,838

edits

Navigation menu