Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

PHP Web 'viewer' for Cumulus NOAA Style reports

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
avoorpool
Posts: 168
Joined: Tue 08 May 2012 4:24 pm
Weather Station: WMR200A
Operating System: Windows 10 64-bit
Location: Pickering, Ontario Canada
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by avoorpool »

Once again......NOAA Reports....
This one might (again) be for Beteljuice :D
I've struggled before with implementing the NOAA reports into my site, however it became clear the free webhost (000webhost.com) did not support .txt files.
Since ysterday I've changed to a (paid-for) webhost (iPage), so a second attempt has been made.
I think I followed all the well described instructions in this forum, however unfortunately still no NOAA reports are displayed. It hangs on "Looking for files".....
What's missing, or should be changed/edited??

Thanks for your help,

Arthur
New site address: http://www.altonaweather.ca
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mcrossley »

User avatar
avoorpool
Posts: 168
Joined: Tue 08 May 2012 4:24 pm
Weather Station: WMR200A
Operating System: Windows 10 64-bit
Location: Pickering, Ontario Canada
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by avoorpool »

Mark,

You get an A++ :D
Have a look at altonaweather.ca......
Finally it works!!!
I knew something was missing :bash:
BTW: Checked your site, and I would like to implement the Realtime page instead of my current gauges page....
Any hints??

Thanks,

Arthur
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mcrossley »

Steve's real time Silverlight applet can be found here http://wiki.sandaysoft.com/a/CumulusRealtime
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by Buford T. Justice »

Here is another way to do this. If you want to see all of this in action before you do the following, go to my weather website at http://tinyurl.com/WS62694 and click on NOAA REPORTS at the bottom.

I am going to use the example web address of http://www.myweb.com/weather/ and C:\Cumulus as the install directory for this. Your web host will also need to support PHP 5.

First, log into your website with your favorite FTP client. In the main directory where you have your weather files uploaded to with Cumulus, create a new sub directory (new folder) and call it reports.

Now download pdirl from http://pdirl.newroots.de/ and open the .ZIP file. Open the pdirl-[VERSION#] folder within the .ZIP file. You will need to upload only these three folders/files to the reports directory you just created:
  • .pdirl
  • .htaccess
  • index.php
Open Cumulus and click on CONFIGURATION>NOAA SETUP.

All you have do here is define the FTP directory. So for http://www.myweb.com/weather/reports/, define it simply as /weather/reports then click OK.

If you need to create NOAA Monthly and Annual Reports, you will need the monthly log files created by Cumulus to get all of the data. If you don't have these monthly log files, you can still create NOAA Reports but dayfile.txt will be used instead and you will be missing AVERAGE WIND SPEED and the determined DOMINANT DIRECTION.

To create the NOAA Monthly Reports, click on VIEW>NOAA MONTHLY REPORT. Select your first month and year then click the UPDATE DISPLAY button. If all the information is there, click the SAVE button and save the file in C:\Cumulus\Reports and repeat for each month and year until you have all your NOAA Monthly Reports created. Click CLOSE when you are finished.

To create the NOAA Annual Reports, click on VIEW>NOAA ANNUAL REPORT. Select your first year then click the UPDATE DISPLAY button. If all the information is there, click the SAVE button and save the file in C:\Cumulus\Reports and repeat for each year until you have all your NOAA Annual Reports created. Click CLOSE when you are finished.

With your FTP client, upload all of your NOAA Reports from C:\Cumulus\Reports to the reports directory you created.

That's it!

Now open http://www.myweb.com/weather/reports/ and you can see your NOAA Reports. The NOAA Reports for the current month and year will be automatically updated whenever Cumulus starts recording a new day of weather data.

You can even create sub folders in the reports directory on your website for each year for better organization. If you do this, go back to the NOAA SETUP in Cumulus and add /2013 to the end of the FTP Directory so it is /weather/reports/2013 to allow your updated NOAA Reports to upload to the right place. Be sure to change this for each new year as needed.

Under each webpage for your weather data, you might want to add a link for your NOAA Reports. Just add this to the list of links for each T.htm webpage in C:\Cumulus\web:

Code: Select all

:<a href="/weather/reports/">noaa reports</a>:
gixxer.sw

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by gixxer.sw »

Hi,

Have been trying to chase down a minor bug with my implementation of the NOAA reports script.

When using the drop down menu for selecting the year I have an issue with the button alignment.

Any help really appreciated as I am a novice (hoping to learn) with these matters.

Simon.

http://www.users.on.net/~gixxer.sw/wbv2 ... hp?yr=2012
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

I don't get any problems viewing with FireFox.

However; The output of your .php page (view source with your browser) shows 25 empty lines before 'normal' html code.

Further down:

Code: Select all

				<!--  28 gras et Papyrus 84 italiq gras couleur 5594DE, transparent 160   -->
				
         
<link href="noaarep.css" rel="stylesheet" type="text/css" />
</head>
<body>

<H3>NOAA Style Reports for Mornington weather</H3>
Note the duplicated </head><body> which should not be there - that might be your problem.

