warningsau

Post Reply
tpweather
Observer
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

Post by tpweather » Thu Sep 13, 2018 12:21 pm

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
Last edited by tpweather on Sat Sep 15, 2018 1:52 am, edited 1 time in total.
Image

User avatar
John B
Forecaster
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

Post by John B » Fri Sep 14, 2018 3:23 am

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.

tpweather
Observer
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

Post by tpweather » Sat Sep 15, 2018 1:56 am

Thanks John. I have fixed the link.
Image

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: warningsau

Post by stuee » Sat Sep 15, 2018 11:47 pm

Hi.
Im having this same issue on both the blocks, how did you fix it?

Thanks

User avatar
John B
Forecaster
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

Post by John B » Sun Sep 16, 2018 7:02 am

No, stuee, Chris merely mentioned that the incorrect link to his site had been adjusted.

tpweather
Observer
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

Post by tpweather » Mon Oct 08, 2018 2:33 am

Hi All
Anyone figure this out yet? I've tried playing around with it no luck.
Cheers
Chris
Image

Aussie Susan
Observer
Observer
Posts: 11
Joined: Thu Jan 18, 2018 4:33 am
Station model: WH1001
Software: WeeWx

Re: warningsau

Post by Aussie Susan » Tue Oct 23, 2018 2:54 am

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:

Code: Select all

$html = file_get_context($url);
to be:

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 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

tpweather
Observer
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

Post by tpweather » Sat Nov 03, 2018 12:06 pm

Thanks Susan, but where do I find currentAustraliaBlockLoader.php? It's not in the warningsAU block folder
Image

Aussie Susan
Observer
Observer
Posts: 11
Joined: Thu Jan 18, 2018 4:33 am
Station model: WH1001
Software: WeeWx

Re: warningsau

Post by Aussie Susan » Thu Nov 29, 2018 9:33 pm

@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

tpweather
Observer
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

Post by tpweather » Fri Nov 30, 2018 1:52 pm

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?? :D
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: warningsau

Post by Jachym » Sun Dec 02, 2018 5:41 pm

It looks like several AU blocks stopped functioning due to changes in data source

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: warningsau

Post by Jachym » Sun Dec 09, 2018 8:45 am

Update available for both current conditions and warnings

User avatar
John B
Forecaster
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

Post by John B » Sun Dec 09, 2018 10:27 pm

Thanks, Jáchym, your time and trouble are very much appreciated. 8-)

tpweather
Observer
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

Post by tpweather » Mon Dec 31, 2018 7:29 am

many thanks Jachym. Happy New Year
Image

Post Reply