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
steve
Cumulus Author
Posts: 26702
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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 »

got it working

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

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

dazza :D

https://www.davisworthing.co.uk

Image
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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
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 »

Is your web server running on Apache?
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 »

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

dazza :D

https://www.davisworthing.co.uk

Image
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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Server Generated Graphs for MX

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
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'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: 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 »

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: 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 »

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: 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 »

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: 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 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