Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.6 (build 3082) - 1 June 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

CumulusMX and Cumulus1 UI style Multilingual Websites

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
Post Reply
sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

Frank G wrote:
Sun 26 Apr 2020 4:14 pm
If you have a hint for me what I did wrong with the charts, I would appreciate.
The data files needed for charts are those ending in .json and found locally in CumulusMX/web

Are they uploaded to your web space?
I think not to the folder where you have installed the UI web site because the developer feature in my browser reports 404 - not found.

Frank G
Posts: 39
Joined: Wed 25 Sep 2013 5:03 pm
Weather Station: WH1080 SE
Operating System: Linux raspberrypi (4.9.59-v7+)
Location: Germany

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Frank G »

The data files needed for charts are those ending in .json and found locally in CumulusMX/web
Are they uploaded to your web space?
Yes, they are uploaded to the web, but in my standard Cumulus folder. In the graphSettings.php I set the path to the folder with the '.json files. And it works for the gauges (mouseover, tooltip with graphs/charts) but not for the charts. I'm a little bit puzzled, do I have to set the path to the *.json files for the charts in another settings-file (I had a look in several files, but can't find anything) or what did I wrong?
It works, when I copy the *.json files in my CMX-UI root folder, but I want avoid double data keeping.
Frank
Image
Weather at Buchenau/Germany: http://wetter.buchenau-net.de

User avatar
PaulMy
Posts: 2131
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by PaulMy »

Hi Frank,
Possibly editing \js\cumuluscharts.js for the url: files which is likely "graphconfig.json" 'tempdata.json' etc. I remember needing to do that for the cumulusutils

Enjoy,
Paul

Frank G
Posts: 39
Joined: Wed 25 Sep 2013 5:03 pm
Weather Station: WH1080 SE
Operating System: Linux raspberrypi (4.9.59-v7+)
Location: Germany

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Frank G »

Possibly editing \js\cumuluscharts.js for the url: files which is likely "graphconfig.json" 'tempdata.json' etc. I remember needing to do that for the cumulusutils
That was the key. Had to set a relativ path to the "standard" Cumulus *.json files. I had a look in the cumulschars.js so often, but didn't find the "url". Thanks for the eye opener. :)
Frank
Image
Weather at Buchenau/Germany: http://wetter.buchenau-net.de

User avatar
PaulMy
Posts: 2131
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by PaulMy »

Hi Frank,
Very good, glad that got resolved.

Enjoy,
Paul

BCJKiwi
Posts: 947
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by BCJKiwi »

Updated Moon MoonPercent image set available in first post his thread.

A number of the images were out of sequence.

griffo42
Posts: 56
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 10
Location: Brisbane, Queensland, Australia
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by griffo42 »

I have 2 matters for discussion.

Firstly, I have not found anywhere on the scripts where the date is shown. I believe that to be worthwhile information to be shown. My solution is shown on this attachment:
website with date.jpg
How I achieved this was to change line 6 of nav_menu.php to:

<span lang="en"><?php echo /* $location ." - ". */ $longlocation . " - " . date("l j F Y") ; ?></span>

There may be better or more preferred ways of achieving a better result which is more in line with the overall design of the scripts.

Secondly, the NOAA reports generated by noaareports.php do not show degrees, minutes and seconds correctly in the header.

Here are examples of mine for April 2020 and Year 2020 and the scripts encoding. From my Notepad++ shots there seems to be a difference in the encoding used.
noaareports.php encoding.jpg
NOAAMO0420.txt encoding.jpg
NOAAYR2020.txt encoding.jpg
Could someone suggest a fix please.

The URL for these sripts is :https://www.kstwx.net/mxtest/index.php

best wishes

Keith
You do not have the required permissions to view the files attached to this post.
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win10 - Saratoga Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/mxtest/index.php
Image

BCJKiwi
Posts: 947
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by BCJKiwi »

Hmm
Don't know why the date is not shown anywhere and the time is only shown on the dashboard.
Something to add on the next version.

Well I have no control over the degree, minutes, seconds indicators - this would have to be added to CumulusMX.
They existed in Cumulus1 but I don't think they have ever been in MX.
There was a problem with the indicators showing strange characters so that may be why they never made it into MX ?
However the issue of the strange characters was been resolved on release of these templates.

So place a request with the MX development team to add them to MX.

It is not clear to me what you mean by a "difference in the encoding" unless you are referring to the missing degree, minute, second symbols.

sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

BCJKiwi wrote:
Thu 30 Apr 2020 5:09 am
They existed in Cumulus1 but I don't think they have ever been in MX.
That is my opinion too.
griffo42 wrote:
Thu 30 Apr 2020 4:44 am
<?php echo /* $location ." - ". */ $longlocation . " - " . date("l j F Y")
Some people operate with rollover at 9am/10am, there might need to be a debate whether the date should be the PHP date you have chosen, the date from the real-time upload file or the meteorological date (the one that changes at rollover) as the last might be more useful for the pages showing "today" and "this month" data.
griffo42 wrote:
Thu 30 Apr 2020 4:44 am
From my Notepad++ shots there seems to be a difference in the encoding used.
Encoding should be according to parameter within the NOAA report setting screen selection. If you are saying, as I think you are, MX is using different encodings for the monthly and yearly reports then please explain what is different in your set-up. I have the UTF-8 option ticked in my settings and both my monthly and yearly reports (with version 3.5.4 of MX with .Net not Mono) are created with same UTF-8 without BOM encoding. So I don't see your problem, what versions of MX and Mono are you using?

In Steve Loft's early release announcements, there were a number of fixes because his beta MX was not being consistent in the encoding used for these reports (all of these fixes should have same effect on both reports). For example, the format used when UTF-8 is not selected was wrong until he subsequently fixed it (build 3036). He also had issues (fixed build 3035) where UTF-8 BOM was being incorrectly used and where Mono was over-riding the encoding users selected.

sutne
Posts: 67
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: Oregon Scientific WMR100
Operating System: Raspbian Buster
Location: Rjoanddalen, Voss, Norway

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sutne »

There should be a date, but not in the header.
It should be in the Time box and be the date of the last update.

http://www.rjoandveret.no/webfilesMX/index.php

BCJKiwi
Posts: 947
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by BCJKiwi »

It will be in the header so it is available on all pages.

griffo42
Posts: 56
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 10
Location: Brisbane, Queensland, Australia
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by griffo42 »

Here are my thoughts and further contributions re my previous post.
BCJKiwi wrote:
Thu 30 Apr 2020 5:09 am
Hmm
Don't know why the date is not shown anywhere and the time is only shown on the dashboard.
Something to add on the next version.
BCJKiwi wrote:
Thu 30 Apr 2020 8:09 am
It will be in the header so it is available on all pages.
Regarding the date, I support BCJKiwi's position re the placement and as far as the rollover is concerned its at 12 midnight so for me, it has to always be correct to show today's date.
sfws wrote:
Thu 30 Apr 2020 7:14 am
Encoding should be according to parameter within the NOAA report setting screen selection. If you are saying, as I think you are, MX is using different encodings for the monthly and yearly reports then please explain what is different in your set-up. I have the UTF-8 option ticked in my settings and both my monthly and yearly reports (with version 3.5.4 of MX with .Net not Mono) are created with same UTF-8 without BOM encoding. So I don't see your problem, what versions of MX and Mono are you using?

In Steve Loft's early release announcements, there were a number of fixes because his beta MX was not being consistent in the encoding used for these reports (all of these fixes should have same effect on both reports). For example, the format used when UTF-8 is not selected was wrong until he subsequently fixed it (build 3036). He also had issues (fixed build 3035) where UTF-8 BOM was being incorrectly used and where Mono was over-riding the encoding users selected.
BCJKiwi wrote:
Thu 30 Apr 2020 5:09 am
It is not clear to me what you mean by a "difference in the encoding" unless you are referring to the missing degree, minute, second symbols.
Regarding the NOAA matter, one can see the encoding of each of the 3 examples at the bottom right of each of the Notepad++ v.7.8.5 (64-bit) screenshots. This indicates that the noaareports.php script (silveracorn.nz UIMXwebsite Version 1.0.1) is encoded in UTF-8 and Windows (CR RF) whilst the 2 reports generated by that script are produced with ANSI (Macintosh(CR)) encoding. I may be wrong, but that seems to be the problem with the degree etc indicators not being included and/or shown incorrectly. The two examples in my previous post are those produced in the current month. By editing all other reports in my directory using Notepad++, I have been able to get them displaying correctly.
BCJKiwi wrote:
Thu 30 Apr 2020 5:09 am
So place a request with the MX development team to add them to MX.
Please accept such a request.

Best wishes

Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win10 - Saratoga Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/mxtest/index.php
Image

sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

griffo42 wrote:
Thu 30 Apr 2020 4:44 am
Secondly, the NOAA reports generated by noaareports.php do not show degrees, minutes and seconds correctly in the header.
It seems that Mark is already wondering whether to add the symbols to the generation routine in MX, i.e. the c# routine at https://github.com/cumulusmx/CumulusMX/ ... MX/NOAA.cs where you can see at line 601 only absolute numbers are output no symbols.
griffo42 wrote:
Thu 30 Apr 2020 11:41 am
Regarding the date, I support BCJKiwi's position re the placement and as far as the rollover is concerned its at 12 midnight so for me, it has to always be correct to show today's date
I'm certainly not going to tell anyone where to place the date, my comment was written assuming the date was going to go in the standard footer beside the update time, where it could need to relate to what an individual uses as rollover time. And all I said was it needed some thought.
BCJKiwi wrote:
Thu 30 Apr 2020 8:09 am
It will be in the header so it is available on all pages.
Your decision, but footer is also shared between all pages and as it already shows a time, might be place for date, as per my expectations when I wrote my earlier comment.
griffo42 wrote:
Thu 30 Apr 2020 11:41 am
I may be wrong, but that seems to be the problem with the degree etc indicators not being included
You are correct, as BCJKiwi has already explained, those indicators are simply not part of what Cumulus MX generates. They were in reports generated by Cumulus 1, and BCJKiwi's routine for displaying them uses code by beteljuice written for the Cumulus 1 reports. That coding might be where you are being misled, because that coding does mention the symbols.
griffo42 wrote:
Thu 30 Apr 2020 11:41 am
Regarding the NOAA matter, one can see the encoding of each of the 3 examples at the bottom right of each of the Notepad++ v.7.8.5 (64-bit) screenshots. This indicates that the noaareports.php script (silveracorn.nz UIMXwebsite Version 1.0.1) is encoded in UTF-8 and Windows (CR LF) whilst the 2 reports generated by that script are produced with ANSI (Macintosh(CR)) encoding.
Thank you for expanding on your point.
I thought as you showed two reports generated this month (monthly and yearly) you were claiming a difference between monthly and yearly, sorry about that misunderstanding.

BCJKiwi's script does not generate any reports, it simply assigns the complete existing report produced by MX to a string variable, and then (after a replace that has nothing to do with your question) outputs that string within the web page produced by his PHP.

EDIT (counted as 2 edits because I changed text colour): Mark in a later posts makes a comment about BCJKiwi's assumption that line endings are always CR LF as per your Silver acorn example.

Yes, there is a mismatch between the encoding being used in BCJKiwi's PHP script and the encoding you have selected for the reports to be generated by Cumulus MX.
Possibly, you have created another problem for BCJKiwi, as his script cannot tell what encoding the original reports were created in, so assumes the modern UTF-8 is being used.
Now you have made yourself clear, I can see that the default MX setting is

Code: Select all

NOAAUseUTF8=0
so the Reports are produced using ANSI encoding, not that modern setting. BCKJKiwi has assumed the modern UTF-8 is used everywhere. So for you, his settings.php that declares the UTF-8 charset for all his scripts/ web pages (see my last example below) is wrong for you.What you need to do is to select producing reports in UTF-8 within the options of the NOAA reports screen in MX settings if you want to use BCJKiwi's scripts.

I recall, back in my Cumulus 1 days in April 2014 when Steve Loft introduced the UTF-8 option, I later changed that default setting in Cumulus to

Code: Select all

NOAAUseUTF8=1
and to display the NOAA reports from then onwards I also changed my own web page from using

Code: Select all

<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
which is what was used by all Steve Loft's web templates up to then, to using

Code: Select all

<meta charset="utf-8" />
(and that is what BCJKiwi has used).
Last edited by sfws on Sat 02 May 2020 1:51 pm, edited 2 times in total.

Dennisdg
Posts: 162
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 10 Pro
Location: Camberley
Contact:

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by Dennisdg »

Re NOAA Reports.
I have a double °° Temperature (°°C) since using CumulusMX UI style. OK before using the original CumulusMX.
Correctly showing only one ° Temperature (°C) in http://localhost:8998/noaamonthreport.html.
Same issue using Microsoft Edge Google Chrome in Windows 10 and Chrome Android.
Appreciate help in fixing.

Thanks
You do not have the required permissions to view the files attached to this post.
Dennis

Davis Vantage PRO2
Win 10 Pro

https://g4glp.co.uk

sfws
Posts: 818
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Modified Fine Offset
Operating System: Win. 10 PC
Location: The Marches, UK

Re: CumulusMX and Cumulus1 UI style Multilingual Websites

Post by sfws »

Yes, double degree symbols is a bug in BCJkiwi's routine devised by Beteljuice that was originally written for Cumulus 1.

Find in file noaareports.php near end:

Code: Select all

  echo preg_replace(array('/\xC2/U','/\xB0/U'), array('&deg;','&deg;'),$rpt);
//   echo preg_replace(array('/\xC2/U','/\xB0/U'), array('deg ','deg2 '),$rpt);
//   echo preg_replace('/\xB0/U','&deg;',$rpt);   // UNICODE DEGREE SIGN -> ANSI / UTF8 DEGREE SIGN
//   echo preg_replace('/\xB0/U','&#176',$rpt);   // UNICODE DEGREE SIGN -> UTF8 DEGREE SIGN
Ignore lines commented out (// at start of line), they are just showing 3 different ways to express the degree symbol ("\xBO", "&deg;",and "&#176").

In the uncommented preg_replace line, the routine inserts a degree symbol for both the character "\xC2" (in HTML, that is the &nbsp; character, so it is replacing a space by a degree symbol, and I suspect it was doing that to insert a degree symbol in Long and Lat) and the character "\xB0" (that is the Unicode and UTF-8 degree symbol anyway, that appears before the "C2 after temperature, so I don't know why you want to replace it); giving the result the symbol is repeated.


Solution:
Put "#" in front of existing line with "preg_replace" but without "//" at start. The result is to comment out All those existing lines
If you are using MX and generating your file as UTF-8, it already has a degree symbol before the "C" for Celsius. No replacement is needed.
Last edited by sfws on Sat 02 May 2020 3:37 am, edited 1 time in total.

Post Reply