EC FORECAST
-
iquebecs58
- Observer

- Posts: 11
- Joined: Mon Oct 02, 2017 10:14 am
- Location: St-Alphonse
- Station model: Davis Pro 2
- Software: Weather Display
- Contact:
EC FORECAST
Hi,
since the last week, the EC forecast not working anymore...
Thanks.
Steven
since the last week, the EC forecast not working anymore...
Thanks.
Steven
Météorologue amateur/ amateur meteorologist: Steven Villeneuve
St-Alphonse-de-Caplan, Gaspésie
Station WU: IQUEBECS58
CoCoRaHS : CAN-QC-5
CWOP : E1397
Facebook/Twitter : Météo St-Alphonse
Site: www.meteostalphonse.com
Site foudre/Lightning site :www.meteostalphonse.com/nexstorm/StormS ... tation.htm
Courriel/Email: info@meteostalphonse.com
St-Alphonse-de-Caplan, Gaspésie
Station WU: IQUEBECS58
CoCoRaHS : CAN-QC-5
CWOP : E1397
Facebook/Twitter : Météo St-Alphonse
Site: www.meteostalphonse.com
Site foudre/Lightning site :www.meteostalphonse.com/nexstorm/StormS ... tation.htm
Courriel/Email: info@meteostalphonse.com
-
BlueBear
- Forecaster

- Posts: 101
- Joined: Sun Aug 20, 2017 1:04 pm
- Location: Sanford, Manitoba, Canada
- Station model: Davis VP2
- Software: WeeWx
- Contact:
Re: EC FORECAST
I had the same problem, go into the settings file for the ecForecast block and change from http://etc to https://etc
Should then work!
Bill
Should then work!
Bill
-
iquebecs58
- Observer

- Posts: 11
- Joined: Mon Oct 02, 2017 10:14 am
- Location: St-Alphonse
- Station model: Davis Pro 2
- Software: Weather Display
- Contact:
Re: EC FORECAST
I've try that Bill and still the same result 
Météorologue amateur/ amateur meteorologist: Steven Villeneuve
St-Alphonse-de-Caplan, Gaspésie
Station WU: IQUEBECS58
CoCoRaHS : CAN-QC-5
CWOP : E1397
Facebook/Twitter : Météo St-Alphonse
Site: www.meteostalphonse.com
Site foudre/Lightning site :www.meteostalphonse.com/nexstorm/StormS ... tation.htm
Courriel/Email: info@meteostalphonse.com
St-Alphonse-de-Caplan, Gaspésie
Station WU: IQUEBECS58
CoCoRaHS : CAN-QC-5
CWOP : E1397
Facebook/Twitter : Météo St-Alphonse
Site: www.meteostalphonse.com
Site foudre/Lightning site :www.meteostalphonse.com/nexstorm/StormS ... tation.htm
Courriel/Email: info@meteostalphonse.com
-
BlueBear
- Forecaster

- Posts: 101
- Joined: Sun Aug 20, 2017 1:04 pm
- Location: Sanford, Manitoba, Canada
- Station model: Davis VP2
- Software: WeeWx
- Contact:
Re: EC FORECAST
Did you clear the cache?
If not give it a hour or so and see if it changes!
If not give it a hour or so and see if it changes!
-
iquebecs58
- Observer

- Posts: 11
- Joined: Mon Oct 02, 2017 10:14 am
- Location: St-Alphonse
- Station model: Davis Pro 2
- Software: Weather Display
- Contact:
Re: EC FORECAST
Hmmmmm, Empty the cache, updated to the 2.1 and still not working
Météorologue amateur/ amateur meteorologist: Steven Villeneuve
St-Alphonse-de-Caplan, Gaspésie
Station WU: IQUEBECS58
CoCoRaHS : CAN-QC-5
CWOP : E1397
Facebook/Twitter : Météo St-Alphonse
Site: www.meteostalphonse.com
Site foudre/Lightning site :www.meteostalphonse.com/nexstorm/StormS ... tation.htm
Courriel/Email: info@meteostalphonse.com
St-Alphonse-de-Caplan, Gaspésie
Station WU: IQUEBECS58
CoCoRaHS : CAN-QC-5
CWOP : E1397
Facebook/Twitter : Météo St-Alphonse
Site: www.meteostalphonse.com
Site foudre/Lightning site :www.meteostalphonse.com/nexstorm/StormS ... tation.htm
Courriel/Email: info@meteostalphonse.com
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
Again.... I think EC is sort of playing a game with developers. They obviously dont want anyone using their data so they change the format every few months. I posted about this in August when they changed it again. 3 months forward and here we go again...
- PaulMy
- Observer

