Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki 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
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Server Generated Graphs for MX

Post by steve » Mon 26 Jun 2017 1:52 pm

Herbaldew wrote:Can one make the popup graphs work on the CMX interface (running on rPi)?
Not with the Cumulus UI because the built-in MX 'web server' is lightweight and doesn't do PHP. You would need to run a proper web server on the Pi and run the standard web site (or part of it) on that, for viewing locally.
Steve

User avatar
dazza1223
Posts: 414
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 » Fri 29 Dec 2017 1:00 am

got it working

http://www.davisworthing.co.uk/images/graphPress.php

but still know pop ups gauges ?
have fun and keep learning

dazza :D

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

Re: Server Generated Graphs for MX

Post by mcrossley » Fri 29 Dec 2017 1:54 pm

dazza1223 wrote:but still know pop ups gauges ?
You have a space in the image path variable in gauges.js...

Code: Select all

imgPathURL         : './images/ ',

User avatar
dazza1223
Posts: 414
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 » Fri 29 Dec 2017 4:20 pm

ok i did that put still the same


do i need to do somthink to is part of code



// Cumulus
realtimeVer = 12; // minimum version of the realtime JSON file required
config.realTimeURL = config.longPoll ? config.realTimeUrlLongPoll : config.realTimeUrlCumulus;
// the trend images to be used for the pop-up data, used in conjunction with config.imgPathURL
// by default this is configured for the Cumulus 'standard' web site
// ** If you specify one image in a sub-array, then you MUST provide images for all the other sub-elements
config.tipImgs = [ // config.tipImgs for Cumulus users using the 'default' weather site
['temp.png', 'intemp.png'], // Temperature: outdoor, indoor
// Temperature: dewpoint, apparent, windChill, heatIndex, humidex
['temp.png', 'temp.png', 'temp.png', 'temp.png', 'temp.png'],
'raint.png', // Rainfall
'rain.png', // Rainfall rate
['hum.png', 'hum.png'], // Humidity: outdoor, indoor
'graphPress.png', // Pressure
'wind.png', // Wind speed
'windd.png', // Wind direction
(config.showUvGauge ? 'uv.png' : null), // UV graph if UV sensor is present | =null if no UV sensor
(config.showSolarGauge ? 'solar.png' : null), // Solar rad graph if Solar sensor is present | Solar =null if no Solar sensor
(config.showRoseGauge ? 'windd.png' : null), // Wind direction if Rose is enabled | =null if Rose is disabled
(config.showCloudGauge ? 'press.png' : null) // Pressure for cloud height | =null if Cloud Height is disabled
have fun and keep learning

dazza :D

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

Re: Server Generated Graphs for MX

Post by mcrossley » Fri 29 Dec 2017 7:48 pm

It doesn't look like you have loaded the .htaccess file on your web server?
You can only access the files via their full filenames eg "graphPress.php", whereas the gauges script is looking the aliases eg "press.png"

User avatar
dazza1223
Posts: 414
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 » Fri 29 Dec 2017 8:13 pm

I've put it in the images folder as I saw that where ppl been saying to put it or am I doing some thing rong or missing somthink
have fun and keep learning

dazza :D

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

Re: Server Generated Graphs for MX

Post by mcrossley » Fri 29 Dec 2017 8:35 pm

Is your web server running on Apache?

User avatar
dazza1223
Posts: 414
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 » Fri 29 Dec 2017 8:48 pm

Yh it is mate on rasberry pi
have fun and keep learning

dazza :D

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

Re: Server Generated Graphs for MX

Post by mcrossley » Fri 29 Dec 2017 9:49 pm

Take a look at this...
https://httpd.apache.org/docs/current/h ... ccess.html
You could move the contents of the file into your main Apache config file as that article indicates that is more efficient anyway.

User avatar
dazza1223
Posts: 414
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 » Fri 29 Dec 2017 9:55 pm

Ok I was thinking off do I g that but as it a raspberry pi and it nice having it all a ssd drive so there way ur saying I need to edit the config file to Pont it to the file
have fun and keep learning

dazza :D

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

Re: Server Generated Graphs for MX

Post by Herbaldew » Sat 24 Mar 2018 6:54 pm

I've been playing with this for an embarassing amount of time without success.

My problem is identical to what is outlined in THIS thread.

That turn out to be a problem caused by his ISP provided free server.

I am using an rPi with Apache/PHP installed using:

Code: Select all

sudo apt-get install apache2 php7.0 php7.0-gd 
It passes PHP and jpgraph testing, but no graph is showing up in the pop up.

Here is a pic from the above referenced thread that shows what I get:

Image

So, I am wondering .... might there be something in the php.ini that I need to do?

My second guess is that I didn't follow the wiki on changing from html to php - I just changed the Cumulus.ini file to upload the processed "T" files with a php extension. I am not permitted by my ISP to run a server so this is in house only and I can't provide any urls.


Thanks

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

Re: Server Generated Graphs for MX

Post by mcrossley » Sun 25 Mar 2018 6:51 pm

OK, what happens if you load the php directly into browser... e.g.

http:// hostname/images/graphTempOut.php

Which assumes you the graphs loaded in the image folder.

If that works, what about...?

http:// hostname/images/temp.png

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

Re: Server Generated Graphs for MX

Post by Herbaldew » Sun 25 Mar 2018 7:37 pm

No images are being created.

If I try to load any of th scripts eg "http:// hostname/images/graphTempOut.php", I get a 500 error.

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

Re: Server Generated Graphs for MX

Post by mcrossley » Mon 26 Mar 2018 8:48 am

OK, so we need to see the web server error log to see what the problem is.
You could try adding the following line to the top of the graphTemp.php script...

Code: Select all

error_reporting(E_ALL);
Then see what you get in the browser.

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

Re: Server Generated Graphs for MX

Post by Herbaldew » Mon 26 Mar 2018 3:00 pm

I don't have a "graphTemp.php" so I added the error reporting line to the top of "graphTempOut.php" (above the php code).

When I open the file in my browser all I see is the error reporting line I added. The following two lines were added to the php error log:

Code: Select all

[Mon Mar 26 10:32:18.726751 2018] [:error] [pid 508] [client 192.168.10.2:49796] PHP Warning:  require_once(jpgraph_glayout_vh.inc.php): failed to open stream: No such file or directory in /var/www/html/jpgraph/jpgraph_windrose.php on line 12
 
[Mon Mar 26 10:32:18.726912 2018] [:error] [pid 508] [client 192.168.10.2:49796] PHP Fatal error:  require_once(): Failed opening required 'jpgraph_glayout_vh.inc.php' (include_path='.:/usr/share/php') in /var/www/html/jpgraph/jpgraph_windrose.php on line 12
"jpgraph_glayout_vh.inc.php" is NOT included in the version I jpgraph I have (v 4.2.0).

I also have noticed "include/includes" several times and should have added that as a third item to my list in my OP of what I thought may be my problem.

Post Reply