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 4017) - 17 March 2024

Legacy Cumulus 1 release v1.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

Highcharts Graphs

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Highcharts Graphs

Post by nitrx »

mcrossley wrote:maybe I was still 'fiddling' with it - I'm leaving it now to go out for the evening so is should be stable, and updating ;)
see my update above :D
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Highcharts Graphs

Post by steve »

Looks good. If you want to see how it looks with a Davis, just let me know.
Steve
User avatar
mcrossley
Posts: 12689
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 Graphs

Post by mcrossley »

You're welcome to all the source Steve, the 'hard' part is creating the real time.txt log file. I think it was Kevin who created a PHP based archived, but it also does the day file. As I run on a Windows box I created a simple batch script to just keep a log file with the last 60 minutes of data in it. The PHP above then parses this file and returns JSON formatted data for the web tags you request as params.

Getting ready to go out now, so I'll zip everything up tomorrow.
User avatar
tomcatuk
Posts: 331
Joined: Fri 26 Dec 2008 4:41 pm
Weather Station: ----> Davis Vantage Vue
Operating System: Windows 10 20H2 19042.685
Location: Buckingham

Re: Highcharts Graphs

Post by tomcatuk »

Like the graphs Mark.... :)
Regards Steve
User avatar
mcrossley
Posts: 12689
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 Graphs

Post by mcrossley »

Here is the realtime, stripped to the basics so you can adapt and include in another page if you wish...

http://weather.wilmslowastro.com/realtimeCumulus.htm

The batch file I am using to create the 1 hour realtime.log file is dead simple...

Code: Select all

:start
copy realtime.log+realtime.txt realtime.tmp
tail -60 realtime.tmp > realtime.log
sleep 60
goto start
EDIT: Though I see there will be problems with this if you are not in the UK time zone :(, a little more code required to fix that tomorrow...
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Highcharts Graphs

Post by nitrx »

mcrossley wrote:Here is the realtime, stripped to the basics so you can adapt and include in another page if you wish...

Code: Select all

:start
copy realtime.log+realtime.txt realtime.tmp
tail -60 realtime.tmp > realtime.log
sleep 60
goto start
Win 7 doesn't recognise the tail command ?
User avatar
mcrossley
Posts: 12689
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 Graphs

Post by mcrossley »

Ah, yes, my XP box has the Windows 2003 Resource Kit tools installed on it - you can download it for free, and most of the tools still work on Win 7 x64. I think 'sleep' is a RK tool as well?

PS: The script is now updated to avoid TZ issues.
http://weather.wilmslowastro.com/realtimeCumulus.htm
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Highcharts Graphs

Post by nitrx »

Hmmmz
Note: The Windows Server 2003 Resource Kit Tools are not supported on 64-bit platforms.
User avatar
mcrossley
Posts: 12689
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 Graphs

Post by mcrossley »

Some of the tools in the RK no longer work on Win x64, but sleep and tail are definitely fine. Windows will popup a compatibility warning when you run the installer, you can ignore that, let the RK install, then copy off the sleep & tail utilities and uninstall the RK again if you have concerns.

Sleep 60 could be substituted with the built-in 'choice' command...

choice /T 60 /D y

Edit: you don't want to go fiddling around with the W2K3 RK tools that delve into kernel flags for instance on Windows 7 x64 :shock: But the simple 'user' type utilities are fine.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Highcharts Graphs

Post by nitrx »

I'm not going to try this, I tried cumulstoolbox but this creates huge logfiles minimum is 1 day, but I had no succes maybe because I've another dateformat I changed the datedelimiter / to - in all the files but no succes http://www.apeldoorn.tk/weer/realtimecumulus.htm I give up :(
User avatar
mcrossley
Posts: 12689
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 Graphs

Post by mcrossley »

Ron

The problem is your "realtimeLogParser.php" is not executing as PHP, it is just returning the script file rather than the data. try it...
http://www.apeldoorn.tk/weer/realtimeLo ... .php?rfall

If you are running on Linux web server, then I think you have to mark the php file as 'executable' with chmod(?) in order for it to run.

The realtime.txt parser part is running OK, with the date delimiter changed to '-'. I thought Cumulus used as standard format for realtime.txt - wrong!
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Highcharts Graphs

Post by steve »

mcrossley wrote:The realtime.txt parser part is running OK, with the date delimiter changed to '-'. I thought Cumulus used as standard format for realtime.txt - wrong!
I think all of the date separators in dates created by Cumulus uses the configured system data separator. As I've mentioned before, the explanation is that while the code says "use a slash", the underlying system routines take that to mean "use the date separator configured in Windows". I had no idea that was going to happen. Cumulus was never intended to run on non-UK systems - or even on anyone else's PC but mine.
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Highcharts Graphs

Post by nitrx »

I've chmodded the php file to 777 but no result this is my logfile http://www.apeldoorn.tk/weer/realtimelog.txt (I just started the ftp again)

Hmm if I look at the sourcecode of the php file it looks really weird ... :shock:
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Highcharts Graphs

Post by nitrx »

Thank Mark I've done a make-over from the php file it was complete corrupted :mrgreen: seems to work now but the time axis don't match .
User avatar
mcrossley
Posts: 12689
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 Graphs

Post by mcrossley »

Hmm, the PHP is now returning data, but the first entry has a time stamp of '0' for some reason. What does the first line of your realtime.log file look like?

Code: Select all

[[[0,10.1],[1353865628000,10.1],[1353865728000,10.2],....
Edit: You also need to remove the following line from the PHP script - It is a left over from my experiments :(

Code: Select all

date_default_timezone_set('UTC');
Post Reply