Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.0.0 build 3050 - 1 May 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

BT's Global Sager Weathercaster PHP Scripts For Cumulus

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
odintheterrible
Posts: 54
Joined: Wed 16 Jan 2013 8:18 am
Weather Station: Aercus WS3083 Wireless
Operating System: Windows 10 64-bit
Location: Torre-Pacheco, Murcia, Spain

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by odintheterrible » Sat 09 Feb 2019 7:11 pm

Hi,
Mine's been like that too for a couple of days. I thought it was because our local airport has now closed and revert to sole use by the Spanish Airforce and so now doesn't have an ICAO code. I edited the code in the php file to use the code for our new regional airport, but it didn't make any difference ... so, I too am at a loss to explain what is going on.
For the time being I've reverted to the Cumulus forecast.
I hope it can be sorted. :roll:
"Qui Custodit Ipsos Custodes ? ..."

Duct Tape is like 'The Force' ... it has a 'Light Side' AND a 'Dark Side' and it binds the Universe together !

User avatar
mcrossley
Posts: 5572
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by mcrossley » Sat 09 Feb 2019 8:20 pm

M1DUL wrote:
Sat 09 Feb 2019 6:54 pm
Hi All,
I have just had a look at my weather website and I noticed that my weather forecast say's Forecast Unavailable, I have had a look at other peoples website and there's is doing the same.
Looks like it is working again.

M1DUL
Posts: 269
Joined: Wed 31 Dec 2008 1:56 pm
Weather Station: Vantage Pro2 Plus Daytime FARS
Operating System: Windows 10 Pro 64bit Build 10586
Location: Poole, Dorset UK
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by M1DUL » Sat 09 Feb 2019 9:04 pm

mcrossley wrote:
Sat 09 Feb 2019 8:20 pm
Looks like it is working again.
That is strange very, It is still not working for me.
Mike

OS : Windows 10 Professionnal
Weather Station : Davis Vantage PRO2 Plus Daytime Fars
Cumulus MX version 3.00 b 3050
http://branksomeweather.co.uk

User avatar
PaulMy
Posts: 1891
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by PaulMy » Sat 09 Feb 2019 9:16 pm

Mine has not worked for a few days, and still not http://www.komokaweather.com/weather/bt-sager.php

Paul

M1DUL
Posts: 269
Joined: Wed 31 Dec 2008 1:56 pm
Weather Station: Vantage Pro2 Plus Daytime FARS
Operating System: Windows 10 Pro 64bit Build 10586
Location: Poole, Dorset UK
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by M1DUL » Sat 09 Feb 2019 9:32 pm

M1DUL wrote:
Sat 09 Feb 2019 9:04 pm
That is strange very, It is still not working for me.
Mine is now working again too. :)
Mike

OS : Windows 10 Professionnal
Weather Station : Davis Vantage PRO2 Plus Daytime Fars
Cumulus MX version 3.00 b 3050
http://branksomeweather.co.uk

User avatar
beteljuice
Posts: 2633
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice » Sat 09 Feb 2019 10:01 pm

None of those links are currently giving a forecast to me ...

Is there something changed in the METAR look-ups recently, and would that prevent a forecast ?
Image
......................Imagine, what you will KNOW tomorrow !

M1DUL
Posts: 269
Joined: Wed 31 Dec 2008 1:56 pm
Weather Station: Vantage Pro2 Plus Daytime FARS
Operating System: Windows 10 Pro 64bit Build 10586
Location: Poole, Dorset UK
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by M1DUL » Sat 09 Feb 2019 10:10 pm

beteljuice wrote:
Sat 09 Feb 2019 10:01 pm
None of those links are currently giving a forecast to me ...

