Sandaysoft

Support forum for Cumulus weather station software
It is currently Fri May 24, 2013 1:08 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  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Fri Sep 16, 2011 8:53 pm 
Offline

Joined: Wed Jan 12, 2011 9:45 am
Posts: 21
Location: Ruislip
Weather Station: VP2
Operating System: W7
mcrossley wrote:
TgT wrote:
Good script :clap:

What about some flashcolor for changed data? :oops:

I have done that on my 'now' page. You need to store all the values, then on the next refresh compare new with old. If different set a 'newValue' style to change the colour. Then at the end of the update routine overwrite the 'old' values with the new and set a 'setTimout()' to call another function after say 10 seconds the clears the new value styles.

--sent from my phone


Hi Mark,
Brilliant ! That's exactly what I was looking to do. Is this all done via js? or does it need PHP or anything else?

Dave
http://www.weather.btinternet.co.uk/

_________________
http://www.weather.btinternet.co.uk/


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Sat Sep 17, 2011 2:00 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Well my version is all in client-side JavaScript. Pretty straightforward stuff, have a look at the code and copy/adapt it to your needs.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Sun Sep 18, 2011 9:13 pm 
Offline

Joined: Wed Jan 12, 2011 9:45 am
Posts: 21
Location: Ruislip
Weather Station: VP2
Operating System: W7
Hi,

I noticed that daj had done something similar so checked that out and got it working.
See http://www.weather.btinternet.co.uk/tes ... altime.htm
The only problem is that the refresh doesn't work in IE9, not even in comptibility mode. Chrome is fine.
Anyone got any ideas?
Cheers
Dave
http://www.weather.btinternet.co.uk

_________________
http://www.weather.btinternet.co.uk/


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon Sep 19, 2011 10:45 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
It seems to be working now Dave?

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon Sep 19, 2011 7:35 pm 
Offline

Joined: Wed Jan 12, 2011 9:45 am
Posts: 21
Location: Ruislip
Weather Station: VP2
Operating System: W7
Yep. I missed a bracket! Thanks

Dave

_________________
http://www.weather.btinternet.co.uk/


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon Sep 19, 2011 8:04 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 426
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
There is already an AJAX script for updates using Cumulus realtime.txt that you could use. It would just require you to add HTML markup like
Code:
<span class="ajax" id="ajax....."></span>
around the values on the page to be updated.

The ajaxCUwx.js script is part of the PHP/AJAX template set, but works equally well standalone :)

The script was originally developed for Weather-Display, and has been ported to multiple weather software use.

http://saratoga-weather.org/wxtemplates ... jaxCUwx.js

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Wed Sep 21, 2011 11:30 am 
Offline

Joined: Wed Jan 12, 2011 9:45 am
Posts: 21
Location: Ruislip
Weather Station: VP2
Operating System: W7
I had originally assumed that the stuff on there was just for PHP, but there is plenty of good js stuff too. Thanks for the tip off. I have a bit of reading and testing to do :-)

Dave

_________________
http://www.weather.btinternet.co.uk/


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon Jan 09, 2012 2:30 pm 
Offline

Joined: Mon May 23, 2011 6:10 am
Posts: 35
Location: bb2 5jf
Weather Station: vantage pro2
Operating System: windows xp
hi all do you know if this auto refresh works for newer versions of cumulus.

many thanks Darron


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon Jan 09, 2012 8:27 pm 
Offline

Joined: Mon Jan 25, 2010 1:55 pm
Posts: 623
Location: Brighton, UK
Weather Station: Watson W-8681
Operating System: Vista
The code is for your website and is therefore not related to versions of Cumulus.

In short, yes it will work.

_________________
Paul

http://www.greatcollegestreet.co.uk -Online
http://www.lehamel.eu - Online

Image Image


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Fri Jan 13, 2012 9:01 am 
Offline

