Author Topic: Forecast Leuven this morning is in error  (Read 854 times)

0 Members and 1 Guest are viewing this topic.

Online Aardvark

  • Forecaster
  • *****
  • Posts: 2015
  • www.desmoinesweather.org
    • Des Moines Iowa Weather and Climate
Forecast Leuven this morning is in error
« on: February 15, 2017, 08:40:42 AM »
This morning I noticed the template is showing the attached for the forecast, an error with script and the update  date is 1969?

How do I correct this,  I am guessing that the error is in the noaa site sending this garbage causing an error. Now the weather below it is fine as far as images.  I do need then to change this some how or am I the only one of the planet seeing this. 
http://www.desmoinesweather.org/weather28/index.php?p=wsForecast&lang=en#data-area
Davis VP2 Plus; 24h  FARS;  Soil Moisture/Temp Station;Weatherlink ;
https://www.desmoinesweather.org

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1230
    • Support site Leuven Template and scripts
Re: Forecast Leuven this morning is in error
« Reply #1 on: February 15, 2017, 09:19:02 AM »
This morning I noticed the template is showing the attached for the forecast, an error with script and the update  date is 1969?

How do I correct this,  I am guessing that the error is in the noaa site sending this garbage causing an error. Now the weather below it is fine as far as images.  I do need then to change this some how or am I the only one of the planet seeing this. 
http://www.desmoinesweather.org/weather28/index.php?p=wsForecast&lang=en#data-area
Thank you for bringing this error to my attention.   
This affects USA customers using the Leuven-Template scripts for the NWS extensive forecast.
other forecasts: Metno Yrno WU and 1page-NWS are still working OK.

Cause of these errors: The http://graphical.weather.gov/xml/SOAP_server/   is moved to https://
I adapted the script, new version available at the support site http://support.leuven-template.eu/

These kind of errors will happen more often as some data and icons are still only available on http but will move to https also in the near future.
Sorry for that, but the scripts will always be adapted when NWS data is moved.

Wim
« Last Edit: February 15, 2017, 09:22:37 AM by wvdkuil »
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 219
    • Lightning Weather
Re: Forecast Leuven this morning is in error
« Reply #2 on: February 15, 2017, 09:46:12 AM »
This morning I noticed the template is showing the attached for the forecast, an error with script and the update  date is 1969?

How do I correct this,  I am guessing that the error is in the noaa site sending this garbage causing an error. Now the weather below it is fine as far as images.  I do need then to change this some how or am I the only one of the planet seeing this. 
http://www.desmoinesweather.org/weather28/index.php?p=wsForecast&lang=en#data-area
Thank you for bringing this error to my attention.   
This affects USA customers using the Leuven-Template scripts for the NWS extensive forecast.
other forecasts: Metno Yrno WU and 1page-NWS are still working OK.

Cause of these errors: The http://graphical.weather.gov/xml/SOAP_server/   is moved to https://
I adapted the script, new version available at the support site http://support.leuven-template.eu/

These kind of errors will happen more often as some data and icons are still only available on http but will move to https also in the near future.
Sorry for that, but the scripts will always be adapted when NWS data is moved.

Wim
Wim,
Is there a way to set the script so it looks at http: AND https: so when a change is made by another site, it will automatically redirect?

Sent from my SM-G935R4 using Tapatalk

Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1230
    • Support site Leuven Template and scripts
Re: Forecast Leuven this morning is in error
« Reply #3 on: February 15, 2017, 09:58:03 AM »
Wim,
Is there a way to set the script so it looks at http: AND https: so when a change is made by another site, it will automatically redirect?

Sent from my SM-G935R4 using Tapatalk
Yes you can set a CURL-option "allow redirect" and when using http it will also accept the data when the site itself redirects to another site with https.

BUT as this is a major security risk, a lot of webhosting companies do not allow that and the script will fail there with a security error.

AND redirects do not remain permanently available. So after some months, maybe a few years,  the script needs to be adapted anyway.

When there is a problem with a forecast script being unavailable, there are multiple other forecast scripts available and only one setting needs to be changed for that. 

Another minor problem, the icons http://forecast.weather.gov/newimages/medium/sct.png
They are not available yet on https, or at least I can not locate them.

