Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 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

Server Generated Graphs for MX

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

Ah yes! I had to comment out line 12 in jpgraph_windrose.php in version 4.2.0 of jpgraphs! The package doesn't include a file that they have made mandatory.

Code: Select all

#require_once('jpgraph_glayout_vh.inc.php');
It does tell you to do this in the ReadMe ;)
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Post by Herbaldew »

I had to leave after making that last post. I did an ecosia search on "jpgraph_glayout_vh.inc.php" when I returned and your name was listed in hit number 2 :)

I commented out

Code: Select all

require_once('jpgraph_glayout_vh.inc.php');
in "jpgraph_windrose.php" and am making progress.

I am now getting the graphs when I enter the php address ("http:// hostname/images/graphTempOut.php") well actually all but TempIn and TempOut, they are just showing a little box in the middle of the page, but no png's are being made in the images folder.

Anyway, I'm out of my stalemate and can continue on experimenting to try to figure out the rest.

Thanks!
User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

Next look at your .htaccess file - that's what generates the PNGs
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Post by Herbaldew »

Oops - you posted whilst I was typing :)

I had read that, but it says "if you want to use this graphic..." so I planned on coming back to the wind rose after I got everything else sorted.

Will study the .htaccess ... it is as downloaded and in the images folder.
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Post by Herbaldew »

Success!

I did have two more issues. First, a JpGraph Error 25128 (pertaining to imageantialias) had this problem with a lot of the testsuit images as well. Maybe became a problem with v 4.2.0? Easily solved after a quick search on that error number.

The main problem was as you suggested ... an issue with .htaccess. Well, not an issue with it per se but an issue with its permission to be used. It turns out that Apache 2 doesn't allow .htaccess files to work by default. Once I configured Apache 2 to allow it all was golden.

Thanks again for the help!
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Post by Herbaldew »

Herbaldew wrote:Can one make the popup graphs work on the CMX interface (running on rPi)?
I now have pop up graphs on my interface :D

First iteration...I did a full web site setup on my rPi with Apache, PHP, JpGraph and Mark's files. I then went through the trouble of converting my customized interface gauges page to work on the Apache server and changed all the links in my interface pages to link the the gauges page on the Apache server. This worked, but even with the realtime rate set at 2 seconds, the gauges still weren't as close to real time as the interface's built in gauges page. Then I had a thought - what would happen if I changed the imgPathURL line in the interface's gauges.js file to link to Mark's files on the Apache server? It worked! So I now have my gauges running with the speed of the interface plus they now have pop up graphs.

Second iteration...lightened the load...I installed Apache2 and PHP. My /var/www/html folder only has an images folder with just Mark's JSON files in it and the JpGraph folder. CumulusMX is uploading only it's JSON files every five minutes so little extra overhead. I did change the graphs update time to 5 minutes...with the 15 minute default graph update time, I guess you could upload the JSONs every 15 minutes so even less over head. On a side note I thought that the 2,449 and 13 folders in the v4.2.0 JpGraph file was a bit much for what was being done here. I have wittled that down to 29 files and 1 folder and that includes the two fonts that needed to be added.

For the imgPathURL: I had to use the IP of my rPi for it to work, localhost would not. So in my case: 'http://192.168.xxx.xxx/images/'.

The needed JpGraph files if anyone is interested:

Code: Select all

gd_image.inc.php
imageSmoothArc.php
jpg-config.inc.php
jpgraph.php
jpgraph_date.php
jpgraph_errhandler.inc.php
jpgraph_gradient.php
jpgraph_legend.inc.php
jpgraph_line.php
jpgraph_plotline.php
jpgraph_plotmark.inc.php
jpgraph_rgb.inc.php
jpgraph_scatter.php
jpgraph_text.inc.php
jpgraph_theme.inc.php
jpgraph_ttf.inc.php
jpgraph_windrose.php
fonts\arial.ttf
fonts\DejaVuSans-Bold.ttf
fonts\DejaVuSans-BoldOblique.ttf
fonts\DejaVuSans-Oblique.ttf
fonts\DejaVuSans.ttf
fonts\FF_FONT0-Bold.gdf
fonts\FF_FONT0.gdf
fonts\FF_FONT1-Bold.gdf
fonts\FF_FONT1.gdf
fonts\FF_FONT2-Bold.gdf
fonts\FF_FONT2.gdf
fonts\verdana.ttf
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Server Generated Graphs for MX

