Sandaysoft

Support forum for Cumulus weather station software
It is currently Tue May 21, 2013 10:16 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  [ 45 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 4:16 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
if someone wants to test it
you can have 5 second updates when you enable realtime in cumulus an set the interval to 5 seconds
upload the AjaxCumulus.js file to your webserver
BACKUP YOUR EXISTING indexT.htm FROM THE CUMULUS WEB-folder
if you don't like it, you can use your backup
overwrite the file with the file in the package an wait until the next upload

Here is the zip-file

YOU NEED CUMULUS 1.8.3 #480 or higher

click on my banner to see it working

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 6:00 pm 
Offline
User avatar

Joined: Thu Jun 19, 2008 7:45 am
Posts: 281
Location: Brampton, Cumbria, UK
Weather Station: Davis VP2 with solar
Operating System: Windows XP SP3
Jozef

That looks interesting having seen your web pages self updating - but can you tell me a little more about it. I havent heard of Ajax before ( apart from the football team ) :D eg how easy is it to setup etc

Also - the css file on the IndexT - I have altered the colours slightly, will this file change it back again to the orginal colours ?

sorry for the questions
tks

_________________
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk | http://www.bramptonweather.co.uk/cumulus |
Image


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 6:15 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
fact is, it is only some javascript that is calling the realtime.txt on the server every 5 seconds
and only updates the values without refreshing the page itself

This indexT.htm file is the original file, modified are only the tags used in the page

~~> I have not seen css in this file, thought it was in weatherstyle.css
this file uses the weatherstyle.css file you have on your server

BACKUP BACKUP BACKUP !!!!

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 7:11 pm 
Offline
User avatar

Joined: Thu Jun 19, 2008 7:45 am
Posts: 281
Location: Brampton, Cumbria, UK
Weather Station: Davis VP2 with solar
Operating System: Windows XP SP3
How do you change the upload interval to 5 seconds - to me it looks as if the interval time is in minutes and 1 minute being the lowest.

I have uploaded the file but cant see it changing as in your example.

http://www.bramptonweather.co.uk/cumulus/index.htm

_________________
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk | http://www.bramptonweather.co.uk/cumulus |
Image


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 7:16 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
You are missing the required javascript...

<script type="text/javascript" src="AjaxCumulus.js"></script>

He has it...
Code:
<title>Kampenhout, Belgium weather</title>

<link href="weatherstyle.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="AjaxCumulus.js"></script>
</head>


You don't
Code:
<title>Brampton weather</title>

<link href="weatherstyle.css" rel="stylesheet" type="text/css">
</head>

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 7:26 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
<script type="text/javascript" src="AjaxCumulus.js"></script>


is correct


I left

<script type="text/javascript" src="AjaxCumulusTest.js"></script>


in indexT.htm

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 7:47 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
Here is the zip-file

YOU NEED CUMULUS 1.8.3 #480 or higher

best way to handle it is to download the package again

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 7:51 pm 
Offline
User avatar

Joined: Thu Jun 19, 2008 7:45 am
Posts: 281
Location: Brampton, Cumbria, UK
Weather Station: Davis VP2 with solar
Operating System: Windows XP SP3
pinto wrote:
<script type="text/javascript" src="AjaxCumulus.js"></script>


is correct


I left

<script type="text/javascript" src="AjaxCumulusTest.js"></script>


in indexT.htm


I have uploaded both the indexT file and the js file to my cumulus folder. Do I have to add the above into something ?

_________________
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk | http://www.bramptonweather.co.uk/cumulus |
Image


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 7:57 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
There was something wrong in one of the files.

The best way to handle this is to download the package again(it's updated)

put the indexT.htm in C:/Program Files/Cumulus/web/

but first backup the indexT.htm that exist in that folder

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 8:21 pm 
Offline
User avatar

Joined: Thu Jun 19, 2008 7:45 am
Posts: 281
Location: Brampton, Cumbria, UK
Weather Station: Davis VP2 with solar
Operating System: Windows XP SP3
OK, placfed the indexT file into the Cumulus Folder and it works. :D

Just need to make Cumulus update very 5 seconds. How do you do that ? It looks like just 1min intervals to me.
TKS

_________________
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk | http://www.bramptonweather.co.uk/cumulus |
Image


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 9:02 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
Cumulus ~> Configuration ~> Internet ~> Sites/Options ~> Realtime Interval
put 5 in there

only thing you should remember is when you upgrade Cumulus you have to put this indexT.htm in the cumulus/web/ folder

and now you can also set the regular updates to 10 minutes or so (you don't have to)

sorry for the late answer, had to bring the inLaws home

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 9:27 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
Hi Paul,

I see you site is in blue

you can change the flashing color if you want
click right on AjaxCumulus.js and open it with wordpad or notepad
find
Code:
var flashcolor = '#FF0000'; // color to flash for changed observations

and you can change it to
Code:
var flashcolor = '#0000FF'; // color to flash for changed observations

save the file, see it has no other extention added by the system, and upload to your webserver

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Sun Oct 26, 2008 10:20 pm 
Offline

Joined: Thu Sep 18, 2008 8:40 pm
Posts: 61
Location: Tokoroa South Waikato New Zealand
Weather Station: Davis VP pro 2
Operating System: Win7
Got to have a play with this, see if I can intergrate to my pages.

_________________
http://tokoroa.dyndns.org/ Main Site

IT Fixer


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Mon Oct 27, 2008 1:43 pm 
Offline
User avatar

Joined: Thu Jun 19, 2008 7:45 am
Posts: 281
Location: Brampton, Cumbria, UK
Weather Station: Davis VP2 with solar
Operating System: Windows XP SP3
pinto wrote:
Hi Paul,

I see you site is in blue

you can change the flashing color if you want
click right on AjaxCumulus.js and open it with wordpad or notepad
find
Code:
var flashcolor = '#FF0000'; // color to flash for changed observations

and you can change it to
Code:
var flashcolor = '#0000FF'; // color to flash for changed observations

save the file, see it has no other extention added by the system, and upload to your webserver


Looks like its working now with 5 secons interval. I will keep the colour as it is as it highlights the change better. From one update to the other

_________________
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk | http://www.bramptonweather.co.uk/cumulus |
Image


Top
 Profile  
 
 Post subject: Re: Ajaxed index-page
PostPosted: Mon Oct 27, 2008 7:19 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
arthurhh wrote:
Got to have a play with this, see if I can intergrate to my pages.


some tips if you want to integrate this to your existing pages
Code:
1.add in the <head> section of your page

<script type="text/javascript" src="AjaxCumulusTest.js"></script>

2.change <body> tag to

<body onload="ajaxLoader('realtime.txt?'+new Date())">

3.use

<span name="ajax" id="ajaxtemp"><#temp>&nbsp;<#tempunit></span>

to show temperature were <#temp> is your existing tag to show the temperature

you need to have this for people who disabled javascript in the browser

4.available tags for ajax (to replace the ajaxtemp in the example above

ajaxintervaltext ~~> text to replace "<#interval> minutes" from the template
you can change this in the AjawCumulus.js file


ajaxtime ~~> (Updated: 16:51:04 on 27/10/08)
ajaxtemp ~~> outside temperature with temperature unit
ajaxtemptrend ~~> temperature trend with temperature unit
ajaxchill ~~> windchill with temperature unit
ajaxhum ~~> outside humidity with %
ajaxheatindex ~~> heat index with temperature unit
ajaxdewpt ~~> dew point with temperature unit
ajaxrfall ~~> rainfall so far today with rainunit
ajaxrrate ~~> rainrate with rainunit/hr
ajaxrmonth ~~> rainfall so far this month with rainunit
ajaxryear ~~> rainfall so far this year
ajaxwlatest ~~> latest reading of windspeed with windunit
ajaxwspeed ~~> avg windspeed with windunit
ajaxavgbearing ~~> avgbearing and deg-symbol followed by wdir
ajaxbeaufort ~~> F with beaufortnumber
ajaxbeaudesc ~~> beaufortdescription
ajaxwindrun ~~> windrun with windrununit
ajaxpress ~~> sealevel press with unit
ajaxpresstrend ~~> in words
ajaxpresstrendval ~~> like it says


I hope you find this usefull, and I also hope I did not make any mistakes here




upgraded the package according to this message (wind latest or wind gust)

link in first post

_________________
Jozef


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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:  

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