Sandaysoft

Support forum for Cumulus weather station software
It is currently Sat May 25, 2013 5:39 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  [ 69 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Build 1033 comments
PostPosted: Tue Apr 10, 2012 11:19 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 351
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
Steve, again thank you for your work on this latest update to Cumulus. It must have kept you busy for a while!

Much appreciate the results though....

Here is my modified page: http://woodlandweather.org/monthlyrecord.htm

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 6:58 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17614
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
RayProudfoot wrote:
But when I open the page and press a month button it continues to show the time and date in your original format and not my customised one. Why would it not show my own format?

All you've done so far is change the format for the value that is shown when you first go to the page. If you look near the top of the file you'll see the declaration of a set of Javascript variables, e.g.

var hightempT = new Array("<#ByMonthTempHT mon=1>","<#ByMonthTempHT mon=2>","<#ByMonthTempHT mon=3>","<#ByMonthTempHT mon=4>", ...

Those are the values that the Javascript code uses when you click on a button. You have to change all of those. Somewhat tedious, I realise, and I suppose a single setting in Cumulus to override the format parameter would make it rather easier. But you only have to do it once, and a clever text editor makes it much easier.

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


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 11:52 am 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
steve wrote:
All you've done so far is change the format for the value that is shown when you first go to the page. If you look near the top of the file you'll see the declaration of a set of Javascript variables, e.g.

var hightempT = new Array("<#ByMonthTempHT mon=1>","<#ByMonthTempHT mon=2>","<#ByMonthTempHT mon=3>","<#ByMonthTempHT mon=4>", ...

Those are the values that the Javascript code uses when you click on a button. You have to change all of those. Somewhat tedious, I realise, and I suppose a single setting in Cumulus to override the format parameter would make it rather easier. But you only have to do it once, and a clever text editor makes it much easier.


Thanks Steve. A little tedious as you say but it only has to be done once. Well worth the effort for the extra dimension it gives to users' records.

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 1:52 pm 
Offline
User avatar

Joined: Thu Dec 17, 2009 2:03 pm
Posts: 787
Location: Hurstpierpoint, West Sussex, UK
Weather Station: WH1081
Operating System: Windows XP & 7 Pro
bnwrx wrote:
Steve, again thank you for your work on this latest update to Cumulus. It must have kept you busy for a while!

Much appreciate the results though....

Here is my modified page: http://woodlandweather.org/monthlyrecord.htm


I second this. A great deal of effort has gone into providing this enhancement, a great job :clap:

Here is the link to my page for anyone interested http://www.pc-king.co.uk/weather/monthlyrecord.htm

_________________
Neil
Hurstpierpoint Weather

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:14 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1852
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Is there a "Highest monthly windrun" (like the rain) ?

Also you have daily 'range' (low / high) for temp, is there similar for pressure ?

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:49 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
beteljuice wrote:
Is there a "Highest monthly windrun" (like the rain) ?

Also you have daily 'range' (low / high) for temp, is there similar for pressure ?


Yes webtags in the helpfile like edited <#ByMonthWindRunH> <#ByMonthWindRunHT> also for daily tempranges, not for pressure ranges

_________________
Ron

Image

Apeldoorn, The Netherlands


Last edited by nitrx on Wed Apr 11, 2012 3:06 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:57 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17614
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
beteljuice wrote:
Is there a "Highest monthly windrun" (like the rain) ?

Also you have daily 'range' (low / high) for temp, is there similar for pressure ?

No - I haven't introduced any new statistics, just added month-by-month versions of the existing ones; neither of those two currently exist.

But clearly, adding new useful statistics is always on the to-do list. Another one that occurred to me recently (and has been mentioned by others) is "driest month".

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


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:58 pm 
Offline
User avatar

Joined: Tue Feb 21, 2012 5:48 pm
Posts: 46
Location: Warwick
Weather Station: Davis Vantage Vue
Operating System: Windows 7
Great enhancement - Cheers Johnny :D

_________________
Image
http://warwick-weather.com


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 7:54 pm 
Offline

Joined: Mon Nov 28, 2011 2:13 am
Posts: 349
Location: Brisbane, Australia
Weather Station: La Crosse WS 2306
Operating System: Windows 7 64 Bit
Good effort on this Steve, very good feature. :D
I wish I have been using Cumulus for longer, but this is something I been wanting to do with my manual data from the last 3 years, once I catch up on all my old manual recordings.

_________________
Regards, Matt of Brisbane, Australia
Web Site: http://www.localweatherdata.0glo.com


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 4:30 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Hi Steve,

Before I go ahead and make all those format changes I wanted to check something with you.

The image below is how I would like to display the Monthly Records. I want to split the date into multiple parts and place them in different cells. Will this be possible with the data in an array?
Attachment:
CumulusMonthRecord.jpg


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

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 4:49 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17614
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
Quote:
I want to split the date into multiple parts and place them in different cells.

What you could do is create three arrays for the components of the timestamps:

var hightempY = new Array("<#ByMonthTempHT mon=1 format=yyyy>", ...
var hightempD = new Array("<#ByMonthTempHT mon=1 format="'Day 'd">", ...
var hightempT = new Array("<#ByMonthTempHT mon=1 format=hh:nn>", ...

and then when you create your cells, give them IDs of (say) TempHY, TempHD, TempHT, and change the code in the changeData function to change all three fields, i.e

document.getElementById('TempHY').innerHTML = hightempY[month];
document.getElementById('TempHD').innerHTML = hightempD[month];
document.getElementById('TempHT').innerHTML = hightempT[month];

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


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 5:01 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Thanks Steve. I'm pleased it's possible. I shall need to read your suggestion a few times so it sinks in. :lol:

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 6:42 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Steve,

I'm having problems with the day number element. I've used your code as a guide but there is a syntax error in this I can't resolve.

var hightempD = new Array("<#ByMonthTempHT mon=1 format="'Day 'd">","<#ByMonthTempHT mon=2 format="'Day 'd">","<#ByMonthTempHT mon=3 format="'Day 'd">","<#ByMonthTempHT mon=4 format="'Day 'd">","<#ByMonthTempHT mon=5 format="'Day 'd">","<#ByMonthTempHT mon=6 format="'Day 'd">","<#ByMonthTempHT mon=7 format="'Day 'd">","<#ByMonthTempHT mon=8 format="'Day 'd">","<#ByMonthTempHT mon=9 format="'Day 'd">","<#ByMonthTempHT mon=10 format="'Day 'd">","<#ByMonthTempHT mon=11 format="'Day 'd">","<#ByMonthTempHT mon=12 format="'Day 'd">");

Can you spot the error?

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 6:46 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17614
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
RayProudfoot wrote:
new Array("<#ByMonthTempHT mon=1 format="'Day 'd">",

Yes; the first double quote for the format parameter will be taken as the termination of the array item. I don't know enough about using quotes in javascript to know how you get around that, particularly as single quotes are also used inside the format parameters. In some languages, if you want a double quote inside a string, you put two double quotes, e.g:

new Array("<#ByMonthTempHT mon=1 format=""'Day 'd"">"

but I don't know if that works in javascript. It may be that you have to 'escape' the quote character somehow, maybe with a backslash...

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


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 6:53 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1709
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
This doesn't cause a syntax error.

var hightempD = new Array("<#ByMonthTempHT mon=1 format='Day 'd>","<#ByMonthTempHT mon=2 format='Day 'd>","<#ByMonthTempHT mon=3 format='Day 'd>","<#ByMonthTempHT mon=4 format='Day 'd>","<#ByMonthTempHT mon=5 format='Day 'd>","<#ByMonthTempHT mon=6 format='Day 'd>","<#ByMonthTempHT mon=7 format='Day 'd>","<#ByMonthTempHT mon=8 format='Day 'd>","<#ByMonthTempHT mon=9 format='Day 'd>","<#ByMonthTempHT mon=10 format='Day 'd>","<#ByMonthTempHT mon=11 format='Day 'd>","<#ByMonthTempHT mon=12 format='Day 'd>")

I removed the double quotes after format= and between d and >. Not sure if that will work but at least it doesn't cause an error.

I'll battle on. Thanks for your answer. Quotes and where to put them is always a bit of a nightmare isn't it? :?

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 69 posts ]  Go to page 1, 2, 3, 4, 5  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:  

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