MX on Windows OS: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
2,720 bytes added ,  11:46, 12 June 2022
m
m (Note at start)
(5 intermediate revisions by the same user not shown)
Line 17: Line 17:
*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
*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
*If you want to use a script language, you might want to read [[PHP|PHP Hypertext Preprocessor and JavaScript]] page
= Requirements for running MX on Windows =
MX can be run on most computers with a modern version of the Microsoft operating system, but this Wiki page is trying not to get too technical, so it will focus on just two aspects, the locale and .NET.
==Locale==
Cumulus MX is much more fussy than the legacy Cumulus 1 about items like [[Amending_dayfile#Correcting_date_separator_errors|date separators like hyphen or slash]] and  [[:Category:Ini_Files#File_content_differences_between_Cumulus_1_and_MX|decimal separators like comma or point]]. For example, Microsoft computers usually default to USA locale, that specifies date format as month, day of month, year.  Cumulus may default to GB format (day of month, month, year) or to  ISO 8601 format of "yyyy-MM-ddTHH:mm:ss".  Note that as of 2020, there are plans for MX to standardise on slash for date separator,and decimal points, and increasingly MX is using UTC, so check release announcements.
There is also the character set and [[Reports_folder#Encoding| File Encoding]], MX defaults to UTF-8 and it does not use "Byte Order Mark" that Microsoft traditionally has used by default.  Microsoft used to actively pursue an approach of being non-standard in everything to keep people from using rival products, so there may be other issues if you have previously used a different computer.
Anyway it is vital that your Microsoft computer is set up correctly, if you have used Cumulus (1 or MX) before and wish to have access to existing data, reports and extreme records.  You can choose a locale within the '''Settings''' app (cogwheel icon) on your computer, but you will get on better working through individual settings using ''Control Panel -->> Region''.  There you can choose between 24-hour clock, am/pm, or AM/PM, as well as between different date formats, and between different field separators (both decimal commas and field separator set to comma must be avoided!).
Ask in support forum if you need more advice, the evidence in there is that MX on Windows raises lots of queries!
==.NET==
Microsoft originally created '''.NET''' for all operating systems, but Microsoft then decided to restrict it to just Windows (and that was the position while MX was being developed, and was still true in early 2020), mostly to encourage greater dominance by Microsoft software and hardware.
Mono was then born based on .NET to work with all operating systems, Mono subsequently changed independently from .NET (although Microsoft still has a leading role).
Later,  Microsoft launched an alternative called .NET Core that took out of .NET the parts that were Windows specific, and it ceased work on further development of .NET beyond version 4.x.x.
The most recent change, in November 2020, involved a change around of names, and the multi-operating system .NET Core product took over the .NET name as version 5
To run MX on Windows, you need .Net version of at least 4.5.2 installed. This is only available for the Vista SP2, Windows 7 SP1, Windows 8, and Windows 8.1 operating systems.
For Windows 10 you use .NET version 5 (or its updates), as installed by your windows update feature.  (MX will also run on version 4.8; the .Net download for version 4.8 should be here https://dotnet.microsoft.com/download/dotnet-framework/net48).
==Are you using elevated administrative rights?==
For those who downloaded the first MX Beta in January 2015, the code was only experimental and that version had to be run by a Windows Administrative User, but Steve Loft soon improved the code and now none of the code requires any elevated rights and it can be run by a normal user (or  a user with administrative rights) without needing to be started by '''Run as administrator'''.
However, Cumulus MX initiates a web server, which is what runs the [[MX_Administrative_Interface|Admin Interface]]. To access that, all users need to be given elevated rights to the port on which the web server runs. By default this is port 8998, so that is used in the example below of the one-off command needed to give all users access to the port. You can use a '''-port=nnnn''' parameter when starting MX to make it use another port, if you use that then the command below needs revising accordingly.
To enter the command, first open a command window as administrator. One way to do this is to right click the windows symbol at the start of the windows task bar. The option to choose there is dependent on some settings which determine what appears when you right click:
*the normal default on Windows 10 is '''Windows PowerShell (admin)''',
*the normal default on earlier versions of Windows is  '''Command Prompt (Administrator)'''
*an alternative is '''Windows Terminal'''
Whichever of these you can use, the result is it opens a new window on your monitor with a prompt for typing. In that window type the command:
:<code>netsh http add urlacl url=http://*:8998/ user=\users</code>
You only need to do that once. If you do not issue this command, administrative rights are needed every time to access the port so you can use the admin interface.
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.


=Cumulus Software=
=Cumulus Software=


Note use of plural in section name above, the following sub-sections will install various packages produced by Developer Mark Crossley.
Note use of plural in section name above, the following subsections will install various packages produced by Developer Mark Crossley.


==Packages to install==
==Packages to install==
Line 26: Line 71:
<big>We shall install the Cumulus software listed on [[Software]] page</big>:
<big>We shall install the Cumulus software listed on [[Software]] page</big>:
# '''CumulusMX''':
# '''CumulusMX''':
#* '''CumulusMX.exe''' is written in C#, that has been developed by Mark Crossley, but still contains some code by Steve Loft
#* '''CumulusMX.exe''' is written in C#, that has been developed by Mark Crossley, some code is contributed by other developers, some is library code used when it can be, and there remains some code by Steve Loft
#* Download '''CumulusMX zip file’’’ from the link at[[Software#Latest_build_distribution_download]]
#* Download '''CumulusMX zip file’’’ from the link at[[Software#Latest_build_distribution_download]]
# [[Software#Create_Missing|'''Create Missing''']]:
# [[Software#Create_Missing|'''Create Missing''']]:
Line 93: Line 138:
#*# Microsoft tell developers to put code in '''C:\Program Files''' or ''c:\Program Files (x86)'' as these are read only folders except when software is being installed, and Microsoft tells developers to put data files for that software in '''c:\ProgramData'''
#*# Microsoft tell developers to put code in '''C:\Program Files''' or ''c:\Program Files (x86)'' as these are read only folders except when software is being installed, and Microsoft tells developers to put data files for that software in '''c:\ProgramData'''
#*# Cumulus MX has not been developed in accordance with those Microsoft specific rules
#*# Cumulus MX has not been developed in accordance with those Microsoft specific rules
#*# Consequently, if you did wrongly install MX in the above hierarchy, the read-only rule would mean that Microsoft stores any files that MX updates in say the [[Data folder|data sub-folder]] after the software installation into ''C:\Users\user_name\AppData\Local\VirtualStore\Program Files\CumulusMX\data'' (and similar redirection for other sub-folders)
#*# Consequently, if you did wrongly install MX in the above hierarchy, the read-only rule would mean that Microsoft stores any files that MX updates in another place and MX would not find them, here are two examples:
#*# The problem then is that your Microsoft Windows computer now has two "data" (and other) sub-folders, so MX gets confused as to which sub-folder to look in for each file within the data (and other) sub-folders (as any file not updated is in installation sub-folder, while any file that has been updated is in the redirection sub-folder).
#*#* When you use the Settings pages in MX, instead of creating/updating a [[Cumulus.ini]] file in the same folder as "CumulusMX.exe", Microsoft would create/update the file in ''C:\Users\user_name\AppData\Local\VirtualStore\Program Files\CumulusMX\Cumulus.ini''
 
#*#* As MX runs, instead of creating files in say the [[Data folder|data sub-folder]], Microsoft redirects any file changes, after the software installation, into ''C:\Users\user_name\AppData\Local\VirtualStore\Program Files\CumulusMX\data'' (and similar redirection for other sub-folders)
 
#*# The problem then is that your Microsoft Windows computer now has two "data" (and other) sub-folders, but MX cannot know which sub-folder to look in, (as any file not updated is in installation sub-folder, while any file that has been updated is in the redirection sub-folder).
= Requirements for running MX on Windows =
 
To run MX on Windows, you need .Net version of at least 4.5.2 installed. This is only available for the Vista SP2, Windows 7 SP1, Windows 8, and Windows 8.1 operating systems.
 
For Windows 10 you use .NET version 5 (or its updates), as installed by your windows update feature.  (MX will also run on version 4.8; the .Net download for version 4.8 should be here https://dotnet.microsoft.com/download/dotnet-framework/net48).
 
 
==.NET==
 
Microsoft originally created '''.NET''' for all operating systems, but Microsoft then decided to restrict it to just Windows (and that was the position while MX was being developed, and was still true in early 2020), mostly to encourage greater dominance by Microsoft software and hardware.
 
Mono was then born based on .NET to work with all operating systems, Mono subsequently changed independently from .NET (although Microsoft still has a leading role).
 
Later,  Microsoft launched an alternative called .NET Core that took out of .NET the parts that were Windows specific, and it ceased work on further development of .NET beyond version 4.x.x.
 
The most recent change, in November 2020, involved a change around of names, and the multi-operating system .NET Core product took over the .NET name as version 5
 
==Are you using elevated administrative rights?==
 
For those who downloaded the first MX Beta in January 2015, the code was only experimental and that version had to be run by a Windows Administrative User, but Steve Loft soon improved the code and now none of the code requires any elevated rights and it can be run by a normal user (or  a user with administrative rights) without needing to be started by '''Run as administrator'''.
 
However, Cumulus MX initiates a web server, which is what runs the [[MX_Administrative_Interface|Admin Interface]]. To access that, all users need to be given elevated rights to the port on which the web server runs. By default this is port 8998, so that is used in the example below of the one-off command needed to give all users access to the port. You can use a '''-port=nnnn''' parameter when starting MX to make it use another port, if you use that then the command below needs revising accordingly.
 
To enter the command, first open a command window as administrator. One way to do this is to right click the windows symbol at the start of the windows task bar. The option to choose there is dependent on some settings which determine what appears when you right click:
*the normal default on Windows 10 is '''Windows PowerShell (admin)''',
*the normal default on earlier versions of Windows is  '''Command Prompt (Administrator)'''
*an alternative is '''Windows Terminal'''
Whichever of these you can use, the result is it opens a new window on your monitor with a prompt for typing. In that window type the command:
:<code>netsh http add urlacl url=http://*:8998/ user=\users</code>
 
You only need to do that once. If you do not issue this command, administrative rights are needed every time to access the port so you can use the admin interface.


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.




=How to run MX=
=How to run MX=


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).  
   
If this is your first run of MX, please see [[First_Run_of_MX|First Run of MX page]].


There are two ways to run MX:
There are two ways to run MX:
Line 287: Line 302:
=Access to admin interface=
=Access to admin interface=


The admin interface URL '''http://*:8998/''' needs to have that wildcard "*" replaced by a precise location if we are to access the [[MX_Administrative_Interface|admin interface]] to change [[Cumulus.ini|settings]], view our weather data, or edit various [[Log Files|Cumulus files]] (extreme records or log files).   
The admin interface URL '''http://*:8998/''' needs to have that wildcard "*" replaced by a precise location if we are to access the [[MX_Administrative_Interface|admin interface]] to change [[Cumulus.ini|settings]], view our weather data, or edit various [[:Category:Cumulus_Files|Cumulus files]] (extreme records or log files).   


The missing part of the URL depends on how your local network is set up.   
The missing part of the URL depends on how your local network is set up.   


*If you are accessing the admin interface on the same device as that running MX then the "*" can be replaced by "localhost", i.e. '''http://localhost:8998/''' will be used to load the admin interface into your browser.
*If you are accessing the admin interface on the same device as that running MX then the "*" can be replaced by "localhost", i.e. '''http://localhost:8998/''' will be used to load the admin interface into your browser.  
** (Note "localhost" will work even if you host your own database server or own web server, each of these uses a different port number to ensure the correct server is loaded)
*In the more general case when you want to access the admin interface from anywhere on your local wired and wireless interface, then the "*" needs to be replaced by a string of 4 numbers representing what is called a IPv4 address (w.x.y.z) of the device you have installed MX on.
*In the more general case when you want to access the admin interface from anywhere on your local wired and wireless interface, then the "*" needs to be replaced by a string of 4 numbers representing what is called a IPv4 address (w.x.y.z) of the device you have installed MX on.


5,838

edits

Navigation menu