Page 1 of 1

alltime records editor

Posted: Fri 29 Nov 2019 7:23 pm
by Dolmen
Hallo,
I've just installed v3.2.0 build 3056, coming from v3.0.0. build 3048.
I appreciate very much the new added features.

My problem is in the alltime records editor section:
the page shows only the list of my station's records, with value and timestamp (first three columns); the rest of the page is blank.
At the bottom I can see the button "Fetch Monthly Log Data (caution, lenghty process)" (see attached pic n.1)
pic1.png
Clicking on the button, Cumulus correcly loads the records from Monthly Log data: after some minutes of work (I have 10 years of data, 1 minute interval) the loaded values and timestamps appears in their columns (pic. n. 2)
Apparently, there's no way to make it extract data from dayfile
pic2.png

Re: alltime records editor

Posted: Fri 29 Nov 2019 9:23 pm
by Mapantz
I don't know for sure, but you may have an erroneous line somewhere in your dayfile?

I only have just shy of 4 years worth, but both options are working ok for me.

Re: alltime records editor

Posted: Sat 30 Nov 2019 4:29 pm
by mcrossley
Take a look in your MXdiags file and see if it is logging an error when reading the dayfile.

Re: alltime records editor

Posted: Sun 01 Dec 2019 8:45 pm
by Dolmen
Thanks a lot for your answers :-)

I've found the first 580 lines (almost two years of data!) in my dayfile.txt are written in hh.mm time format, the rest is in hh:mm format.
I've deleted those "hh.mm" lines (I've made a backup copy first ;-)), and the editor now works!

Question: is there a smart way to convert the old hh.mm lines into hh:mm?

Thanks a lot,
Alessandro

Re: alltime records editor

Posted: Mon 02 Dec 2019 9:58 am
by mcrossley
Dolmen wrote:
Sun 01 Dec 2019 8:45 pm
Question: is there a smart way to convert the old hh.mm lines into hh:mm?
Could be tricky or simple ;)

Do you use a comma decimal?
What is your list separator?

If you use a comma decimal and say ";" as a separator then simple - can you not just replace all occurrences of "." with ":"?

If the file uses a dot for other things in the first 580 lines then it is trickier.

Re: alltime records editor

Posted: Mon 02 Dec 2019 6:14 pm
by Dolmen
mcrossley wrote:
Mon 02 Dec 2019 9:58 am
Dolmen wrote:
Sun 01 Dec 2019 8:45 pm
Question: is there a smart way to convert the old hh.mm lines into hh:mm?
Could be tricky or simple ;)

Do you use a comma decimal?
What is your list separator?

If you use a comma decimal and say ";" as a separator then simple - can you not just replace all occurrences of "." with ":"?

If the file uses a dot for other things in the first 580 lines then it is trickier.
I'm afraid we're on the trickier side: my file uses dot decimal :-/

Re: alltime records editor

Posted: Mon 02 Dec 2019 8:04 pm
by Weerhaas
Maybe can you dayfile.txt export to Excel and split it in colums .
Change the dot in the wrong columns to :

Re: alltime records editor

Posted: Mon 02 Dec 2019 8:26 pm
by rich27gc
I also have a problem with the dayfile in the All time records editor.
When I open the editor an error is generated in the MXdiags folder : -

2019-12-02 20:17:44.072 Error on line 1 of data/dayfile.txt: Invalid format.

I've looked at the format of the dayfile and it looks fine the first few lines look like this : -

13/01/10,6.0,315,21:20,-1.9,19:20,0.0,00:00,1000.0,00:00,1001.3,17:36,0.0,00:00,0.0,-1.3,2.9,2.2,21:50,,,,,,,,,,,,,,,,,,,,,,,,,,,
14/01/10,6.9,90,16:36,-1.7,02:44,4.8,13:45,1000.4,01:34,1011.3,23:44,1.8,11:35,0.6,0.2,9.2,2.2,23:44,,,,,,,,,,,,,,,,,,,,,,,,,,,
15/01/10,14.5,225,19:50,-1.3,00:14,4.6,19:57,1006.4,23:55,1011.4,00:14,3.6,20:02,4.5,2.4,34.0,6.0,19:30,,,,,,,,,,,,,,,,,,,,,,,,,,,

The dayfile loads ok into the Data logs section on the CMX interface.

I'm at a bit of a loss!! :?

Re: alltime records editor

Posted: Mon 02 Dec 2019 9:50 pm
by beteljuice
You have lots of data missing ! (and the first couple of dozen lines are shorter than the rest)

Here's all the fields you should have

Also ... if this is your current dayfile.txt why does it end 21/05/(20)11 ?

Re: alltime records editor

Posted: Mon 02 Dec 2019 10:38 pm
by mcrossley
rich27gc wrote:
Mon 02 Dec 2019 8:26 pm
I also have a problem with the dayfile in the All time records editor.
When I open the editor an error is generated in the MXdiags folder : -

2019-12-02 20:17:44.072 Error on line 1 of data/dayfile.txt: Invalid format.