- Posts: 30
- Joined: Mon Aug 21, 2017 12:48 pm
- Location: Komoka, Ontario Canada
- Station model: Davis VP2 Wireless 6152
- Software: Cumulus
- Contact:
Re: EC FORECAST
I have updated to v2.3 and changed the url to
https://meteo.gc.ca/city/pages/on-137_metric_f.html and https://weather.gc.ca/city/pages/on-137_metric_e.html
also cleared the Cache.
Unfortunately the block does not work http://www.komokaweather.com/j-template/indexMobile.php
Paul
https://meteo.gc.ca/city/pages/on-137_metric_f.html and https://weather.gc.ca/city/pages/on-137_metric_e.html
also cleared the Cache.
Unfortunately the block does not work http://www.komokaweather.com/j-template/indexMobile.php
Paul
-
BlueBear
- Forecaster

- Posts: 101
- Joined: Sun Aug 20, 2017 1:04 pm
- Location: Sanford, Manitoba, Canada
- Station model: Davis VP2
- Software: WeeWx
- Contact:
Re: EC FORECAST
Strange I updated this morning and it's working here
http://www.sanfordweather.com/meteo/indexDesktop.php
Bill
http://www.sanfordweather.com/meteo/indexDesktop.php
Bill
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
Hi Paul,PaulMy wrote: ↑Mon Nov 27, 2017 5:40 pm I have updated to v2.3 and changed the url to
https://meteo.gc.ca/city/pages/on-137_metric_f.html and https://weather.gc.ca/city/pages/on-137_metric_e.html
also cleared the Cache.
Unfortunately the block does not work http://www.komokaweather.com/j-template/indexMobile.php
Paul
go to the block folder via FTP, delete the content of the Cache folder. Reload your page and then look inside the file created in the cache folder, and post here the content of this file
- PaulMy
- Observer

- Posts: 30
- Joined: Mon Aug 21, 2017 12:48 pm
- Location: Komoka, Ontario Canada
- Station model: Davis VP2 Wireless 6152
- Software: Cumulus
- Contact:
Re: EC FORECAST
Hi Jachym, sorry, been away for a couple of hours...
I have deleted cache, load page, new cache created but it was empty.
Permissions where at 705, so changed all to 777, removed cache, reload and cache was saved but still empty. Have redone a couple of times with the same result.
Paul
I have deleted cache, load page, new cache created but it was empty.
Permissions where at 705, so changed all to 777, removed cache, reload and cache was saved but still empty. Have redone a couple of times with the same result.
Paul
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
Hmm.... did you ever have problems with loading data from EC or loading data from HTTPS sites? One of the changes now was that they migrated to https. I remember some Canadian users had problems loading data from EC (yes absurd I know). But I cant remember if it was you in particular
- PaulMy
- Observer

- Posts: 30
- Joined: Mon Aug 21, 2017 12:48 pm
- Location: Komoka, Ontario Canada
- Station model: Davis VP2 Wireless 6152
- Software: Cumulus
- Contact:
Re: EC FORECAST
Hi Jaquim,
Going back to February 2016 v1.0, there was some problem with EC Forecast for me and other Canadian users, which you resolved. Don't recall exactly, but doubt it was https at that time. I have not had any issue since that time. Not aware of any other https issues, https://weather.gc.ca/city/pages/on-137_metric_e.html loads fine for me me.
Paul
Going back to February 2016 v1.0, there was some problem with EC Forecast for me and other Canadian users, which you resolved. Don't recall exactly, but doubt it was https at that time. I have not had any issue since that time. Not aware of any other https issues, https://weather.gc.ca/city/pages/on-137_metric_e.html loads fine for me me.
Paul
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
Hmmm
the function used by this script tries both methods (file_get_contents and cURL). It tries one and if it fails, it tries the other one.
Before trying to find any issues with the script we need to determine whether it is loading something from EC or not at all, in which case Im afraid there wont be much we can do.
Create a script "test.php" and upload it to your template root folder (next to indexDesktop.php). Then try running it in a browser and see if you get any output.
The script should have the following code:
the function used by this script tries both methods (file_get_contents and cURL). It tries one and if it fails, it tries the other one.
Before trying to find any issues with the script we need to determine whether it is loading something from EC or not at all, in which case Im afraid there wont be much we can do.
Create a script "test.php" and upload it to your template root folder (next to indexDesktop.php). Then try running it in a browser and see if you get any output.
The script should have the following code:
Code: Select all
require("scripts/functions.php");
$data = loadContent("https://weather.gc.ca/city/pages/on-137_metric_e.html");
echo "Loaded data:<br>".$data;
-
BlueBear
- Forecaster

