Page 1 of 1

CumulusFile.php (Time)

Posted: Thu 11 Jul 2013 10:54 pm
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

Re: CumulusFile.php (Time)

Posted: Fri 12 Jul 2013 3:23 am
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.

Re: CumulusFile.php (Time)

Posted: Fri 12 Jul 2013 9:49 am
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

Re: CumulusFile.php (Time)

Posted: Fri 12 Jul 2013 11:00 pm
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 ?

Re: CumulusFile.php (Time)

Posted: Fri 12 Jul 2013 11:41 pm
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

Re: CumulusFile.php (Time)

Posted: Sat 13 Jul 2013 12:06 am
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?

Re: CumulusFile.php (Time)

Posted: Sat 13 Jul 2013 9:48 am
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