Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

CumulusFile.php (Time)

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
Post Reply
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

CumulusFile.php (Time)

Post by inaciovieira »

Hi. i have the script CumulusFile.php where i will like to import my monthlog.txt.
Can some one help how i only import the values where the minite hare 00,05,10. Them monthlog has the values evey minute

01-07-13;00:01;23,8;10;-9,7;0,8;6,1;21;0,0;0,0;1013,2;1488,3;25,6;13;3,6;23,8;23,8;0;0;0,00;0,00;20,6;0;0,0;90;0,0
01-07-13;00:06;23,8;10;-9,7;0,0;3,6;0;0,0;0,0;1013,3;1488,3;25,5;13;3,6;23,8;23,8;0;0;0,00;0,00;20,8;0;0,0;90;0,0
01-07-13;00:11;23,7;10;-9,8;1,7;18,4;58;0,0;0,0;1013,3;1488,3;25,5;13;18,4;23,7;23,7;0;0;0,00;0,00;20,3;0;0,0;45;0,0
01-07-13;00:16;23,8;10;-9,7;2,0;18,4;60;0,0;0,0;1013,3;1488,3;25,5;11;5,0;23,8;23,8;0;0;0,00;0,00;20,4;0;0,0;90;0,0

I will like them like

01-07-13;00:00;23,8;10;-9,7;0,8;6,1;21;0,0;0,0;1013,2;1488,3;25,6;13;3,6;23,8;23,8;0;0;0,00;0,00;20,6;0;0,0;90;0,0
01-07-13;00:05;23,8;10;-9,7;0,0;3,6;0;0,0;0,0;1013,3;1488,3;25,5;13;3,6;23,8;23,8;0;0;0,00;0,00;20,8;0;0,0;90;0,0
01-07-13;00:10;23,7;10;-9,8;1,7;18,4;58;0,0;0,0;1013,3;1488,3;25,5;13;18,4;23,7;23,7;0;0;0,00;0,00;20,3;0;0,0;45;0,0
01-07-13;00:15;23,8;10;-9,7;2,0;18,4;60;0,0;0,0;1013,3;1488,3;25,5;11;5,0;23,8;23,8;0;0;0,00;0,00;20,4;0;0,0;90;0,0

thanks
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: CumulusFile.php (Time)

Post by beteljuice »

If you only want every 5 mins, why did you change the logging interval from 10 min to 1 min ?

From the wiki, Cumulus logfiles:
Files are automatically created with names in the form <Month><Year>log.txt (for example, the file for August 2009 is called Aug09log.txt); an entry is made to the current month's file every ten (default value; you can change this on the station settings screen) minutes, recording the current sensor values.
Image
......................Imagine, what you will KNOW tomorrow !
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: CumulusFile.php (Time)

Post by inaciovieira »

beteljuice wrote:If you only want every 5 mins, why did you change the logging interval from 10 min to 1 min ?

From the wiki, Cumulus logfiles:
Files are automatically created with names in the form <Month><Year>log.txt (for example, the file for August 2009 is called Aug09log.txt); an entry is made to the current month's file every ten (default value; you can change this on the station settings screen) minutes, recording the current sensor values.
I have chang it to 10 min but a have abaut 1year to upload to sql, that wy a whant to upload the files only with 00,05 and 10

Sorry my bad english
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: CumulusFile.php (Time)

Post by beteljuice »

Sorry about the misunderstanding, but looking again at your example files - you don't actually have any data for xx:00 , xx:05 , xx:10

Do you mean you have a years worth of data (all at 5min intervals), but they could be eg. xx:02 , xx:07 , xx:12 and you would like to 'round' the minutes down to xx:00 , xx:05 etc.

Do you already have a (php) routine to parse the file(s) and get the data ?
Image
......................Imagine, what you will KNOW tomorrow !
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: CumulusFile.php (Time)

Post by inaciovieira »

beteljuice wrote:Sorry about the misunderstanding, but looking again at your example files - you don't actually have any data for xx:00 , xx:05 , xx:10

Do you mean you have a years worth of data (all at 5min intervals), but they could be eg. xx:02 , xx:07 , xx:12 and you would like to 'round' the minutes down to xx:00 , xx:05 etc.

Do you already have a (php) routine to parse the file(s) and get the data ?
I have some monthe logs withs xx:00, xx:05, xx:10, no i don t have any php routine yeat,
01-01-13;00:00;11,2;54;2,2;0,7;3,6;36;0,0;0,0;1018,9;975,3;16,4;70;3,6;11,2;11,2;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:01;11,2;54;2,2;0,8;3,6;39;0,0;0,0;1018,9;975,3;16,3;70;3,6;11,2;11,2;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:02;11,2;54;2,2;0,9;3,6;41;0,0;0,0;1018,8;975,3;16,3;70;3,6;11,2;11,2;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:03;11,2;54;2,2;1,0;3,6;43;0,0;0,0;1018,9;975,3;16,3;70;3,6;11,2;11,2;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:04;11,2;54;2,2;1,1;3,6;44;0,0;0,0;1018,8;975,3;16,3;71;3,6;11,2;11,2;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:05;11,2;54;2,2;1,2;3,6;45;0,0;0,0;1018,8;975,3;16,3;70;3,6;11,2;11,2;0;0;0,00;0,00;9,3;0;0,0;45;0,0
01-01-13;00:06;11,2;54;2,2;1,1;3,6;45;0,0;0,0;1018,8;975,3;16,3;71;1,1;11,2;11,2;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:07;11,3;53;2,1;1,0;5,0;45;0,0;0,0;1018,8;975,3;16,3;70;5,0;11,3;11,3;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:08;11,3;53;2,1;1,2;5,0;45;0,0;0,0;1018,8;975,3;16,3;70;5,0;11,3;11,3;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:09;11,3;53;2,1;1,3;5,0;48;0,0;0,0;1018,8;975,3;16,3;70;3,6;11,3;11,3;0;0;0,00;0,00;9,4;0;0,0;90;0,0
01-01-13;00:10;11,3;53;2,1;1,2;5,0;49;0,0;0,0;1018,8;975,3;16,3;71;2,5;11,3;11,3;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:11;11,3;52;1,8;1,2;5,0;49;0,0;0,0;1018,8;975,3;16,3;70;3,6;11,3;11,3;0;0;0,00;0,00;9,4;0;0,0;45;0,0
01-01-13;00:12;11,3;52;1,8;1,2;5,0;47;0,0;0,0;1018,8;975,3;16,3;71;3,6;11,3;11,3;0;0;0,00;0,00;9,4;0;0,0;360;0,0
01-01-13;00:13;11,4;52;1,9;1,2;5,0;43;0,0;0,0;1018,8;975,3;16,3;70;2,5;11,4;11,4;0;0;0,00;0,00;9,5;0;0,0;360;0,0
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: CumulusFile.php (Time)

Post by mcrossley »

can you not just upload all the entries to the SQL table, then use SQL to delete the ones you don't want?
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: CumulusFile.php (Time)

Post by inaciovieira »

mcrossley wrote:can you not just upload all the entries to the SQL table, then use SQL to delete the ones you don't want?
That is what i did yestarday. I uoplod all entries and them made a sql code to delete between 01 and 05, 06 and 09 .......l
Post Reply