hello , you have developed something about it ?mcrossley wrote:Sounds like it should be, once you have the data in MySQL you can extract pretty much whatever you want.master1986 wrote:hello , I would be interested to save data to MySQL and read .
However, the aim should be to generate a graph of a precise period , then selecting the start and end of the period .
It's possible?
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.2.1 (build 4043) - 19 October 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V4 release 4.2.1 (build 4043) - 19 October 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
Moderator: mcrossley
-
- Posts: 15
- Joined: Fri 08 Jul 2016 6:14 am
- Weather Station: Lacrosse 2350
- Operating System: Windows 8.1
- Location: Italia
Re: Server Generated Graphs for MX
-
- Posts: 1256
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Server Generated Graphs for MX
Thanks reply posted.
- mcrossley
- Posts: 13622
- 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
You need to define exactly what it is you want. Server based graphs or client side generated graphs (you will find a thread or two about Highcharts graphs on the forum) like these or these. What time periods you want, selectable or fixed periods etc.master1986 wrote: hello , you have developed something about it ?
- BeaumarisWX
- Posts: 394
- Joined: Mon 09 Apr 2012 2:38 pm
- Weather Station: Davis VP2 Plus - 24hr FARS
- Operating System: Windows 10 Pro Hades Canyon
- Location: Beaumaris, Tasmania, AU
- Contact:
Re: Server Generated Graphs for MX
Hi Mark,
Thanks for looking at this, due to work and her in doors breaking a rib (badly) been snowed under (maybe snowed under literally in next 48hrs big cold front on way.
I will look at it later in week hopefully. Still running original (it's got regular wind data again so working) though I know not correctly.
Brian, I noticed you added it as I did to the Gauges Tooltip. This requires mods to "wx-gauges-ss.css" and "gauges-ss-wx.js"
For "wx-gauges-ss.css" add new size; Change;
From;
To: Include size for the WindRose; "tipimgx" 400x400 or whatever you want;
Then for gauges-ss-wx.js (need to modify createtip section to as per below);
From:
To:
The above principle is also what I use to display the GFS Map Tooltip for my Ozone Gauge.
Brian, I will email you later this week, as I have some other fixes for other non related pages for you as well - just not had time.
regards,
Thanks for looking at this, due to work and her in doors breaking a rib (badly) been snowed under (maybe snowed under literally in next 48hrs big cold front on way.
I will look at it later in week hopefully. Still running original (it's got regular wind data again so working) though I know not correctly.
Brian, I noticed you added it as I did to the Gauges Tooltip. This requires mods to "wx-gauges-ss.css" and "gauges-ss-wx.js"
For "wx-gauges-ss.css" add new size; Change;
From;
Code: Select all
.ddimgtooltip{
z-index: 2000;
box-shadow: 3px 3px 5px #818181; /*shadow for CSS3 capable browsers.*/
border-radius: 10px;
display: none;
position: absolute;
border: 1px solid black;
background: white;
color: black;
padding: 0 7px 3px 7px;
font-family: sans-serif;
font-size: 10px;
}
.tipinfo{
text-align: left;
padding: 3px 0 3px 2px;
}
.tipimg{
/*
width: 438px;
height: 175px;
*/
width: 430px;
height: 215px;
}
Code: Select all
.ddimgtooltip{
z-index: 2000;
box-shadow: 3px 3px 5px #818181; /*shadow for CSS3 capable browsers.*/
border-radius: 10px;
display: none;
position: absolute;
border: 1px solid black;
background: white;
color: black;
padding: 0 7px 3px 7px;
font-family: sans-serif;
font-size: 10px;
}
.tipinfo{
text-align: left;
padding: 3px 0 3px 2px;
}
.tipimg{
/*
width: 438px;
height: 175px;
*/
width: 430px;
height: 215px;
}
.tipimgx{
width: 400px;
height: 400px;
}
From:
Code: Select all
createtip : function ($, tipid, tipinfo) {
if ($('#' + tipid).length === 0) { //if this tooltip doesn't exist yet
return $('<div id="' + tipid + '" class="ddimgtooltip" />')
.html(
((tipinfo[1]) ? '<div class="tipinfo" id="' + tipid + '_txt">' + tipinfo[1] + '</div>' : '') +
(tipinfo[0] !== null ? '<div style="text-align:center"><img class="tipimg" id="' + tipid + '_img" src="' + tipinfo[0] + '" /></div>' : '')
)
.css(tipinfo[2] || {})
.appendTo(document.body);
}
return null;
},
Code: Select all
createtip : function ($, tipid, tipinfo) {
if ($('#' + tipid).length === 0) { //if this tooltip doesn't exist yet
var sfx = '';
if (tipid === 'imgtip10') { sfx = 'x';}
return $('<div id="' + tipid + '" class="ddimgtooltip" />')
.html(
((tipinfo[1]) ? '<div class="tipinfo" id="' + tipid + '_txt">' + tipinfo[1] + '</div>' : '') +
(tipinfo[0] !== null ? '<div style="text-align:center"><img class="tipimg' + sfx + '" id="' + tipid + '_img" src="' + tipinfo[0] + '" /></div>' : '')
)
.css(tipinfo[2] || {})
.appendTo(document.body);
}
return null;
},
Brian, I will email you later this week, as I have some other fixes for other non related pages for you as well - just not had time.
regards,
Tony Beaumaris, Tasmania (AUS)
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
-
- Posts: 1256
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Server Generated Graphs for MX
Mark, Tony,
Thanks for the updates - all good now.
Thanks for the updates - all good now.
-
- Posts: 227
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Server Generated Graphs for MX
Need a bit of help I just downloaded the sql scripts from github, and getting this error
"ERROR - TZ Statement"
looking through graphSetting php i see
before i go messing around much more would this be in the setting of mysql? or something else
My database is all done by cumulusMX 3041
Thanks
"ERROR - TZ Statement"
looking through graphSetting php i see
Code: Select all
$result = $mysqli->query("SET time_zone='UTC'");
if (!$result) {
die("ERROR - TZ Statement");
My database is all done by cumulusMX 3041
Thanks
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
- mcrossley
- Posts: 13622
- 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
It is probably because the time zone system tables have not been populated on your server. This is only done by default on Windows servers.jlmr731 wrote:Need a bit of help I just downloaded the sql scripts from github, and getting this error
"ERROR - TZ Statement"
looking through graphSetting php i seebefore i go messing around much more would this be in the setting of mysql? or something elseCode: Select all
$result = $mysqli->query("SET time_zone='UTC'"); if (!$result) { die("ERROR - TZ Statement");
My database is all done by cumulusMX 3041
Thanks
http://dev.mysql.com/doc/refman/5.7/en/ ... o-sql.html
If you have problems getting your web server support people to do this, then you may try using
Code: Select all
$result = $mysqli->query("SET time_zone='+00:00'");
-
- Posts: 227
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Server Generated Graphs for MX
Thanks for the help and the links and yes mysql is on my linux box and never ran into that issue before so running
fixed it all up.
Now another problem easily solved was the select from realtime, I used the scripts from cumulusMX to create the database table and it names it Realtime
so if others run into that problem just change that line in graphSetting.php
Now if i run any of the scripts directly in the browser (like localhost/graph/SQL/graphRain.php) all error's are gone but all i see is a very tiny box with nothing inside well maybe cause its so small, i did try changing
$Graph['width'] and $Graph['height'] but did not change the size, i also edited the jpgraph file as in the README.md file
I would guess i should have an output running this way and yes running the scripts from the json dir work great
Code: Select all
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Now another problem easily solved was the select from realtime, I used the scripts from cumulusMX to create the database table and it names it Realtime
so if others run into that problem just change that line in graphSetting.php
Code: Select all
$query = "SELECT unix_timestamp(LogDateTime) AS time, $cols
FROM Realtime /--------Changed to cap R
WHERE LogDateTime >= now() - INTERVAL " .$GRAPH['hours']. " HOUR
ORDER BY time";
$Graph['width'] and $Graph['height'] but did not change the size, i also edited the jpgraph file as in the README.md file
I would guess i should have an output running this way and yes running the scripts from the json dir work great
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
- mcrossley
- Posts: 13622
- 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
Have you tried running the query directly in myPHPAdmin (or the SQL command line)?
Have you also tried to generate the jpgraph demo graphs to test your jpgraph install?
Also check your web server error log for a clue.
Code: Select all
SELECT unix_timestamp(LogDateTime) AS time, temp
FROM Realtime
WHERE LogDateTime >= now() - INTERVAL 1 HOUR
ORDER BY time
Also check your web server error log for a clue.
-
- Posts: 227
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Server Generated Graphs for MX
Thanks for your time on this. now i am a bit confused First im not a programmer but i can read code and some what understand it as long as its not long and complex. so here we go. Yes i get the sql query to work and jpgraph examples, well most work and i see file missing errors on some of them but it is not what your graph require. Now i still get a very small outline of a box in chrome about the size of heading letter. Also I have no errors in my apache logs
then i tried firefox and there it shows me something and here is the html source of it first from fire fox and second from chrome
SO what i see is that for some reason its not naming correctly
SO i ran php comand on it "php graphfile.php" and wow i had out put that looked like image stuff as output, so i did a cat to a file and it opens with the image
So we see it does work (sort of) all i see in the script that may be responsible for it is this
Now of course i have no idea whats going on within jpgraph or if there is something missing from the script.
Thanks Mark
then i tried firefox and there it shows me something and here is the html source of it first from fire fox and second from chrome
Code: Select all
<img alt="The image ?http://localhost/graph/SQL/graphTempOut.php? cannot be displayed because it contains errors." src="http://localhost/graph/SQL/graphTempOut.php">
<img style="-webkit-user-select: none" src="http://localhost/graph/SQL/graphTempOut.php">
SO i ran php comand on it "php graphfile.php" and wow i had out put that looked like image stuff as output, so i did a cat to a file and it opens with the image
So we see it does work (sort of) all i see in the script that may be responsible for it is this
Code: Select all
$name = basename($_SERVER['PHP_SELF'], '.php').'.png';
// Create the graph and set a scale.
$graph = new Graph($GRAPH['width'], $GRAPH['height'], $name, $GRAPH['cachetime']);
$graph->SetScale('datlin');
Thanks Mark
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
-
- Posts: 227
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Server Generated Graphs for MX
Thanks for taking time on this here is the link
jlmr731.duckdns.org/graph/SQL
jlmr731.duckdns.org/graph/SQL
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
- mcrossley
- Posts: 13622
- 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
OK, the script is generating a image correctly, but the output has two line feeds 0xA characters before the image.
As it is happening with all the images I suspect the graphSettings.php file has these extra characters in it somewhere. I can't see the source so you'll have to check it yourself - or post the file here so I can take a look.
As it is happening with all the images I suspect the graphSettings.php file has these extra characters in it somewhere. I can't see the source so you'll have to check it yourself - or post the file here so I can take a look.
-
- Posts: 227
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Server Generated Graphs for MX
Here is my graphSettings
Now that you said about the extra line when i used comand line for output i had to remove first 2 lines to get image to work. sorry that slipped my mind
Now that you said about the extra line when i used comand line for output i had to remove first 2 lines to get image to work. sorry that slipped my mind
You do not have the required permissions to view the files attached to this post.
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
- mcrossley
- Posts: 13622
- 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
Yep, you have two extra line feeds in that file after the closing ?>
Delete those and you should be OK.
Delete those and you should be OK.