The big problem will be the warnings. But that is for later this month.

Wim
« Last Edit: February 15, 2017, 10:02:37 AM by wvdkuil »
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 323
    • http://www.TylerTexasWeather.Com
Re: Forecast Leuven this morning is in error
« Reply #4 on: February 20, 2017, 12:22:13 PM »
Wim,

I'm getting the same error that shows on your demo site: http://www.weerstation-leuven.be/northam/noaafct/demo.php?blue&lang=en

I suspect it's either https or changed site related at the NWS. I didn't know if you were aware of this script not working.

Thanks,

Steve

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8567
    • Meteotemplate
Re: Forecast Leuven this morning is in error
« Reply #5 on: February 20, 2017, 12:31:21 PM »
Hi Steve,¨
when you try the URL it is trying to load, it automatically redirects to https, most likely the script is not redirected, so you could try changing the http to https, if it uses file_get_contents I would rather use cURL to do it, which is safer. But Im sure Wim will know the answer better than me.

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 323
    • http://www.TylerTexasWeather.Com
Re: Forecast Leuven this morning is in error
« Reply #6 on: February 20, 2017, 12:38:02 PM »
Jachym,

I prefer not go diggin through Wim's code and accidentally mess something up. I will just await his reply.

Steve

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8567
    • Meteotemplate
Re: Forecast Leuven this morning is in error
« Reply #7 on: February 20, 2017, 12:48:04 PM »
Interesting is that I dont see the error any more, it disappeared... look at the link you posted

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1230
    • Support site Leuven Template and scripts
Re: Forecast Leuven this morning is in error
« Reply #8 on: February 20, 2017, 12:48:18 PM »
Wim,

I'm getting the same error that shows on your demo site: http://www.weerstation-leuven.be/northam/noaafct/demo.php?blue&lang=en

I suspect it's either https or changed site related at the NWS. I didn't know if you were aware of this script not working.

Thanks,

Steve
Can you please always supply the link = URL  to the page with this script?
I have no database with template users, neither for stand-alone/saratoga script users.

I found your page and the script as run in an iFrame.
http://www.tylertexasweather.com/noaafct/noaaDigitalGenerateHtml.php?sce=view

Only change this line as other lines with http://  should not be changed NOW, they do no work with https:// YET.

script noaaDigitalGenerateHtml.php line-number around (depends on version) 639

    0 => 'http://graphical.weather.gov/xml/SOAP_server/ndfdXMLclient.php?whichClient=NDFDgen&lat=',

change to
    0 => 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLclient.php?whichClient=NDFDgen&lat=‘,

Thanks for pointing me to the demo site, i adapted the script there also,

Wim

@Jáchym
Thanks for helping out, and yes it is always CURL.
But as a lot ( at least here in my part of the world) of webhosters do not allow redirects, I try to not use them.

Wim
« Last Edit: February 20, 2017, 01:06:30 PM by wvdkuil »
Vantage VUE with a WLIP connected to a Meteobridge used for https://weer.sluispark.be/
Same VUE+WLIP uploads to WL.com(2.0)  used for https://sluispark.be/weather28/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/
Envoy with a WLIP uploads to WL.com(1.0) as a backup / test for the same site.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8567
    • Meteotemplate
Re: Forecast Leuven this morning is in error
« Reply #9 on: February 20, 2017, 12:53:51 PM »
Hi Wim,
interestingly, everything is ok now on your site, but when he posted this your page was showing fatal error and no data

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 323
    • http://www.TylerTexasWeather.Com
Re: Forecast Leuven this morning is in error
« Reply #10 on: February 20, 2017, 01:10:47 PM »

Only change this line as other lines with http://  should not be changed NOW, they do no work with https:// YET.

script noaaDigitalGenerateHtml.php line-number around (depends on version) 639

    0 => 'http://graphical.weather.gov/xml/SOAP_server/ndfdXMLclient.php?whichClient=NDFDgen&lat=',

change to
    0 => 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLclient.php?whichClient=NDFDgen&lat=‘,

Thanks for pointing me to the demo site, i adapted the script there also,

Wim

Wim,

That fixed it. Thanks very much for your quick response.

Steve