Sandaysoft

Support forum for Cumulus weather station software
It is currently Sun May 26, 2013 2:27 am
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: Tue Mar 20, 2012 1:08 pm 
Offline

Joined: Sun Aug 21, 2011 2:26 am
Posts: 24
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: 17614
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: 24
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: 24
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: 1857
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: 24
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: 1857
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: 1857
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  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Tue Apr 03, 2012 1:57 pm 
Offline

Joined: Fri Mar 09, 2012 10:42 am
Posts: 12
Location: Sierre
Weather Station: Ws-0101
Operating System: Windows 7 x64
beteljuice wrote:
You need a <br /> between your image and the report. (Why the initial [space]<br /> ?)

You are right, corrected...

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

Didn't enter it in Cumulus settings, don't want it to be shown...



Just finished the AutoIt3 script which every night after midnight generates
- graph30.png (last 30 days graph)
- NOAAMOmmyyyy.png (last month graph)
- NOAAYRyyyy.png (this year graph)
If anyone's interested in source code, let me know...


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Jun 04, 2012 6:44 pm 
Offline

Joined: Fri Nov 12, 2010 9:47 pm
Posts: 4
Location: Germany
Weather Station: PCE FWS 20
Operating System: XP SP and Windows 7 64bit
I have integrated the NOAA reports to my page.
It works fine. http://www.luckscher.de/Wetter/noaa_test.htm

But when I use IE8, then it looks wrong.


Attachment:
NOAA_IE8.JPG


Has anyone a hint, to solve the problem?

Thanks.


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

_________________
Roberto

http://www.luckscher.de/Wetter/index.htm
Image


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Jun 04, 2012 7:22 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2523
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
IE8 (and firefox4) do not fully support the <pre> tag, they do not honour line breaks. You can add word-wrap and wrap options to these browsers respectively, but I think that will just wrap the text at the edge of the iFrame rather than where the line breaks are.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Jun 04, 2012 10:03 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1857
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Quote:
IE8 (and firefox4) do not fully support the <pre> tag,
I didn't know that ... :roll:

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


Top
 Profile  
 
 Post subject: Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo
PostPosted: Mon Jun 04, 2012 10:13 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2523
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Yeah, makes it a bit awkward doesn't it :( parse the report and sub <br /> for line breaks ?

Or upgrade to a decent browser :-)

_________________
Mark
Wilmslow Astro Weather


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: Bing [Bot] 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