Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

highcharts?

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

highcharts?

Post 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
GaryJ
Posts: 8
Joined: Sat 25 Oct 2014 11:24 pm
Weather Station: Davis VP2
Operating System: Windows Server 2012 R2
Location: Darwin, Australia

Re: highcharts?

Post 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
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post by n9mfk »

I have made that if i mouse the chart it shows dat as Tuesday may 6 very strange
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: highcharts?

Post 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;
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post 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?
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: highcharts?

Post 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.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post by n9mfk »

thanks mark just as a note im using the tnet weather script to make reatime.log
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post 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
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: highcharts?

Post 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)
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post by n9mfk »

in my ftp program filesize is 2,941,719
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post 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
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: highcharts?

Post 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).
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post 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
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: highcharts?

Post 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.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: highcharts?

Post by n9mfk »

Hi mark I have it st up
I not sure how to get the sql data in the chart
Post Reply