Page 1 of 2

highcharts?

Posted: Sun 02 Nov 2014 1:37 am
by n9mfk
Hi I am not sure what i done wrong
im use realtime.log
and it keeps changing from time to year
its like I have missed some thing
http://n9mfk.info/wxrtchart.php
Thanks Beau

Re: highcharts?

Posted: Sun 02 Nov 2014 2:34 am
by GaryJ
The date field of your realtime.log is 2014-10-31, which is delimited by a '-', not a '/'. In your realtimeLogParser.php file try changing the date_limiter variable to be '-' instead of '/' and see how it goes.

Gary

Re: highcharts?

Posted: Mon 03 Nov 2014 2:42 am
by n9mfk
I have made that if i mouse the chart it shows dat as Tuesday may 6 very strange

Re: highcharts?

Posted: Mon 03 Nov 2014 9:47 am
by mcrossley
Hmm, your realtime.txt has the date in the format "dd/mm/yy".

http://n9mfk.info/realtime.txt

But your realtime.log has the date in the format "yyyy-mm-dd"

http://n9mfk.info/realtime.log

So the logparser script should be using the delimiter set to "-".

But the logparser script is expecting the log file to have the date in the same order as the realtime.txt file, i.e. "dd-mm-yy"

So either change how you create your logfile, or change the parser script to use your current log format.
The parser script line to change would be...

Code: Select all

    $tim = gmmktime($t[0], $t[1], $t[2], $d[1], $d[0], $d[2]) * 1000;

to

    $tim = gmmktime($t[0], $t[1], $t[2], $d[1], $d[2], $d[0]) * 1000;

Re: highcharts?

Posted: Mon 03 Nov 2014 1:27 pm
by n9mfk
Mark,

I have some questions

should realtimeCumulus.js be pointing to realtime.txt or realtime.log ?

when the chart loads it shows the time then it switch to 2015 2020 2025 2030 if that the year why wold it not be 2014 ?

is there away to stop it from switching?

Re: highcharts?

Posted: Mon 03 Nov 2014 1:31 pm
by mcrossley
n9mfk wrote: should realtimeCumulus.js be pointing to realtime.txt or realtime.log ?
realtime.txt

it appends the latest values from realtime.txt to the graph, pointing it at realtime.log is causing your date/time issues.

EDIT: I tweaked your realtimeCumulus.js file online, changed it to use 'realtime.txt' and date delimiter back to '/' and the page then works fine.

Re: highcharts?

Posted: Tue 04 Nov 2014 3:17 pm
by n9mfk
thanks mark just as a note im using the tnet weather script to make reatime.log

Re: highcharts?

Posted: Sat 08 Nov 2014 1:53 am
by n9mfk
Hi mark is there a way around this error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /home/n9mfk/public_html/realtimeLogParser.php on line 81

Re: highcharts?

Posted: Sat 08 Nov 2014 9:10 am
by mcrossley
Hmm, 66MB is a fair bit of memory to use, how large is your realtime.log file? (I am on a phone now so looking at anything is difficult)

Re: highcharts?

Posted: Sat 08 Nov 2014 1:42 pm
by n9mfk
in my ftp program filesize is 2,941,719

Re: highcharts?

Posted: Sat 08 Nov 2014 3:25 pm
by n9mfk
Hi Mark i cut the file down to just this month of data no more error but it loads slow
the file now is 2,891,527

Re: highcharts?

Posted: Sat 08 Nov 2014 3:35 pm
by mcrossley
That is a lot of real time data, I store mine in a SQL database which is much more efficient way to do it than paresing text files, even so I only store 7 days worth of data and actually use 5 days at the mo.

I'd have to have a look at the script, I suspect that it would need rewriting to cope with large data volumes, it was probably written with processing a few days in mind. (Still on my phone).

Re: highcharts?

Posted: Sat 08 Nov 2014 3:47 pm
by n9mfk
Hi mark,
I have no problem doing mysql i wold need help to get it set up
when you have time if you cold point me in the correct way it would help
thanks beau

Re: highcharts?

Posted: Sat 08 Nov 2014 4:53 pm
by mcrossley
The ImportCumulusFile script in the Wiki is already setup to handle a realtime table, it will import the data and trim old data beyond a specified time limit.

Re: highcharts?

Posted: Sat 08 Nov 2014 8:11 pm
by n9mfk
Hi mark I have it st up
I not sure how to get the sql data in the chart