Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed May 22, 2013 4:52 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Wed Oct 06, 2010 5:25 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
I was looking for better history graphics (the graphics of wunderground self are terrible I think) and found a freeware package.

I use cumulus and send the data also too wunderground so if you want to take advantage of it you need a wundergound ID and send yor data from cumulus there.

The graphics generated can be exposed by the package that you can download here http://pocasi.hovnet.cz/wxwug.php?lang=en#construction , I just set it up on my server and it works fine (your sever musthave php5, mysql isn't needed)

An example is availble over here (it's raw don't use the close page button :D ) http://www.apeldoorn.tk/weer/wugraphs.php I've to work it out in a template

credits are from Radomir Luza, I hope this can be usefull for some cumulus users, I hadn't see it before .

_________________
Ron

Image

Apeldoorn, The Netherlands


Last edited by nitrx on Wed Oct 06, 2010 7:23 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Wed Oct 06, 2010 5:29 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
Nice!

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Wed Oct 06, 2010 8:17 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
Great find.

I have thrown together a proof of concept of it reading the data produced from the dayfile.txt by Cumulus

http://www.grantownweather.co.uk/graphtest/temperature.html

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Wed Oct 06, 2010 8:43 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Looks good it shoold be nice to use the stored data from the dayfiles do you have the source ?

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Wed Oct 06, 2010 9:33 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
Ron,

At the moment I have it reading the dayfile.txt data from an SQL table (which is where I store all my data on the webserver)

Is that ok, or do you need it reading the text file directly?

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Wed Oct 06, 2010 9:37 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
I prefer mysql :D it can wait I go to sleep thanks David

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 11:14 am 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
Attached is my 'proof of concept' code. This uses the Highcharts graphing tools discussed in this thread.

My code will read the dayfile.txt data which has previouslly been imported into a MySQL table on your webserver. I use the SQL structure as generated by the ImportCumulusFile tool, but any SQL table structure will do as long as you update the code accordingly.

Attached is the complete code and libraries.

You need to edit dbconfig.php to store your username, password, and table name for MySQL. Once done you should be able to browse to 'temperature.html' and get a graph similiar to mine (showing the last 60 days worth of your Temperature highs and lows)

How it works.

  • temperature.html is a basic HTML page -- it loads the necessary libraries and also js/graph.js which is my code to build the actual graph.
  • graph.js processes graphdata.php and uses this to build a chart and place it in a div called 'container' in the HTML page
  • graphdata.php reads the MySQL table and produces a CSV file for the charting tool to build a data series.

Any questions, I will try my best to help. As I say, its very basic but it does show that HighCharts can be used with the Cumulus data


You do not have the required permissions to view the files attached to this post.

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 11:44 am 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Thank you David i'll give it a try this evening

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 6:12 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Hi David I tried but I dont get output, my logdates are stored as YYYY-MM-DD has this affect of the query ?

"SELECT date_format(LogDate,'%d %b %Y') as UKLogDate,MinTemp,MaxTemp FROM Dayfile ORDER BY LogDate DESC limit 60"; << Wondering why it's %b and not %m

Ron

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 6:41 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
%b gives the abbreviated Month name, so Oct for example

I just like to manipulate my date slightly. Let's keep it simple for you for now, and change your SQL statement....

Code:
SELECT LogDate,MinTemp,MaxTemp FROM Dayfile ORDER BY LogDate DESC limit 60";


You also need to modify the XAxis set a few lines down, as we are no longer using UKLogDate
Code:
$XAxis .= $row[LogDate] . ",";


To prove it is getting the data, just open up graphdata.php in a browser window and it should return all the data in a raw format. example.... http://www.grantownweather.co.uk/graphtest/graphdata.php

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 7:58 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Hmmmz I think there is another issue I've changed as you suggested (before changen I got this error and after chanching

http://www.apeldoorn.tk/weer/graph/graphdata.php , never seen this before just googled on it but found no solutions, I use localhost this work allways fine with other databases

IGNORE this post I've uploaded a wrong file :) be back soon

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 8:17 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
I can see progress, but you need to update the graph.js file as you have not put it in the same location as I did

Code:
$.get('/graphtest/graphdata.php', function(data) {


will need to be something like

Code:
$.get('/weer/graph/graphdata.php', function(data) {


or use a relative path

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Thu Oct 07, 2010 8:28 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Great that did the job I made a great mistake for thr dbconfig, but I shouldn't have found the path in the .js file well it's workig fine (I think it will also wordk with the UK-date version, I shall do some investigations to the syntax it's a lot acracadrabra for me , Thanks a lot !
http://www.apeldoorn.tk/weer/graph/temperature.html

Anyway I see it's not correct the data are from now to hystory :lol: Your data too, so I think I must use ascendeng ...

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Sun Oct 10, 2010 9:22 am 
Offline

Joined: Thu Jul 08, 2010 6:35 am
Posts: 13
Weather Station: Alecto WS 4000 /TFA NExus
Operating System: Win XP SP2
nitrx wrote:
I was looking for better history graphics (the graphics of wunderground self are terrible I think) and found a freeware package.

I use cumulus and send the data also too wunderground so if you want to take advantage of it you need a wundergound ID and send yor data from cumulus there.

The graphics generated can be exposed by the package that you can download here http://pocasi.hovnet.cz/wxwug.php?lang=en#construction , I just set it up on my server and it works fine (your sever musthave php5, mysql isn't needed)

An example is availble over here (it's raw don't use the close page button :D ) http://www.apeldoorn.tk/weer/wugraphs.php I've to work it out in a template

credits are from Radomir Luza, I hope this can be usefull for some cumulus users, I hadn't see it before .


Hi, i came across your mentioned piece of software and it looks ok, so i did download it from the authers site [v0.7.9b]

After installing it on my website, it generates no graphs...

So i did test it on a virtual server, but it looks like the code is generating several errors. So are 2 files missing [settngs.php and commen.php] Further more the code generates errorcodes like missing variables ....


Apparently your version is working fine, so is it possible that you mail me a copy of your working version....??


regards


Top
 Profile  
 
 Post subject: Re: Smooth graphic on your site if you use upload to wundergroun
PostPosted: Sun Oct 10, 2010 10:46 am 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
There is no file like settings.php look for WUG-settings.php and the file commen.php ? isn't in the package by me neither, you shoul have the same zip file as me.

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group