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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

WU-forecast.php

Discussion of Ken True's web site templates

Moderator: saratogaWX

Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: WU-forecast.php

Post by Mapantz »

I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?! :(
Image
User avatar
ConligWX
Posts: 1573
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: WU-forecast.php

Post by ConligWX »

Mapantz wrote:I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?! :(
i added a bit of code as I found either my ./cache/WU-forecast-json-0-en.txt would be 0 bytes of incomplete. it still happens from time to time, but is much more stable.

top of my WU-Forecast.php Version 3.04 - 27-Feb-2018

Code: Select all

<?php 
$filename = './cache/WU-forecast-json-0-en.txt';

if (file_exists($filename)) {

$zerosize = filesize('./cache/WU-forecast-json-0-en.txt');

if ($zerosize < 23000) {
// if ($zerosize == 0) {
unlink('./cache/WU-forecast-json-0-en.txt');
} } 
// WU-forecast.php script by Ken True - webmaster@saratoga-weather.org
//
// Version 1.00 - 02-Sep-2007 - initial release
I found the cache when complete is about 25/26kb in file size and have had incomplete files of upto 20kb in size. its just WU as usual.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: WU-forecast.php

Post by Mapantz »

Toxic17 wrote:
Mapantz wrote:I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?! :(
i added a bit of code as I found either my ./cache/WU-forecast-json-0-en.txt would be 0 bytes of incomplete. it still happens from time to time, but is much more stable.
Thank you Simon. I've added that to the top, let's see how she holds up?! :D
Image
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: WU-forecast.php

Post by Mapantz »

Quick update. Everything much better. I still get an empty forecast now & then, but instead of 30 times a day, it's just a couple. :)
Image
User avatar
ConligWX
Posts: 1573
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: WU-forecast.php

Post by ConligWX »

Mapantz wrote:Quick update. Everything much better. I still get an empty forecast now & then, but instead of 30 times a day, it's just a couple. :)
yep its not perfect, but then again WU is the issue, not our scripts.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: WU-forecast.php

Post by Mapantz »

Normal service resumed! :(

It doesn't seem to make any difference for me. The file is some times 0 bytes, 18KB, 19KB, 21KB, 23KB and even 50KB. Damn WU.
Image
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: WU-forecast.php

Post by Mapantz »

Hi Ken!

I use: $maxForecastLegendWords = 5; just to keep the wording small under the icons. Obviously, this will also only show a maximum of 5 words in the tooltip when you hover over the icon. Is there an easy change I could make where I keep the words to 5 under the icon, but show the full forecast sentence when I hover over the icon?

Nice fix in 3.05 by the way, much more stable. :)

Regards.
Image
Post Reply