Joined: Mon May 23, 2011 6:10 am
Posts: 35
Location: bb2 5jf
Weather Station: vantage pro2
Operating System: windows xp
hi was wondering if i just re did the code in index t for since midnight and last 24hrs would it auto refresh them as well are do i need to be doing other things.
regards Darron


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon Apr 16, 2012 7:39 pm 
Offline

Joined: Tue Nov 15, 2011 3:31 am
Posts: 2
Location: Nevada
Weather Station: Davis
Operating System: XP
I was wondering if anyone be able to help me add some code to the realtimereader.js script?
I would like it to check the last time the page was updated (using <span id="time"></span>) and then display some images and then redirect to a new page if the realtime.txt file hasn't been updated in 30-40 seconds.

Let me explain:
When loading the page it will dispaly "Update status = green led image"
If the realtime.txt doesn't get updated after 20 seconds it will dispaly a yellow led,
10 more seconds of no update it will display a red led,
If 10 more seconds go by without an update it will go to a page stating that the site is temporarily down (maintenance page).

This is some script I was able to come up with so far, but I do not know the code needed to check after the first 10 seconds:
Removed from my realtimereader.js file

Code:
if (first_run==false) {

//check if time has changed. If so, display leds
var check1 = time;
if (check1!=$("time").text()) {var imagen = "greenled.png";}
if (check1==$("#time").text()){window.open('/error/maintenance.php','_self');}
$("#check1").html('<img src="/images/'+imagen+'"align =absmiddle>');

}



Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Fri May 11, 2012 11:37 am 
Offline

Joined: Sat Dec 17, 2011 11:55 am
Posts: 139
Location: Wareham, Dorset
Weather Station: Davis Vantage Vue
Operating System: Windows 7 x64
By using the method that the OP has made, would my index page still get processed and uploaded by Cumulus at the 15 minute interval i've set it at?

Regards.


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon May 14, 2012 5:47 pm 
Offline
User avatar

Joined: Tue Apr 21, 2009 4:03 am
Posts: 58
Location: Coromandel, New Zealand
Weather Station: Davis VP2
Operating System: Vista
Hi folks,

I am using the standard templates, and have added this update code including the "updating in xx seconds" to my indexT file, but the website still displays the standard files?

Any clues as to what the problem is would be appreciated. I was previously unable to add a flagcounter for the same reason.

I dont know if it is significant but the dates on the index and indexT files show differently. Should they not be updated at the same time? I thought cumulus processes indexT, then transfers the file to index, which is ftp'd?

Attachment:
Program Manager_2012-05-15_05-30-38.png
]

Attachment:
DCumuluswebindexT.png


Many thanks,
Peter


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

_________________
Peter Pritchard
http://coromandeltownweather.net


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon May 14, 2012 6:05 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17599
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
It looks to me like you're not actually using the templates in that folder, and it's been that way since 26th March, which is the last time Cumulus processed the files there. You'll have to show me what your Cumulus internet settings are.

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


Top
 Profile  
 
 Post subject: Re: Auto-refresh Website Index Page Without Using Meta Refre
PostPosted: Mon May 14, 2012 7:56 pm 
Offline

Joined: Tue Apr 10, 2012 1:18 pm
Posts: 37
Location: Drumclog, South Lanarkshire
Weather Station: Weathereye WEA22
Operating System: Win7
I've applied the op's code and got the data updating every 60 seconds, thanks for that.

Now I'm trying to be clever (for me!). I've set Yawcam to send a .jpg file to my cumulus\web folder every 60 seconds, and added the file to the extra files section in the internet config pages. The file is ftp'd ok. I've added the image to the bottom of my web page, and when I open the page there it is.

But after the realtime files are applied and the data changes, the image does not unless I F5 or reload the page. I've tried umpteen code snippets from googling, but nothing works.

Could someone point me in the right direction, I know next to nothing about web design, although I've been in IT for years.

Andrew

_________________
http://www.drumclog-weather.co.uk/weather


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 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