Is there something changed in the METAR look-ups recently, and would that prevent a forecast ?
Mine has now stoped again it is all very stragine. it was working now it is not. :(
Mike

OS : Windows 10 Professionnal
Weather Station : Davis Vantage PRO2 Plus Daytime Fars
Cumulus MX version 3.00 b 3050
http://branksomeweather.co.uk

User avatar
beteljuice
Posts: 2633
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice » Sat 09 Feb 2019 11:23 pm

I've just looked at the code for the first time ....

The bt-sager.php is typically returning something like:

Code: Select all

12-24 Hour Forecast:
document.write ('Forecast Unavailable');Z13: Forecast Unavailable
The 'code' returned before the forecast should be in the format: A123 - so one or two entries missing from METAR decode.

In bt-sager-wc.php there is no fall-back for a METAR fail other than the general message you get.
METAR look-up has now changed subtly
Line #24

Code: Select all

curl_setopt ($metarwx, CURLOPT_URL, "http://tgftp.nws.noaa.gov/data/observations/metar/stations/$ms.TXT");
This should now be: "https://tgftp.????????????????
Last edited by beteljuice on Sun 10 Feb 2019 5:27 am, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
PaulMy
Posts: 1891
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by PaulMy » Sun 10 Feb 2019 4:50 am

Thank you, the "s" made the difference http://www.komokaweather.com/weather/bt-sager.php

Enjoy,
Paul

User avatar
odintheterrible
Posts: 54
Joined: Wed 16 Jan 2013 8:18 am
Weather Station: Aercus WS3083 Wireless
Operating System: Windows 10 64-bit
Location: Torre-Pacheco, Murcia, Spain

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by odintheterrible » Sun 10 Feb 2019 9:35 am

Yes, the secure server change in the web address was the culprit ... change made, and now it's all working again.
Thanks fly out to 'beteljuice' for the input :clap:
"Qui Custodit Ipsos Custodes ? ..."

Duct Tape is like 'The Force' ... it has a 'Light Side' AND a 'Dark Side' and it binds the Universe together !

uncle_bob
Posts: 492
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by uncle_bob » Mon 18 Feb 2019 9:02 am

Damn it, it didn't fix mine.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
beteljuice
Posts: 2633
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice » Mon 18 Feb 2019 9:12 pm

Are sure you have correctly changed the url to https: ?
currently:

Code: Select all

2019/02/18 20:30
YSCB 182030Z AUTO 34001KT 9999 // NCD 16/14 Q1008 RF00.0/000.0
So the station is up and running OK.

Back-up your bt-sager-wc.php and change the Begin METAR section to this:

Code: Select all

// Begin METAR:
	echo "<!-- getting METAR for ".$ms. " -->\n";
// METAR Report:
	$metarwx = curl_init();
	curl_setopt ($metarwx, CURLOPT_URL, "https://tgftp.nws.noaa.gov/data/observations/metar/stations/$ms.TXT");
	curl_setopt ($metarwx, CURLOPT_RETURNTRANSFER, 1);
	$metar = curl_exec ($metarwx);
	curl_close ($metarwx);

	if(!$metar || !strpos ($metar, $ms)) {
		echo "<!-- METAR FAIL or corrupted ".$metar. " -->\n";

	} else {
		echo "<!-- METAR OK -->\n";

	}

// Removes unnecessary slashes from $metar:
Then view bt-sager.php (Which is really a status / debug page)

If you have "Forecast Unavailable" view page source and you should see "<!-- comment -->" on the METAR grab.
If successful you would see:

Code: Select all

<!-- getting METAR for YSCB -->
<!-- METAR OK -->
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2633
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice » Tue 19 Feb 2019 12:13 pm

As there was a little confusion recently when there was a url change, and as there has been no activity from BTJ for some time, plus his links don't work anymore ...

The beteljuice has done a little 'house-keeping'

It would be a great shame for this excellent piece of work to fade away and it really does deserve a wider audience.

So the beteljuice has updated the the METAR urls, improved error handing and reporting, and .....
this version now has separate 'language' files and is compatible with most of your favourite templates.

To avoid confusion and make life easier for anyone who does 'language' updates I have created a separate topic here: viewtopic.php?f=14&t=17311
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
odintheterrible
Posts: 54
Joined: Wed 16 Jan 2013 8:18 am
Weather Station: Aercus WS3083 Wireless
Operating System: Windows 10 64-bit
Location: Torre-Pacheco, Murcia, Spain

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by odintheterrible » Tue 19 Feb 2019 8:17 pm

Greetings,
Looking for a bit of input/help on this one please ... I've installed/incorporated the BT-Sager script into the Cumulus web output and it seems to be working very well with quite accurate forecasts; all be it that our local weather here in our region of Spain IS VERY localised.

https://drive.google.com/open?id=1CEOJK ... 0jVdWLznn_

The 'problem' is that if I access the station data via the :8998 ported page, the forecast reads out with the standard Cumulus forecast ...

https://drive.google.com/open?id=1YVh6q ... cnDIp-Ny2m

Can anyone tell me if it is possible to correct this so that the port page (:8998) displays the BT-Sager forecast for continuity with the web output ????

Many thanks in anticipation
"Qui Custodit Ipsos Custodes ? ..."

Duct Tape is like 'The Force' ... it has a 'Light Side' AND a 'Dark Side' and it binds the Universe together !

User avatar
PaulMy
Posts: 1891
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by PaulMy » Tue 19 Feb 2019 8:51 pm

@beteljuice, why the difference between the previous BT-Justice and the new beteljuice version?
Cumulus1 /weather/bt-sager-wc.php
document.write ('Unsettled and warmer; Diminishing, or moderating somewhat if current winds are of fresh to strong velocity. Southwest or West winds.');

CumulusMX /cumulusmx/bt-sager/bt-sager-wc.php
document.write ('Unsettled and warmer; Diminishing, or moderating somewhat if current winds are of fresh to strong velocity. West or Southwest winds.');

Enjoy, ;)
Paul

Post Reply