Sandaysoft

Support forum for Cumulus weather station software
It is currently Tue Jun 18, 2013 9:57 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  [ 77 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Mar 19, 2012 12:04 pm 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 25
Location: Sydney
Weather Station: WH-1091
Operating System: XP and OSX
Quote:
In Cumulus, generate NOAA monthly and annual reports for every month and year that you have data for, and save them using the default file names.


A little bit of help needed.

How do I create last years and months prior to March NOAA reports. The reports are showing ok for March. There is also a yellow line through the months is there a fix for that also. http://www.blazingcomet.com/weather/NOAA-reports.php

_________________
Leumeah NSW AU Weather


Last edited by apple8 on Mon Mar 19, 2012 12:10 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Mar 19, 2012 12:08 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17827
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
apple8 wrote:
How do I create last years NOAA reports. The reports are showing this years ok

Is the problem that you don't know about the NOAA report items on the 'View' menu in Cumulus, or that you are using them but can't get them to create reports for last year's data?

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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Mar 19, 2012 12:16 pm 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 25
Location: Sydney
Weather Station: WH-1091
Operating System: XP and OSX
In the view menu I have only March and 2012. so I guess I need to generate reports for previous months. I have edited my previous post to incude url of the data I have which is the same as the view menu.

_________________
Leumeah NSW AU Weather


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Mar 19, 2012 12:21 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17827
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
apple8 wrote:
In the view menu I have only March and 2012.

The view menu in Cumulus is where the items are that you need to use to create the NOAA reports.

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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Mar 19, 2012 12:47 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1887
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Quote:
There is also a yellow line through the months is there a fix for that also.

You are actually using the PHP version, but the outcome is the same.

Once you have data that covers more than one year you will see that the yellow highlight does just that, it highlights the year (line) that you are viewing.

If you don't like it (I should wait until you have made your 'themed' page with any backgrounds etc.) you can edit noaarep.css, which has been created on your site, or modify the css code at the end of your php file and then delete the css file on your site.

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


Last edited by beteljuice on Wed Mar 21, 2012 11:15 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Tue Mar 20, 2012 1:08 pm 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 25
Location: Sydney
Weather Station: WH-1091
Operating System: XP and OSX
Quote:
The view menu in Cumulus is where the items are that you need to use to create the NOAA reports


After losing a few hours I would say that the buttons are not showing on my netbook as in this post http://sandaysoft.com/forum/viewtopic.php?f=4&t=6471. Can't see an easy way around it..... unless I copy all the Cumulus data files to another PC, install Cumulus, make up the NOAA files and copy them back and upload.

_________________
Leumeah NSW AU Weather


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Tue Mar 20, 2012 1:27 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17827
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
apple8 wrote:
After losing a few hours I would say that the buttons are not showing on my netbook as in this post http://sandaysoft.com/forum/viewtopic.php?f=4&t=6471.

But, as I said in that thread, I reduced the default height of the NOAA windows; they're now 480 pixels high. What is your screen resolution?

Edit: I see from your web site that you are still using build 1022. I reduced the height of the windows in build 1024.

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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Wed Mar 21, 2012 8:44 am 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 25
Location: Sydney
Weather Station: WH-1091
Operating System: XP and OSX
Quote:
I see from your web site that you are still using build 1022


Thanks, that got it. Downloaded latest version, all good.

_________________
Leumeah NSW AU Weather


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Wed Mar 21, 2012 8:54 am 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 25
Location: Sydney
Weather Station: WH-1091
Operating System: XP and OSX
Quote:
wait until you have made your 'themed' page


I think that is my next challenge. ie adding it to the Cumulus menu?

_________________
Leumeah NSW AU Weather


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Wed Mar 21, 2012 11:10 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1887
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
apple8 wrote:
Quote:
wait until you have made your 'themed' page

I think that is my next challenge. ie adding it to the Cumulus menu?

That - plus modifying / creating a page that matches the rest of your site.

See the (correct) PHP page / Intermediate level, It's really not too difficult - honest :shock:
viewtopic.php?f=14&t=5754

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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Fri Mar 23, 2012 12:34 pm 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 25
Location: Sydney
Weather Station: WH-1091
Operating System: XP and OSX
Quote:
It's really not too difficult - honest


Wow I did it :o

I thought it was going to be beyond me, thanks beteljuice.

_________________
Leumeah NSW AU Weather


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Sun Apr 01, 2012 12:27 pm 
Offline

Joined: Fri Mar 09, 2012 10:42 am
Posts: 12
Location: Sierre
Weather Station: Ws-0101
Operating System: Windows 7 x64
I'm trying to implement history graphs into this nice and simple report solution. To keep it simple I thought of a workaround:

- Script Cumulus to generate monthly history graphs, this every 1st of month just after midnight
- Script Cumulus to generate yearly history graphs, this every 1st of january just after midnight

This would result in one or several image files like Temp_NOAAMO0312.png or Temp_NOAAYR2012.png.

Even though my knowledge of javascript is equal to zero, by playing with noaarep.js I am able to add an image after the report text :clap: , on line 238:
document.getElementById("theReport").innerHTML = repdat + " <br><img src=prev.png /> "; // o/p the report

How do I get the info month/year, so I could add something like
If month_button pressed Then .innerHTML = repdat + " <br><img src=Temp_NOAAMO" + month_pressed + according_year + ".png /> "
Else .innerHTML = repdat + " <br><img src=Temp_NOAAYR" + year_pressed + ".png /> "


Studying beteljuice's code, but can't figure out... :bash:


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Apr 02, 2012 12:33 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1887
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
I did say you're on your own with this code :lol:

... but the easiest way is to have a seperate directory (eg. graphs/) with the files names exactly the same as the corresponding reports. - except for the extension type of course !

Again, for completeness and uniformity in html create a new <div id='repGraph'></div> underneath 'theReport' <div> - although you can use the <br /> as you have done.

Then in the script, something like:

Code:

             document.getElementById("theReport").innerHTML = repdat; // o/p the report

             repImageHolder = document.getElementById("repGraph"); // the new graph <div>
             if(repImageHolder){ // if the div exists
                    repImageUrl = url.replace("txt", "png");
                    repImageHolder.innerHTML = "<img src = \"graphs/" +repImageUrl+ "\" />";
             }

       }
NB: No existance check of the graph takes place ! - it could be done but would need extra code to call the Ajax routine yet again in a slightly different way.

The easiest way to handle this is to probably generate a graph every day (just like the month / this year reports) even though it will be incomplete, it will be current and available ;)

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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Tue Apr 03, 2012 12:43 pm 
Offline

Joined: Fri Mar 09, 2012 10:42 am
Posts: 12
Location: Sierre
Weather Station: Ws-0101
Operating System: Windows 7 x64
thanks!!!

document.getElementById("theReport").innerHTML = " <br><img src=" + url.replace("txt","png") + " /> " + repdat; // o/p the report


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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Tue Apr 03, 2012 1:46 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1887
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
You are 'lucky' the lookup routine checks the full file names, else there would be a problem with graph and report names clashing !

Also it's 'handy' that "theReport" <div> wraps and your images are the right size.
You need a <br /> between your image and the report. (Why the initial [space]<br /> ?)

Code:
document.getElementById("theReport").innerHTML = "<img src=" + url.replace("txt","png") + " /><br />" + repdat; // o/p the report


PS. Why is there no location information in your reports ?

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


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