Sandaysoft

Support forum for Cumulus weather station software
It is currently Mon Sep 01, 2014 11:12 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation) • Downloads
Please put your approximate location into your profile • Add your personal web site to the Cumulus user map
Read the Announcements and News section regularly!
Do not allow your PC to go into standby mode while Cumulus is running - read the readme.txt!
If you find Cumulus useful, please consider a donation -

All times are UTC




Post new topic Reply to topic  [ 208 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 14  Next
Author Message
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 7:56 am 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 470
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Hi,

I've just noticed that my NOAA report on my website has not moved on to November.
i.e. not showing any data nor giving me the (NOV) month button at the top to click on.

can someone confirm if Cumulus generates and uploads the new month automatically
or do I need to generate each new month myself?

If Cumulus does not automatically generate and upload, will this be added into a
future Cumulus update?

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 7:58 am 
Offline
User avatar

Joined: Wed Mar 03, 2010 10:20 am
Posts: 353
Location: Brisbane, Australia
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows Vista SP2
Mine rolled over without any problems.

_________________
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 8:15 am 
Offline
User avatar

Joined: Thu Dec 17, 2009 2:03 pm
Posts: 796
Location: Hurstpierpoint, West Sussex, UK
Weather Station: WH1081
Operating System: Windows Vista & 7 Pro
Solorize wrote:
Can someone confirm if Cumulus generates and uploads the new month automatically
or do I need to generate each new month myself?

If Cumulus does not automatically generate and upload, will this be added into a
future Cumulus update?


It is a feature built into 1.9.2 (which I note you are using) and the parameters are under Configuration on the Cumulus control panel "NOAA Setup". I can confirm that mine is working automatically and generates the reports correctly.

_________________
Neil
Hurstpierpoint Weather

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 8:16 am 
Offline
Cumulus Author
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 20299
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
Solorize wrote:
I've just noticed that my NOAA report on my website has not moved on to November.

Perhaps you had an ftp problem on the first upload after midnight. Did the report get created in the reports folder on your PC?

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


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 8:23 am 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 470
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
hmm,

I have just looked in my C:\Cumulus\Reports folder and can see that there is a txt file.
NOAAM01111.txt <--- which is the November report file, so it is logging it ok.


NOAAM01111.txt;
Code:
                  Monthly Climatological Summary for Nov 2011

Name: Wokingham Weather   City: Wokingham   State: Berkshire
Elevation: 45 m  Lat: N 51° 25' 37"   Lon: W 000° 51' 02"

                  Temperature (°C), Rain (mm), Wind Speed (mph)

                                      Heat  Cool        Avg
    Mean                              Deg   Deg         Wind                 Dom
Day Temp  High   Time   Low    Time   Days  Days  Rain  Speed High   Time    Dir
----------------------------------------------------------------------------------
1  12.0  16.2   12:27   6.2   23:53   6.3   0.0   0.3   3.6  15.2   02:23    SW
----------------------------------------------------------------------------------
    12.0  16.2     1     6.2     1     6.3   0.0   0.3   3.6  15.2     1      SW

Max >=  27.0:  0
Max <=   0.0:  0
Min <=   0.0:  0
Min <= -18.0:  0
Max Rain: 0.3 on day 1
Days of Rain: 1 (> 0.2 mm)  0 (> 2.0 mm)  0 (> 20.0 mm)
Heat Base: 18.3  Cool Base: 18.3  Method: Integration


I have looked in my NOAAYR2011.txt and it has an entry for the 11th month;

Code:
Name: Wokingham Weather   City: Wokingham   State: Berkshire
Elevation: 45 m  Lat: N 51° 25' 37"   Lon: W 000° 51' 02"

                  Temperature (°C), Heat Base: 18.3  Cool Base: 18.3
                          Dep.  Heat  Cool                       Max  Max  Min  Min
        Mean  Mean        From  Deg   Deg                        >=   <=   <=   <=
YR MO  Max   Min   Mean  Norm  Days  Days  Hi  Date  Low  Date 27.0  0.0  0.0 -18.0
------------------------------------------------------------------------------------
11  1
11  2  10.0   3.5   6.7   0.0   197     0  16.0  24   0.0   12    0    0    1    0
11  3  14.8   1.5   7.6   0.0   332     0  22.9  25  -5.6    8    0    0   12    0
11  4  20.2   6.6  13.1   0.0   155     0  28.8  23   2.0   13    1    0    0    0
11  5  19.9   7.7  13.7   0.0   141     0  25.7   6   0.1    4    0    0    0    0
11  6  21.7   9.4  15.5   0.0    92     9  30.7  27   4.5   12    2    0    0    0
11  7  22.6  11.1  16.8   0.0    59    14  26.9   5   6.6   25    0    0    0    0
11  8  21.9  11.7  16.6   0.0    84    30  29.4   1   6.8   19    3    0    0    0
11  9  21.1  10.4  15.4   0.0   103    18  26.5   2   4.7   15    0    0    0    0
11 10  17.4   8.6  12.8   0.0   178     7  27.1   1  -0.4   20    1    0    1    0
11 11  16.2   6.2  12.0   0.0     6     0  16.2   1   6.2    1    0    0    0    0
11 12
------------------------------------------------------------------------------------
        18.6   7.7  13.0   0.0  1351    79  30.7 Jun  -5.6  Mar    7    0   14    0

                                Precipitation (mm)


It looks like the files didnt get copied onto my server?

Could someone confirm what settings I need to have selected to have this
done automatically, just so I can check I have it all set up OK.

The only thing I can think off why it is not on my server is perhaps my internet connection
was down, when Cumulus went to upload the files and therefore they did not get coppied?


These are my settings on Cumulus;

Image

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 8:32 am 
Offline
User avatar

Joined: Thu Dec 17, 2009 2:03 pm
Posts: 796
Location: Hurstpierpoint, West Sussex, UK
Weather Station: WH1081
Operating System: Windows Vista & 7 Pro
Your settings look fine and if during October it was updating daily then you have them set right. Like Steve mentions, your FTP may have misfunctioned when the auto FTP was attempted.

_________________
Neil
Hurstpierpoint Weather

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 1:25 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 470
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Yup I guess it must have been a problem with the FTP upload.

I have manually copied them over to my server so hopefully
it will work ok from now on.

Thanks

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 5:57 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 3274
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
I just dropped the script on my web server, I had to comment out the setting of the TZ variable (line 159) as the server did not like that, but I get a couple of errors which seem to relate to the non-existent (yet) December 11 report...?

Notice: Undefined index: NOAAMO1211.txt in C:\xampp\htdocs\weather\NOAA-reports.php on line 301
Notice: Undefined offset: 13 in C:\xampp\htdocs\weather\NOAA-reports.php on line 325

http://weather.wilmslowastro.com/noaa-reports.php

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Wed Nov 02, 2011 11:17 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 2216
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
I think it's because your error reporting is at twitch level (insisting variables are declared up front and not dynamically)

Try this please:
Attachment:
NOAA-reports.zip

I don't understand why your TZ failed - works on PHP 4.5 up :?

Edit: I see that you've edited out //putenv("TZ=$ourTZ");
Does it work if you use 'old' style declaration ?


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

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


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Thu Nov 03, 2011 9:09 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 3274
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Hi beteljuice, just the same with that version :(
Notice that if you select a year, then an additional error is displayed
http://weather.wilmslowastro.com/noaa-r ... hp?yr=2011

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Thu Nov 03, 2011 9:34 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 3274
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Changing line 302 to:
Code:
if (array_key_exists($testfile, $filesfound)) {

fixes that problem, trying to figure out which index is going out of bounds at line 326...

Edit: Got it, in the month for loop $m is incremented before the range check, so when the loop exits $m=13
change line 326 to:
Code:
if($y != $first_year) { $nav_build[$y]['months'][$m-1] .= "<br />\n";}
and that fixes it.

And finally changed 367-371 to:
Code:
         if (array_key_exists($testfile, $filesfound)) {
            $advisory = "<br /><b>Report for $yr ";
            if ($mo) {$advisory .= $months[$mo];}
            $advisory .= "</b>\n";
            $rpt = implode("",file("$NOAAdir/$testfile"));

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Thu Nov 03, 2011 10:07 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 3274
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Oh, and the putenv error? I run in Safe Mode, so
Quote:
In Safe Mode, the user may only alter environment variables whose names begin with the prefixes supplied by this directive. By default, users will only be able to set environment variables that begin with PHP_
http://php.net/manual/en/function.putenv.php

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Thu Nov 03, 2011 1:07 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 2216
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Cheers Mark, I'll check that out and update later.

Never used array_key_exists, I'll have to look it up :?

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


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Thu Nov 03, 2011 2:03 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 3274
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
I hadn't either, but looking up on how to trap 'does not exist' errors found it, you cannot pass the missing array member to any of the normal error checking routines because it doesn't exist so the act of passing it causes an error - doh!

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: PHP Web 'viewer' for Cumulus NOAA Style reports
PostPosted: Thu Nov 03, 2011 2:33 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 2216
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
mcrossley wrote:
...
And finally changed 367-371 to:
Code:
         if (array_key_exists($testfile, $filesfound)) {
            $advisory = "<br /><b>Report for $yr ";
            if ($mo) {$advisory .= $months[$mo];}
            $advisory .= "</b>\n";
            $rpt = implode("",file("$NOAAdir/$testfile"));

I elected to go 'terse' - same but different ;)
Code:
         if (array_key_exists($testfile, $filesfound)) {
            $advisory = "<br /><b>Report for $yr " .($mo ? $months[$mo] : ''). "</b>\n";
            $rpt = implode("",file("$NOAAdir/$testfile"));

         } else {

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


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