I've looked at the format of the dayfile and it looks fine the first few lines look like this : -

13/01/10,6.0,315,21:20,-1.9,19:20,0.0,00:00,1000.0,00:00,1001.3,17:36,0.0,00:00,0.0,-1.3,2.9,2.2,21:50,,,,,,,,,,,,,,,,,,,,,,,,,,,
14/01/10,6.9,90,16:36,-1.7,02:44,4.8,13:45,1000.4,01:34,1011.3,23:44,1.8,11:35,0.6,0.2,9.2,2.2,23:44,,,,,,,,,,,,,,,,,,,,,,,,,,,
15/01/10,14.5,225,19:50,-1.3,00:14,4.6,19:57,1006.4,23:55,1011.4,00:14,3.6,20:02,4.5,2.4,34.0,6.0,19:30,,,,,,,,,,,,,,,,,,,,,,,,,,,

The dayfile loads ok into the Data logs section on the CMX interface.

I'm at a bit of a loss!! :?
I see the problem, the entries created with very old versions of Cumulus did not have as many records as later versions - they also predate the Wiki information.

Another problem is the appended empty fields -was this file edited in Excel or similar at some point? They are not taken into account in my code as I just count the number of fields and assumed they would have data in them - lazy coding, I'll fix it.

Re: alltime records editor

Posted: Mon 02 Dec 2019 10:58 pm
by Weerhaas
Maybe you can use something like this?

Put the php file and dayfile.txt in the same folder.

<!DOCTYPE HTML>
<html>
<head>
<title>convert hh:mm naar hh.mm</title>
</head>
<body>

<?php
$path_to_file = 'dayfile.txt';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("00.00","00:00",$file_contents);
$file_contents = str_replace("00.01","00:01",$file_contents);
$file_contents = str_replace("00.02","00:02",$file_contents);
$file_contents = str_replace("00.03","00:03",$file_contents);
$file_contents = str_replace("00.04","00:04",$file_contents);

file_put_contents($path_to_file,$file_contents);
echo "FINISHED";

?>
</body>
</html>

Re: alltime records editor

Posted: Tue 03 Dec 2019 4:57 pm
by rich27gc
mcrossley wrote:
Mon 02 Dec 2019 10:38 pm
rich27gc wrote:
Mon 02 Dec 2019 8:26 pm
I also have a problem with the dayfile in the All time records editor.
When I open the editor an error is generated in the MXdiags folder : -

2019-12-02 20:17:44.072 Error on line 1 of data/dayfile.txt: Invalid format.

I've looked at the format of the dayfile and it looks fine the first few lines look like this : -

13/01/10,6.0,315,21:20,-1.9,19:20,0.0,00:00,1000.0,00:00,1001.3,17:36,0.0,00:00,0.0,-1.3,2.9,2.2,21:50,,,,,,,,,,,,,,,,,,,,,,,,,,,
14/01/10,6.9,90,16:36,-1.7,02:44,4.8,13:45,1000.4,01:34,1011.3,23:44,1.8,11:35,0.6,0.2,9.2,2.2,23:44,,,,,,,,,,,,,,,,,,,,,,,,,,,
15/01/10,14.5,225,19:50,-1.3,00:14,4.6,19:57,1006.4,23:55,1011.4,00:14,3.6,20:02,4.5,2.4,34.0,6.0,19:30,,,,,,,,,,,,,,,,,,,,,,,,,,,

The dayfile loads ok into the Data logs section on the CMX interface.

I'm at a bit of a loss!! :?
I see the problem, the entries created with very old versions of Cumulus did not have as many records as later versions - they also predate the Wiki information.

Another problem is the appended empty fields -was this file edited in Excel or similar at some point? They are not taken into account in my code as I just count the number of fields and assumed they would have data in them - lazy coding, I'll fix it.
The new update B3058 has fixed the problem.
Thanks Mark :clap:

Re: alltime records editor

Posted: Tue 03 Dec 2019 5:50 pm
by mcrossley
Great, thanks for confirming.

Re: alltime records editor

Posted: Thu 05 Dec 2019 6:20 pm
by Dolmen
mcrossley wrote:
Mon 02 Dec 2019 9:58 am
Dolmen wrote:
Sun 01 Dec 2019 8:45 pm
Question: is there a smart way to convert the old hh.mm lines into hh:mm?
Could be tricky or simple ;)

Do you use a comma decimal?
What is your list separator?

If you use a comma decimal and say ";" as a separator then simple - can you not just replace all occurrences of "." with ":"?

If the file uses a dot for other things in the first 580 lines then it is trickier.
I succeded, using an advanced text editor: Find/Replace with regular expression

Code: Select all

Find ;(\d\d)[.](\d\d);
Replace with ;(\1):(\2);
CMX records editor works great now!

Thank you,
Alessandro

Re: alltime records editor

Posted: Fri 06 Dec 2019 8:28 am
by Weerhaas
Thanks.

That works nice in Notepad++