Post by david3 »

I just upgraded from Cumulus 1 running on Windows to Cumulus MX running on a Raspberry Pi Model 3B+.

I've got the graphs working with jpgraphs, but I notice the last Daily Rainfall graph (from the old graphs) is missing; the one that charts the last month's rainfall, day by day. I'm guessing the data isn't easily available on the server to create that one.

Has anybody found a replacement for it that can be created with jpgraphs?
User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

david3 wrote:I've got the graphs working with jpgraphs, but I notice the last Daily Rainfall graph (from the old graphs) is missing; the one that charts the last month's rainfall, day by day. I'm guessing the data isn't easily available on the server to create that one.

Has anybody found a replacement for it that can be created with jpgraphs?
If you use a database rather than rely on the json files then it would be fairly easy to recreate that graph.
User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

Herbaldew wrote: The needed JpGraph files if anyone is interested:

Code: Select all

gd_image.inc.php
imageSmoothArc.php
jpg-config.inc.php
jpgraph.php
jpgraph_date.php
jpgraph_errhandler.inc.php
jpgraph_gradient.php
jpgraph_legend.inc.php
jpgraph_line.php
jpgraph_plotline.php
jpgraph_plotmark.inc.php
jpgraph_rgb.inc.php
jpgraph_scatter.php
jpgraph_text.inc.php
jpgraph_theme.inc.php
jpgraph_ttf.inc.php
jpgraph_windrose.php
fonts\arial.ttf
fonts\DejaVuSans-Bold.ttf
fonts\DejaVuSans-BoldOblique.ttf
fonts\DejaVuSans-Oblique.ttf
fonts\DejaVuSans.ttf
fonts\FF_FONT0-Bold.gdf
fonts\FF_FONT0.gdf
fonts\FF_FONT1-Bold.gdf
fonts\FF_FONT1.gdf
fonts\FF_FONT2-Bold.gdf
fonts\FF_FONT2.gdf
fonts\verdana.ttf
Thanks, the full jpgraph install is *rather* large!
rafdu69
Posts: 2
Joined: Fri 07 Jan 2011 9:27 am
Weather Station: Freetec Px 1117
Operating System: xp sp3

Re: Server Generated Graphs for MX

Post by rafdu69 »

Hello, I am looking to reduce the duration of the graph to display from 48h to 24h. Thanks for your help.
User avatar
PaulMy
Posts: 3760
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Server Generated Graphs for MX

Post by PaulMy »

Hello, I am looking to reduce the duration of the graph to display from 48h to 24h. Thanks for your help.
Have you looked at Settings, Station Settings, Graphs hours?

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Server Generated Graphs for MX

Post by Phil23 »

Hi All,

I've had these installed since early 2017 & all still working fine.

But have recently changed my graph hours up to 168 (7 days), so now obviously see 7 day graphs.

My HighChart graphs are set to 48 hours, but can change this via the zoom.

But is it possible to change something in the Jpgraphs so they only display the last 24 hours when they pop-up?

Thanks

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
mcrossley
Posts: 12641
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

These graphs are for a fixed time duration.
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Server Generated Graphs for MX

Post by Phil23 »

mcrossley wrote: Wed 28 Aug 2019 3:09 pm These graphs are for a fixed time duration.
So in other words they just display the entire content of my JSON files.
No provision for adding a range anywhere.

No prob if that's the case but had to ask.

Cheers.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Simbor
Posts: 33
Joined: Sun 28 Mar 2010 4:24 pm
Weather Station: Davis Vantage Pro2
Operating System: raspy 3B+
Location: Nord Italy
Contact:

Re: Server Generated Graphs for MX

Post by Simbor »

Hi guys
I have read and reread this 3D many times, but I just can't understand what needs to be added to the server, what needs to be created and what needs to be changed.
Is there any kind of amine who can write step by step what to do ?
TNK
Post Reply