warningsau
-
tpweather
- Observer

- Posts: 25
- Joined: Sat Apr 07, 2018 12:52 pm
- Location: Tom Price WA
- Station model: Davis Vantage Pro 2
- Software: Weather Display
- Contact:
warningsau
Hi All
Anyone else who is warningsau having errors?
Mine is giving an error which can be viewed here:
www.tpweather.com.au
Many thanks in advance.
Chris
Anyone else who is warningsau having errors?
Mine is giving an error which can be viewed here:
www.tpweather.com.au
Many thanks in advance.
Chris
Last edited by tpweather on Sat Sep 15, 2018 1:52 am, edited 1 time in total.
- John B
- Forecaster

- Posts: 211
- Joined: Sun Aug 20, 2017 11:59 pm
- Location: Blaxland, N.S.W., Australia
- Station model: La Crosse WS2355
- Software: Weather Display
- Contact:
Re: warningsau
Yes, Chris..
The Australian conditions block, too.
Both return the 'Data unavailable' message.
AS it happens they are both in the same menu block. I don't think that's the problem as another block is not affected.
I suspect that it's either a BoM problem or it has altered some of its data formats.
Regards,
John
P.S. - The link you posted does not work.
The Australian conditions block, too.
Both return the 'Data unavailable' message.
AS it happens they are both in the same menu block. I don't think that's the problem as another block is not affected.
I suspect that it's either a BoM problem or it has altered some of its data formats.
Regards,
John
P.S. - The link you posted does not work.
-
stuee
- Observer

- Posts: 32
- Joined: Fri Sep 29, 2017 6:54 am
- Station model: OCwmr300
- Software: WeatherDisplay
Re: warningsau
Hi.
Im having this same issue on both the blocks, how did you fix it?
Thanks
Im having this same issue on both the blocks, how did you fix it?
Thanks
- John B
- Forecaster

- Posts: 211
- Joined: Sun Aug 20, 2017 11:59 pm
- Location: Blaxland, N.S.W., Australia
- Station model: La Crosse WS2355
- Software: Weather Display
- Contact:
Re: warningsau
No, stuee, Chris merely mentioned that the incorrect link to his site had been adjusted.
-
tpweather
- Observer

- Posts: 25
- Joined: Sat Apr 07, 2018 12:52 pm
- Location: Tom Price WA
- Station model: Davis Vantage Pro 2
- Software: Weather Display
- Contact:
Re: warningsau
Hi All
Anyone figure this out yet? I've tried playing around with it no luck.
Cheers
Chris
Anyone figure this out yet? I've tried playing around with it no luck.
Cheers
Chris
-
Aussie Susan
- Observer

- Posts: 11
- Joined: Thu Jan 18, 2018 4:33 am
- Station model: WH1001
- Software: WeeWx
Re: warningsau
I had a very similar problem with one of the skins for weewx - it turns out that the BoM requires a "User-Agent" entry in the HTTP header that retrieves the data.
NOTE: USE THE FOLLOWING AT YOUR OWN RISK
I edited the 'currentAustraliaBlockLoader.php' file at around line 64 to change:
to be:
I have no idea if you need all that text in the 'User-Agent' line but I copied that from somewhere a while ago and it works. Experiment if you like.
I suggest that you backup the file before editing it.
Also the location of the file probably depends on where you installed Meteotemplate but for me it was in the subdirectory meteotemplate/homepage/blocks/currentAustralia.
Susan
NOTE: USE THE FOLLOWING AT YOUR OWN RISK
I edited the 'currentAustraliaBlockLoader.php' file at around line 64 to change:
Code: Select all
$html = file_get_context($url);
Code: Select all
$opts = [
"http" => [
"method" => "GET",
"header" => "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
]
];
$context = stream_context_create($opts);
$html = file_get_contents($url, false, $context);
I suggest that you backup the file before editing it.
Also the location of the file probably depends on where you installed Meteotemplate but for me it was in the subdirectory meteotemplate/homepage/blocks/currentAustralia.
Susan
-
tpweather
- Observer

- Posts: 25
- Joined: Sat Apr 07, 2018 12:52 pm
- Location: Tom Price WA
- Station model: Davis Vantage Pro 2
- Software: Weather Display
- Contact:
Re: warningsau
Thanks Susan, but where do I find currentAustraliaBlockLoader.php? It's not in the warningsAU block folder
-
Aussie Susan
- Observer

- Posts: 11
- Joined: Thu Jan 18, 2018 4:33 am
- Station model: WH1001
- Software: WeeWx
Re: warningsau
@tpweather - sorry but I've only just seen your message.
I gave the location where the file was on my system. I suggest that you grep for 'file_get_contents' and see which one(s) are in an appropriate place and probably look something like '"$html = file_get_contents($url)".
By the way, I see in my post above I incorrectly typed the code I altered: it was not 'file_get_context' but 'file_get_contents'. The replacement code is correct though.
Susan
I gave the location where the file was on my system. I suggest that you grep for 'file_get_contents' and see which one(s) are in an appropriate place and probably look something like '"$html = file_get_contents($url)".
By the way, I see in my post above I incorrectly typed the code I altered: it was not 'file_get_context' but 'file_get_contents'. The replacement code is correct though.
Susan
-
tpweather
- Observer

- Posts: 25
- Joined: Sat Apr 07, 2018 12:52 pm
- Location: Tom Price WA
- Station model: Davis Vantage Pro 2
- Software: Weather Display
- Contact:
Re: warningsau
Yup thanks Susan. I realise that now. sorry, I am talking about the warningsAU block. I do not use the Australia
Current Conditions block, hence my confusion! I'm really keen to get the warningsAU block up and running if you have any suggestions??
Current Conditions block, hence my confusion! I'm really keen to get the warningsAU block up and running if you have any suggestions??
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: warningsau
It looks like several AU blocks stopped functioning due to changes in data source
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: warningsau
Update available for both current conditions and warnings