Page 14 of 18

Re: Server Generated Graphs for MX

Posted: Mon 26 Mar 2018 5:16 pm
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 ;)

Re: Server Generated Graphs for MX

Posted: Mon 26 Mar 2018 5:18 pm
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!

Re: Server Generated Graphs for MX

Posted: Mon 26 Mar 2018 5:20 pm
by mcrossley
Next look at your .htaccess file - that's what generates the PNGs

Re: Server Generated Graphs for MX

Posted: Mon 26 Mar 2018 5:23 pm
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.

Re: Server Generated Graphs for MX

Posted: Mon 26 Mar 2018 9:39 pm
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!

Re: Server Generated Graphs for MX

Posted: Sun 01 Apr 2018 9:43 pm
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

Re: Server Generated Graphs for MX

Posted: Fri 29 Jun 2018 9:21 am
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?

Re: Server Generated Graphs for MX

Posted: Fri 29 Jun 2018 9:48 am
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.

Re: Server Generated Graphs for MX

Posted: Fri 29 Jun 2018 9:48 am
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!

Re: Server Generated Graphs for MX

Posted: Wed 19 Jun 2019 6:35 pm
by rafdu69
Hello, I am looking to reduce the duration of the graph to display from 48h to 24h. Thanks for your help.

Re: Server Generated Graphs for MX

Posted: Wed 19 Jun 2019 9:40 pm
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

Re: Server Generated Graphs for MX

Posted: Tue 27 Aug 2019 11:43 pm
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.

Re: Server Generated Graphs for MX

Posted: Wed 28 Aug 2019 3:09 pm
by mcrossley
These graphs are for a fixed time duration.

Re: Server Generated Graphs for MX

Posted: Thu 29 Aug 2019 12:26 am
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.

Re: Server Generated Graphs for MX

Posted: Sat 07 Sep 2019 9:55 pm
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