Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.12 (build 3088) - 10 July 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this link to Download the Software (Cumulus MX / Cumulus 1 and other related items). Software

BT's Sager PHP Script V2 - For Cumulus

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

Moderator: daj

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

OK ....

Let's check you haven't got a problem with cURL

Upload this to where your index page is located and give it call and see what happens.

curltest.zip

It should do two calls for METAR. 1st 'hard-coded' YSCB, the 2nd using value from bt-sager-cu.php

Something like: http://beteljuice.co.uk/sager/curltest.php (BTW using cu file you posted - no problem)

and the forecast from that file: http://beteljuice.co.uk/sager/sager_test.php
You do not have the required permissions to view the files attached to this post.
Last edited by beteljuice on Mon 18 Mar 2019 10:29 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
kocher
Posts: 181
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: BT's Sager PHP Script V2 - For Cumulus

Post by kocher »

Greetings to all

I thank BetelJuice for publishing their ingenious creations.

I have installed the BT-Sager script, but I can not get it to work.

Here is the link to the file:

http://kocher.es/Sager-Forecast/sager_test.php


Saludos desde San Sebastian
Image

User avatar
PaulMy
Posts: 2179
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 Sager PHP Script V2 - For Cumulus

Post by PaulMy »

@paul
I can't see any evidence they were included in the first place. Have you moved things around recently ?
Yes, have included both and not made any change recently. The Davis VP2 is now back to display. However, after a bit of investigation I have found I am using the original BT-sager version on komokaweather and Brian's (BCJKiwi) sagerCW version on my Saratoga and am not using the beteljuice V2 version so will post in another thread if needed.

Enjoy,
Paul

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

@kocher

Hi ....

Interesting, at first glance you seem to have the same problem as uncle_bob ...

Edit: Investigations continue, although I don't think there is anything the beteljuice has changed that would cause this.

Code: Select all

Notice: Undefined variable: w6 in H:\webspace\hostings\kocher.es\hosting\www\Sager-Forecast\sager_test.php on line 41
w6 = 115°

Notice: Undefined variable: wd in H:\webspace\hostings\kocher.es\hosting\www\Sager-Forecast\sager_test.php on line 42
wd = 0° 
Undefined, but then prints the value ??

Edit: Ahh, there should two values o/p !

OK. It's looking like same thing uncle_bob has, but what is it ?

Could you please try the curltest file I posted above ...
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
kocher
Posts: 181
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: BT's Sager PHP Script V2 - For Cumulus

Post by kocher »

Good evening, BetelJuice

Here is the link address:

http://kocher.es/Sager-Forecast/curltest.php
Image

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

Thank you Kocher - now I am totally confused :lol:

... could you and / or uncle_bob please try this replacement file ?

Edit: redundant file removed
Last edited by beteljuice on Tue 19 Mar 2019 4:23 am, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

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

Re: BT's Sager PHP Script V2 - For Cumulus

Post by uncle_bob »

Hi BettleJuice,
I installed the new wc file. Still the same issue.
Then I installed the curltest, took a few seconds to come back with this so it looks like it's working...

Code: Select all

cURL TEST

cURL is installed on this server

Running tests ...

Hard coded YSCB:

HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 02:19:52 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Last-Modified: Tue, 19 Mar 2019 02:07:17 GMT
ETag: "487aa86-6e-58468f6e938aa"
Accept-Ranges: bytes
Content-Length: 110
Vary: Accept-Encoding
Content-Type: text/plain; charset=UTF-8
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

2019/03/19 02:00 YSCB 190200Z AUTO 11010KT 9999 // SCT035 BKN044 24/14 Q1015 INTER 0400/0500 5000 SHRA BKN020

From bt-sager-cu: YSCB:

HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 02:19:53 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Last-Modified: Tue, 19 Mar 2019 02:07:17 GMT
ETag: "487aa86-6e-58468f6e938aa"
Accept-Ranges: bytes
Content-Length: 110
Vary: Accept-Encoding
Content-Type: text/plain; charset=UTF-8
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

2019/03/19 02:00 YSCB 190200Z AUTO 11010KT 9999 // SCT035 BKN044 24/14 Q1015 INTER 0400/0500 5000 SHRA BKN020 
Sorry to be such a PITA with this, but thanks for the all the help!
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

@uncle_bob

That's not the new wc file that's running ...

It's the d*mn program that's being a PITA - don't worry ..
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

Hmm ... I have a lurking suspicion ...

Try this:
Edit: redundant file removed
Last edited by beteljuice on Tue 19 Mar 2019 4:38 pm, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

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

Re: BT's Sager PHP Script V2 - For Cumulus

Post by uncle_bob »

Yet Another WC file loaded up. Still broken :/
Code view:

Code: Select all

<!-- bt-sager-wc loaded -->
<!-- server running PHP ver 5.5.19 -->
<!-- cURL is installed OK -->
<!-- Loading bt-sager-cu > success -->
<!-- Looking for language info -->
<!-- Trying to load bt-sager-en.php -->
<!-- Language file loaded .... -->
<!-- getting METAR for YSCB -->
<!-- METAR FAIL or corrupted [] -->
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

This is truly ridiculous - try this one (but this one shouldn't work !)

Edit: redundant file removed
Last edited by beteljuice on Tue 19 Mar 2019 4:38 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

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

Re: BT's Sager PHP Script V2 - For Cumulus

Post by uncle_bob »

Here's the sauce view :)

Code: Select all

<!-- bt-sager-wc loaded -->
<!-- server running PHP ver 5.5.19 -->
<!-- cURL is installed OK -->
<!-- Loading bt-sager-cu > success -->
<!-- Looking for language info -->
<!-- Trying to load bt-sager-en.php -->
<!-- Language file loaded .... -->
<!-- getting METAR for YSCB -->
<!-- METAR FAIL or corrupted [] -->
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>769</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>771</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>773</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>775</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>777</b><br />
<br />
<b>Notice</b>:  Undefined variable: d4 in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>782</b><br />
I don't believe it's any thing you've done (or BT for that matter) but something messed up on my system.
BTW, I am commenting out the bottom line of the file, as per the instructions.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
beteljuice
Posts: 2951
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: BT's Sager PHP Script V2 - For Cumulus

Post by beteljuice »

OK, you've already downloaded it :lol:

Here's yet another if that doesn't work, fingers crossed ....

bt-sager-wc.zip
You do not have the required permissions to view the files attached to this post.
Image
......................Imagine, what you will KNOW tomorrow !

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

Re: BT's Sager PHP Script V2 - For Cumulus

Post by uncle_bob »

Hey, it's working!! :)
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

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

Re: BT's Sager PHP Script V2 - For Cumulus

Post by uncle_bob »

Sager forecast:
Rain and turning cooler then improvement likely in 24 hours; Storm to Violent Storm (89-117 km/h) South or Southeast winds becoming South or Southwest winds.

BoM forecast:
Shower or two.
Chance of any rain: 60%
Partly cloudy. Medium (60%) chance of showers, becoming less likely later tonight. The chance of a thunderstorm. Light winds.

Sager might be a little extreme, we'll see :)
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

Post Reply