Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Server Generated Graphs for MX

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.
User avatar
mcrossley
Posts: 5147
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Postby mcrossley » Mon Mar 26, 2018 5:16 pm

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: 74
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Postby Herbaldew » Mon Mar 26, 2018 5:18 pm

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: 5147
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Postby mcrossley » Mon Mar 26, 2018 5:20 pm

Next look at your .htaccess file - that's what generates the PNGs

Herbaldew
Posts: 74
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Postby Herbaldew » Mon Mar 26, 2018 5:23 pm

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: 74
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Postby Herbaldew » Mon Mar 26, 2018 9:39 pm

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: 74
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Server Generated Graphs for MX

Postby Herbaldew » Sun Apr 01, 2018 9:43 pm

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


Return to “Cumulus MX”

Who is online

Users browsing this forum: No registered users and 5 guests