Page 2 of 3
Re: WU-forecast.php
Posted: Mon 27 Nov 2017 10:42 am
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
Re: WU-forecast.php
Posted: Wed 03 Jan 2018 11:18 pm
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
Re: WU-forecast.php
Posted: Thu 04 Jan 2018 12:09 am
by Mapantz
Whole of WU is down from my end, has been for a few hours.
Re: WU-forecast.php
Posted: Thu 04 Jan 2018 9:08 am
by mcrossley
Whole of WU is down from my end, has been for a few hours.
AWS implementing the Intel fix?
Re: WU-forecast.php
Posted: Thu 04 Jan 2018 11:14 am
by jdc
I haven't noticed any problems with WU....
AWS implementing the Intel fix?
Are you busy with that?
I haven't noticed any problems....
Re: WU-forecast.php
Posted: Thu 04 Jan 2018 11:33 am
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
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
Re: WU-forecast.php
Posted: Fri 19 Jan 2018 6:42 pm
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.
Re: WU-forecast.php
Posted: Fri 19 Jan 2018 7:39 pm
by saratogaWX
Since the API returns something, just not all the things, maybe the shorter version could be detected by
which would spot the ones with reduced data.
Re: WU-forecast.php
Posted: Fri 19 Jan 2018 9:04 pm
by ConligWX
saratogaWX wrote:Since the API returns something, just not all the things, maybe the shorter version could be detected by
which would spot the ones with reduced data.
Just run a test on that..... Yep that seems to work.
Thanks Ken.
Re: WU-forecast.php
Posted: Thu 01 Mar 2018 7:59 am
by ConligWX
Ken
is there anyway MPH can be used with°C ?
Re: WU-forecast.php
Posted: Thu 01 Mar 2018 9:57 am
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.
Re: WU-forecast.php
Posted: Thu 01 Mar 2018 6:53 pm
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...
Re: WU-forecast.php
Posted: Sat 17 Mar 2018 3:10 pm
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?
Re: WU-forecast.php
Posted: Sat 17 Mar 2018 3:23 pm
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.
Re: WU-forecast.php
Posted: Sat 17 Mar 2018 7:32 pm
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.
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
)