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

User avatar
ConligWX
Posts: 1571
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:
Toxic17 wrote:In the last few months it had been very hit and miss. Not sure it they are to blame or not.

Just double check your DNS and time are pretty much 100% ok and nothing your end (network related) is making the data truncated at all. I think I did move DNS from Google to OpenDNS which seems slightly faster with my ISP. My time is pulled from uk.pool.ntp.org.
I checked your forecast last night, and it wasn't working either.

https://apicommunity.wunderground.com/w ... 5-november

A few people complained about it yesterday.
fcttext_metric is "" again from WU in the json file.

use the 3.04beta that Ken supplied here:

https://cumulus.hosiene.co.uk/viewtopic.p ... 97#p127320
Regards Simon

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

Image
User avatar
ConligWX
Posts: 1571
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 »

Just started today getting errors again.

Warning: Division by zero in /share/~~~~~~/WU-forecast.php on line 629

WU-forecast-json-0-en.txt file has this in its contents so guess WU is having issues again?

Code: Select all

HTTP/1.1 503 Service Unavailable
Content-Length: 0
Expires: Wed, 03 Jan 2018 23:15:21 GMT
Cache-Control: max-age=0, no-cache
Pragma: no-cache
Date: Wed, 03 Jan 2018 23:15:21 GMT
Connection: keep-alive
api site showing fault with web page at present.

https://www.wunderground.com/weather/api
Regards Simon

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

Image
Mapantz
Posts: 1777
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 »

Whole of WU is down from my end, has been for a few hours.
Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: WU-forecast.php

Post by mcrossley »

Whole of WU is down from my end, has been for a few hours.
AWS implementing the Intel fix?
User avatar
jdc
Posts: 142
Joined: Tue 19 Jun 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10
Location: Portsoy,.
Contact:

Re: WU-forecast.php

Post by jdc »

I haven't noticed any problems with WU....
AWS implementing the Intel fix?
Are you busy with that? :roll:

I haven't noticed any problems....
User avatar
ConligWX
Posts: 1571
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 »

mcrossley wrote:
Whole of WU is down from my end, has been for a few hours.
AWS implementing the Intel fix?
not just Intel by the looks of it, and patches look like they will slow everything down :shock:

https://www.reddit.com/r/pcmasterrace/c ... l_cpu_bug/

btw looks like the forecasting it backup again...

interesting read on WU's response though.......

https://www.wxforum.net/index.php?topic ... #msg340115
Regards Simon

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

Image
User avatar
ConligWX
Posts: 1571
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 »

Ken, I was wondering if you could help me figure out any way of scripting this issue.

as we know WU Forecasts have been flakey for a while. I have some script to delete (unlink) the cache file if it is 0 bytes in size.

when forecasts from WU come down the cache file is usually over 20kb in size, so I was wondering how I script the file to be deleted if it is less than 20kb.

here is the start of my wu-forcast.php.

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 == 0) {
unlink('./cache/WU-forecast-json-0-en.txt');
} } 
 
// WU-forecast.php script by Ken True - webmaster@saratoga-weather.org
any help would be most appreicated.

here is the two cache file. one complete the other incomplete.
You do not have the required permissions to view the files attached to this post.
Regards Simon

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

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: WU-forecast.php

Post by saratogaWX »

Since the API returns something, just not all the things, maybe the shorter version could be detected by

Code: Select all

if ($zerosize < 20000) {
which would spot the ones with reduced data.
User avatar
ConligWX
Posts: 1571
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 »

saratogaWX wrote:Since the API returns something, just not all the things, maybe the shorter version could be detected by

Code: Select all

if ($zerosize < 20000) {
which would spot the ones with reduced data.
Just run a test on that..... Yep that seems to work.

Thanks Ken. :clap:
Regards Simon

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

Image
User avatar
ConligWX
Posts: 1571
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 »

Ken

is there anyway MPH can be used with°C ?
Regards Simon

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

Image
Mapantz
Posts: 1777
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:Ken

is there anyway MPH can be used with°C ?
That's a good shout. It would be nice if a workaround is possible. I asked WU a long time ago about giving this option and they point-blank refused. Although I can do the conversion in my head quite quickly, I find it uncomfortable to use. :lol:
Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: WU-forecast.php

Post by saratogaWX »

Since the data on wind speed comes in the plain text of the period forecast, there's not a good way for me to parse that out and convert it from km/h to mph given there are multiple languages to support. I have to just rely on WU to provide the translations and data. There's nothing in the JSON that would let me do a wind speed units change either. Sorry...
Mapantz
Posts: 1777
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 »

Is anyone else back to having problems with this again? for the past week/10 days, the forecast is failing around 6 or 7 times a day. Are WU ever going to fix this?
Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: WU-forecast.php

Post by saratogaWX »

The WU developers Trello status board still shows my two entries about the API (missing forecasts, some non-English requests return English forecasts) in 'Backlog', so it's unlikely they are working on it yet. Sigh. :groan:
User avatar
ConligWX
Posts: 1571
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 »

saratogaWX wrote:The WU developers Trello status board still shows my two entries about the API (missing forecasts, some non-English requests return English forecasts) in 'Backlog', so it's unlikely they are working on it yet. Sigh. :groan:
Time to point Ben at the Problem again I guess. Thought I havent noticed as many failures since implementing the deletion of the WU-forecast-json-0-en.txt if size is lower than about 22kb. I know this is only a work around, but it seems to be holding up well. (famous last words :lol: )
Regards Simon

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

Image
Post Reply