- Posts: 101
- Joined: Sun Aug 20, 2017 1:04 pm
- Location: Sanford, Manitoba, Canada
- Station model: Davis VP2
- Software: WeeWx
- Contact:
Re: EC FORECAST
I wonder if it isn't a hosting issue?
The ec forecast block runs fine here and I noticed that the currentCA block isn't working on Paul page either but it does here?????
http://www.sanfordweather.com/meteo/indexDesktop.php
Jachym, I tried to run the test script you show above but could not get it to work, suspect it's just a code snippet and I'm too dumb this morning to figure out what's missing!
The ec forecast block runs fine here and I noticed that the currentCA block isn't working on Paul page either but it does here?????
http://www.sanfordweather.com/meteo/indexDesktop.php
Jachym, I tried to run the test script you show above but could not get it to work, suspect it's just a code snippet and I'm too dumb this morning to figure out what's missing!
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
Sorry, I forgot, the above code is a PHP code so it needs to be insed a php tag like this
<?php
....code....
?>
<?php
....code....
?>
-
BlueBear
- Forecaster

- Posts: 101
- Joined: Sun Aug 20, 2017 1:04 pm
- Location: Sanford, Manitoba, Canada
- Station model: Davis VP2
- Software: WeeWx
- Contact:
Re: EC FORECAST
Interesting this is the result I get
Error, contact the developer.
Here is the contents of my test.php file
<?php
require("scripts/functions.php");
$data = loadContent("https://weather.gc.ca/city/pages/on-137_metric_e.html");
echo "Loaded data:<br>".$data;
?>
Error, contact the developer.
Here is the contents of my test.php file
<?php
require("scripts/functions.php");
$data = loadContent("https://weather.gc.ca/city/pages/on-137_metric_e.html");
echo "Loaded data:<br>".$data;
?>
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
ok I see, yes, that´s because it is not loading the footer.
Then use this instead
Then use this instead
Code: Select all
<?php
$data = loadContent("https://weather.gc.ca/city/pages/on-137_metric_e.html",10);
echo "Loaded data:<br>".$data;
function loadContent($url,$timeout){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36");
$data = curl_exec($ch);
curl_close($ch);
if($data==""){
$data = file_get_contents($url);
}
return $data;
}
?>
-
BlueBear
- Forecaster

- Posts: 101
- Joined: Sun Aug 20, 2017 1:04 pm
- Location: Sanford, Manitoba, Canada
- Station model: Davis VP2
- Software: WeeWx
- Contact:
Re: EC FORECAST
That works see: http://www.sanfordweather.com/meteo/test.php
now to see if Paul gets the same resultt
now to see if Paul gets the same resultt
- PaulMy
- Observer

- Posts: 30
- Joined: Mon Aug 21, 2017 12:48 pm
- Location: Komoka, Ontario Canada
- Station model: Davis VP2 Wireless 6152
- Software: Cumulus
- Contact:
Re: EC FORECAST
I got this result:
PaulWarning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/content/96/5379896/html/j-template/test.php on line 17
Warning: file_get_contents(): Failed to enable crypto in /home/content/96/5379896/html/j-template/test.php on line 17
Warning: file_get_contents(https://weather.gc.ca/city/pages/on-137_metric_e.html): failed to open stream: operation failed in /home/content/96/5379896/html/j-template/test.php on line 17
Loaded data:
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: EC FORECAST
OK, so this looks like communication problem, Im afraid I will not be able to help you with this Paul
-
iquebecs58
- Observer

- Posts: 11
- Joined: Mon Oct 02, 2017 10:14 am
- Location: St-Alphonse
- Station model: Davis Pro 2
- Software: Weather Display
- Contact:
Re: EC FORECAST
Just not the EC website that they are changing the format. They do so with others Government's Canada website.
I guess they are scared that the weather site could be hacked...