But .... you also have the dreaded 'black diamond' instead of the dgree symbol !
See: https://cumulus.hosiene.co.uk/viewtopic.p ... &start=116
Image
......................Imagine, what you will KNOW tomorrow !
gixxer.sw

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by gixxer.sw »

Thank you for the reply.

I managed to remove the empty lines and the two bits of code you referred to.

However, on my pc and ipad when moving from the year 2012 back to 2013 the button "2012" is displayed as the last button in the 2013 row.

Basically the 2012 button sits along side December 2013.

Phew - hope that makes some sense.

Interesting that it displays correctly in firefox.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

I managed to remove the empty lines and the two bits of code you referred to.
I am still seeing the extra bits - you did upload your changes :?:

BTW - OK in IE8 as well (I'm running XP :lol: )
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

The bottom part of your page is still screwed. This should not be there

Code: Select all

</div>
<!-- Piwik --> 
</body>
</html>
   <!-- content ends -->

</div>
I'm also not sure about the other closing <div>s and footer - certainly it's not working like your other templates.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

beteljuice wrote: The report itself is created by Cumulus, Notepad++ says "ANSI as UTF-8"
Notepad++ reports your page as "ANSI as UTF-8", and is declared as UTF-8 in it's META data.

If anyone has a definitive answer as to why this kind of problem occurs and how to prevent it in the first place .....
Hi,
I have just created the page with NOAA reports (I use an'include' option and of course "get the black diamonds" on it. http://www.pogoda-niesiolowice.kaszuby. ... hp?yr=2012 .
I tried to use an advice shown in this topic with NO results.
Then I checked the format of reports generated by Cumuls and I noticed that THEY ARE IN "ANSI" FORMAT not in "ANSI as UTF-8" format. I saved one of the reports (NOAAYR2013.txt) in "ANSI as UTF-8" format and send it to ththe server (server has PHP capability). The result you can see here: http://www.pogoda-niesiolowice.kaszuby. ... hp?yr=2013 . Now my question is: HOW to force Cumulus to save NOAA reports in "ANSI as UTF-8" format?
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

pernaczy wrote:Now my question is: HOW to force Cumulus to save NOAA reports in "ANSI as UTF-8" format?
You can't, it uses the default encoding. It is possible that I could consider this for a future enhancement, as the system routine I use to save the file has an 'encoding' parameter. "UTF-8" is an option, but not "ANSI as UTF-8". I believe the latter is a notepad++ term for "UTF-8 without BOM". It appears that "UTF-8 without BOM" is possible, but it is much more complicated to do than "UTF-8". Here is a complete list of the available "simple" encodings:


ASCII
Returns an encoding for the ASCII character set.

BigEndianUnicode
Returns an encoding for the UTF-16 format with big-endian byte order.

Default
Returns an encoding for the operating system's default ANSI code page.

Unicode
Returns an encoding for the UTF-16 format with little-endian byte order.

UTF7
Returns an encoding for the UTF-7 format.

UTF8
Returns an encoding for the UTF-8 format.
Steve
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mcrossley »

All my reports are in standard Windows-1252 'ANSI' format - to fix the 'black triangles' on the web page I had to tell my web server to transfer the *.txt report files as Windows-1252 format files rather than straight ASCII which is the default.

I added a .htaccess file to the 'reports' folder on my web server with the following content:

Code: Select all

AddCharset windows-1252 .txt
User avatar
pernaczy
Posts: 133
Joined: Thu 15 Nov 2012 5:42 pm
Weather Station: Fine Offset WH 2080, TFA Spring
Operating System: Windows 7
Location: Niesiolowice, Northern Poland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by pernaczy »

steve wrote:
pernaczy wrote:Now my question is: HOW to force Cumulus to save NOAA reports in "ANSI as UTF-8" format?
You can't, it uses the default encoding. It is possible that I could consider this for a future enhancement, as the system routine I use to save the file has an 'encoding' parameter. "UTF-8" is an option, but not "ANSI as UTF-8". I believe the latter is a notepad++ term for "UTF-8 without BOM". It appears that "UTF-8 without BOM" is possible, but it is much more complicated to do than "UTF-8".
UTF8
Returns an encoding for the UTF-8 format.
I have changed the format of the file "NOAAYR2013.txt" to UTF-8 and send it to the server. IT WORKS. So, You may consider to include such a possibility to a future (not very distant future :D ) enhancement of the Cumulus PLEASE.

Best Regards,
Piotr
The day when I have learned something is not the lost one.
Ignorance can be corrected with the help of a book. Stupidity requires a shotgun and a shovel.

Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

mcrossley wrote:All my reports are in standard Windows-1252 'ANSI' format - to fix the 'black triangles' on the web page I had to tell my web server to transfer the *.txt report files as Windows-1252 format files rather than straight ASCII which is the default.

I added a .htaccess file to the 'reports' folder on my web server with the following content:

Code: Select all

AddCharset windows-1252 .txt
You kepy quite about that workaround Mark :geek:

Anyone else with chartype / accented character problems tried this ?
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply