Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired
Please read this post before posting
Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download
Please read this post before posting
Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download
WU-forecast.php
Moderator: saratogaWX
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
WU-forecast.php
Looks like WU API data is now returning fcttext_metric = null and showing an error. this appears to be some city's but not all as mentioned here:
https://apicommunity.wunderground.com/w ... 5-november
https://apicommunity.wunderground.com/w ... 5-november
Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- saratogaWX
- Posts: 874
- Joined: Wed May 06, 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows XP SP3
- Location: Saratoga, CA, USA
- Contact:
Re: WU-forecast.php
Yes, that is what is 'confusing' the WU-forecast.php V3.03 script -- the missing 'fcttext_metric' entry in the JSON returned.
I've got a beta workaround (v3.04-beta) that uses the 'fcttext' (Imperial) text forecast and (tries to) replace the F forecasts with C forecasts leaving the rest of the forecast text unchanged. It doesn't try to change the wind forecasts from MPH to km/h, and I've observed that some international forecasts using languages other than that country's language may have null values for both (and so fail).
Try if you like the attached beta .. I'm not releasing an 'offical' update for this as it's just a quick workaround for their broken API JSON feed.
I've got a beta workaround (v3.04-beta) that uses the 'fcttext' (Imperial) text forecast and (tries to) replace the F forecasts with C forecasts leaving the rest of the forecast text unchanged. It doesn't try to change the wind forecasts from MPH to km/h, and I've observed that some international forecasts using languages other than that country's language may have null values for both (and so fail).
Try if you like the attached beta .. I'm not releasing an 'offical' update for this as it's just a quick workaround for their broken API JSON feed.
You do not have the required permissions to view the files attached to this post.
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
Thanks 

Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- Mapantz
- Posts: 523
- Joined: Sat Dec 17, 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 10 x64 - A beast.
- Location: Wareham, Dorset - UK
- Contact:
Re: WU-forecast.php
I think they've fixed it now? My forecast has been on/off all day, for the last 4 days I think?! One hour it's fine, then it's down for an hour etc However, it has been working fine for the last 5 or 6 hours.
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
Mapantz wrote:I think they've fixed it now? My forecast has been on/off all day, for the last 4 days I think?! One hour it's fine, then it's down for an hour etc However, it has been working fine for the last 5 or 6 hours.
Yep got an email from the api team reporting the issue is now fixed.
Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
is this broken again?
I'm getting error mesdsage:
Warning: Division by zero in WU-forecast.php on line 631
WU-forecast-json-0-en.txt is zero bites so looks like no data is being downloaded.
I'm getting error mesdsage:
Warning: Division by zero in WU-forecast.php on line 631
WU-forecast-json-0-en.txt is zero bites so looks like no data is being downloaded.
Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- saratogaWX
- Posts: 874
- Joined: Wed May 06, 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows XP SP3
- Location: Saratoga, CA, USA
- Contact:
Re: WU-forecast.php
Doing a view-source on wxforecast.php?force=1 shows
So there's a timeout issue between your webserver and api.wunderground.com server -- WU is not responding within 4 seconds (a long time for an API) and zero results are received.
A 'normal' fetch (as on my site currently) shows
<!-- WU-forecast.php (ML) Version 3.04 beta - 22-Feb-2017 on PHP 7.1.11 -->
<!-- temps in C -->
<!-- autoSetTemplate using narrow aspect. -->
<!-- WU_API Raw URL='https://www.wunderground.com/cgi-bin/findweather/getForecast?query=pws:ICODOWNN2' -->
<!-- WU API New URL='http://api.wunderground.com/api/47678e7793e1cea8/forecast10day/geolookup/lang:EN/q/pws:ICODOWNN2.json' -->
<!-- loading from https://api.wunderground.com/api/47678e ... OWNN2.json. -->
<!-- curl fetching 'https://api.wunderground.com/api/47678e7793e1cea8/forecast10day/geolookup/lang:EN/q/pws:ICODOWNN2.json' -->
<!-- Error: Operation timed out after 4001 milliseconds with 0 out of 0 bytes received -->
<!-- HTTP stats: RC=0 dest=23.43.34.106 port=443
Times: dns=0.060 conn=0.062 pxfer=0.000 get=4.001 total=4.001 secs -->
So there's a timeout issue between your webserver and api.wunderground.com server -- WU is not responding within 4 seconds (a long time for an API) and zero results are received.
A 'normal' fetch (as on my site currently) shows
<!-- WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 on PHP 7.1.11 -->
<!-- temps in F -->
<!-- autoSetTemplate using narrow aspect. -->
<!-- WU_API Raw URL='http://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=95070' -->
<!-- WU API New URL='http://api.wunderground.com/api/c991975b7f4186c0/forecast10day/geolookup/lang:EN/q/95070.json' -->
<!-- loading from https://api.wunderground.com/api/c99197 ... 95070.json. -->
<!-- curl fetching 'https://api.wunderground.com/api/c991975b7f4186c0/forecast10day/geolookup/lang:EN/q/95070.json' -->
<!-- HTTP stats: RC=200 dest=23.52.163.36
Times: dns=0.013 conn=0.051 pxfer=0.215 get=0.271 total=0.486 secs -->
<!-- RC=200 OK, bytes=26180 -->
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
Ah.. ok might be my firewall slowing the request I'll take a look.. thanks.
Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
saratogaWX wrote:So there's a timeout issue between your webserver and api.wunderground.com server -- WU is not responding within 4 seconds (a long time for an API) and zero results are received.
A 'normal' fetch (as on my site currently) shows<!-- WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 on PHP 7.1.11 -->
Thank god for Backups...

disabled all firewall, IPS, Web and Application rules, but still no joy.
played about with the WU-forecast.php but could not figure it out. restarted apache. still no joy, though my PC (win10) calls the api url within a split second.
ended up restoring the webfolder from a backup. and it is now working. so something in the configuration was screwed up.

Thanks for the help though Ken.

Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- saratogaWX
- Posts: 874
- Joined: Wed May 06, 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows XP SP3
- Location: Saratoga, CA, USA
- Contact:
Re: WU-forecast.php
Looks like it's working again on your site.
When it fails, do a view-source on the page
to see what it said. If needed, look at the cached JSON file highlighted above to see if forecast info was included. WU sometimes omits the forecast JSON info while their models update the detailed forecasts. It happens with our NWS and the new api.weather.gov site also.
When it fails, do a view-source on the page
<!-- WU-forecast.php (ML) Version 3.02 - 01-Nov-2014 on PHP 5.6.32 -->
<!-- WU_API Raw URL='https://www.wunderground.com/q/zmw:00000.70.03862' -->
<!-- WU API New URL='http://api.wunderground.com/api/f7ca74754ae07fca/forecast10day/geolookup/lang:EN/q/zmw:00000.70.03862.json' -->
<!-- loading from ./cache/WU-forecast-json-0-en.txt (26136 bytes) -->
<!-- using charsetInput='UTF-8' charsetOutput='ISO-8859-1' doIconv='1' doRTL='' -->
<!-- processing JSON entries for forecast -->
<!-- rawJSON size is 25684 bytes -->
<!-- WU_prepareJSON: Success. Valid UTF-8. -->
<!-- json_decode returns - No errors -->
to see what it said. If needed, look at the cached JSON file highlighted above to see if forecast info was included. WU sometimes omits the forecast JSON info while their models update the detailed forecasts. It happens with our NWS and the new api.weather.gov site also.
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
I used to get sometimes a 0 byte files json file, and then it would not update at all. I have added a check for 0 byte and if so delete this file before it refreshes. still does not stop incomplete files however.
Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- Mapantz
- Posts: 523
- Joined: Sat Dec 17, 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 10 x64 - A beast.
- Location: Wareham, Dorset - UK
- Contact:
Re: WU-forecast.php
It went blank again..
Code: Select all
<!-- WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 on PHP 5.6.32 -->
<!-- loading from https://api.wunderground.com/api/f7ca74754ae07fca/forecast10day/geolookup/lang:EN/q/zmw:00000.70.03862.json. -->
<!-- curl fetching 'https://api.wunderground.com/api/f7ca74754ae07fca/forecast10day/geolookup/lang:EN/q/zmw:00000.70.03862.json' -->
<!-- HTTP stats: RC=200 dest=213.248.117.32 port=443 (from sce=185.145.203.195)
Times: dns=0.028 conn=0.029 pxfer=0.038 get=0.648 total=0.685 secs -->
<!-- RC=200 OK, bytes=24485 -->
<!-- saved cache to ./cache/WU-forecast-json-0-en.txt (24485 bytes) -->
<!-- using charsetInput='UTF-8' charsetOutput='ISO-8859-1' doIconv='1' doRTL='' -->
<!-- processing JSON entries for forecast -->
<!-- rawJSON size is 24027 bytes -->
<!-- json_decode returns - No errors
- Toxic17
- Posts: 711
- Joined: Mon May 19, 2014 10:45 pm
- Weather Station: Davis VPro2 Plus
- Operating System: Deb 9.3 Stretch
- Location: Bangor, NI
- Contact:
Re: WU-forecast.php
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.
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.
Regards Simon
https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
- Mapantz
- Posts: 523
- Joined: Sat Dec 17, 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 10 x64 - A beast.
- Location: Wareham, Dorset - UK
- Contact:
Re: WU-forecast.php
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.
Return to “Saratoga Templates”
Who is online
Users browsing this forum: No registered users and 2 guests