Page 2 of 5

Re: Yearly Data Summary

Posted: Sun 06 Mar 2011 10:55 pm
by GraemeT
That's brilliant David!
I've been thinking about something similar in php, but yours is a simpler solution.
Thanks.

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 12:14 am
by bnwrx
Does "Toolbox" always need to be "Open" for it to upload files? I have never used it before? I set it up to upload the "Dayfile" so do I leave it open and running or can I close it and it will still upload as scheduled?

Sorry if this seem like a basic question but want to find out. Thanks

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 2:56 am
by Super-T
David
What would the format be for running your datasummary locally to the c:\cumulus\data\dayfile.txt
And, can the Cumulus/network/files not upload the dayfile.txt?

Does Toolbox need to be running?

Posted: Mon 07 Mar 2011 8:18 am
by mcrossley
Bob - you have to leave Toolbox running. The alternative is to set-up a job in the Windows Task Scheduler to run say a batch job to perform the FTP.

Terry - as David mentioned above, Cumulus could do the upload but it would repeat it every 10mins (or whatever interval you have set) and it only needs to be uploaded once a day.

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 9:03 am
by tjaliwalpa
David,

Once again, thanks for the work you have done. It is a practical and simple solution to for those of us who haven't got access to php.

Bob

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 9:35 am
by nking
A BIG thank you David - As I'm sure you're Mum would say "You're a very clever boy" :D

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 9:37 am
by daj
Super-T wrote:David
What would the format be for running your datasummary locally to the c:\cumulus\data\dayfile.txt
Browsers, by design, do not allow Javascript code access to local files on your PC as this is a BIG security risk. Imagine visiting a web page and it collecting files off you own PC without your knowledge :o I think there are some browser tweaks to allow it but I would strongly advise against opening up such a hole.
And, can the Cumulus/network/files not upload the dayfile.txt?
As mentioned in an earlier comment - that would mean Cumulus uploads it every 10 mins (or however often your web update happens), so that is no good.

Maybe we can persuade Steve to build in a daily upload? Toolbox was written to compliment Cumulus, but as Steve adds more features I will deprecate them in Toolbox

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 9:42 am
by steve
daj wrote:Maybe we can persuade Steve to build in a daily upload? Toolbox was written to compliment Cumulus, but as Steve adds more features I will deprecate them in Toolbox
It's certainly on the list of likely future enhancements, but things which Toolbox already does well I tend to treat as lower priority in Cumulus :)

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 11:33 am
by daj
nitrx wrote:For some reason you don't count values between 0,1 and 1 as a value by rain and wind ;)
Just to note that this issue has been fixed -- it only affects those who have a comma as their decimal separator, and only affects how a zero figure for wind and rain are shown.

Basically Javascript treats 0.2 as 0.2 and 0,2 as 0 (Who wouldn't! LOL) Anyway, javascript code updated and you need only apply if your figures in dayfile use a comma as a decimal separator (so most people need not update it)

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 11:53 am
by nitrx
Thanks David, well when I get 2,50 Euro I certainly want the 0,50 cents 8-)

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 4:19 pm
by daj
I think I might also write the PHP equivalent of this as it seems to have been a success. As website owners, can decide which one to offer your users -- if you have PHP on the server use that, if not use the current Javascript solution.

(PHP would be the faster version, in theory, as the server does all the work and only delivers the results, whereas the Javascript only solution sends everything to the browser to be processed)

What do we think?

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 4:24 pm
by steve
I'd be interested in seeing a PHP version, if it was as easy to install and customise as the existing one is.

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 7:32 pm
by PaulMy
if it was as easy to install and customise as the existing one is.
I'll second that! and thanks to David and Steve to make this available to us :clap:

Paul

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 7:46 pm
by nitrx
daj wrote:I think I might also write the PHP equivalent of this as it seems to have been a success. As website owners, can decide which one to offer your users -- if you have PHP on the server use that, if not use the current Javascript solution.

(PHP would be the faster version, in theory, as the server does all the work and only delivers the results, whereas the Javascript only solution sends everything to the browser to be processed)

What do we think?
Well if it's faster I choose for php but the javascript is fast enough or does the javascript depends on the client site ?

Re: Yearly Data Summary

Posted: Mon 07 Mar 2011 9:48 pm
by yv1hx
Working great from here!

http://met.ivic.gob.ve/red/Cabimas/datasummary.html

Huge Thanks David!!! :clap: :clap: :clap: