Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

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 drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

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: 3292
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 »

Yes - It's alive !!!!!

http://cond.power.on.net/bt-sager.php

I wish you'd upload the new sager_test.php ...

I've had to rewrite BTJ's cURL routine, there was something that your and kochers servers didn't like.

06:20 local, must think about a nap !
Last edited by beteljuice on Tue 19 Mar 2019 6:18 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
uncle_bob
Posts: 505
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 »

Thanks for all your time fixing this BetetleJuice! It's much appreciated.
What was the issue? Hopefully it fixes it for the other users too.

Interestingly the sager_test.php still doesn't work though.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
uncle_bob
Posts: 505
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 »

beteljuice wrote: Tue 19 Mar 2019 6:08 am

I wish you'd upload the new sager_test.php ...
Hmm, I thought I had the latest. Is it in the first post zip? I'll redownload it to make sure I've got it.

Edit: Yes, have a nap! Sweet dreams :)

EDIT2: Sager_test is now also working.
Last edited by uncle_bob on Tue 19 Mar 2019 7:52 am, edited 1 time in total.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
kocher
Posts: 233
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 »

This new file has solved the problem. :D :D


What was the cause of the failure?
Did it have something to do with the characters?

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

http://kocher.es/Sager-Forecast/bt-sager-wc.php



Many thanks BetelJuice
Image
User avatar
PaulMy
Posts: 3775
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

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

Post by PaulMy »

PaulMy wrote: Mon 18 Mar 2019 7:42 pm
@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
Just an update that I have my issue resolved and forecasts are back in the dashboard http://www.komokaweather.ca
No more off-topic postings from me here.

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
beteljuice
Posts: 3292
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
What was the cause of the failure?
Did it have something to do with the characters?
No ...
I've had to rewrite BTJ's cURL routine, there was something that your and kochers servers didn't like.
There was an (unknown) problem with the original code. I reworked the cURL grab routine until it worked for your versions.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
kocher
Posts: 233
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 »

Thank you very much BetelJuice
Image
uncle_bob
Posts: 505
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 »

Bad news BeetleJuice :(
It looks like it still has a problem and isn't updating. It still has the same forecast as yesterday (which was wrong too btw lol as we never got any winds or storms)
Rain and turning cooler then improvement likely in 24 hours; Storm to Violent Storm (89-117 km/h) East or Southeast winds becoming South or Southwest winds.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
beteljuice
Posts: 3292
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 »

Bad news uncle_bob ...

Your barometer is way low:

Barometric pressure (bp), barometric pressure trend (bt), and barometric unit (bu) used by your weather station:
bp = 960.79
bt = -0.25
bu = hPa

Also confirmed by your site and 'banner'

Current charts show approx 1007 hPa !!
Image
......................Imagine, what you will KNOW tomorrow !
uncle_bob
Posts: 505
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 »

You'r right! :)
I used the calibration offset in Cumulus to match what another is saying for the time being.
I'll look at the code used in the WeatherDuino after work and see if I can find what's going on.
Cheers UB
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
beteljuice
Posts: 3292
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: Something very not right > Low > Year 548.97 hPa on 14/02/2019
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

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

Post by Buford T. Justice »

I had to move on to an Ambient Weather WS-2902A weather station which Cumulus MX doesn't presently support. I hope maybe one of the programmers here can add Ambientweather.net API support to Cumulus MX:

https://www.ambientweather.com/api.html

If I was able to use Cumulus MX, I would be updating this script regularly.

I have to use Weather Display to report to places like CWOP.

I'm glad someone found that the address requires https now for some airports.
uncle_bob
Posts: 505
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 »

Great to see you're still alive and kicking BT. I was thinking the worst had happened until just now.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
ConligWX
Posts: 1570
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

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

Post by ConligWX »

just for your information bt-sager-wc.php in its current state is not compatible with PHP 7.4.7. line 173 is depricated.

Code: Select all

Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in /ttdocs/weather/cmx/bt-sager-wc.php on line 173
line 173:

Code: Select all

$pattern = "/[-+]?(" . join ($pcodes, "|") . ")/";
should be:

Code: Select all

$pattern = "/[-+]?(" . join ("|", $pcodes) . ")/";
however I still get the error message when inspecting the code

Code: Select all

Refused to execute script from 'https://www.conligwx.org/cmx/bt-sager-wc.php' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
beteljuice
Posts: 3292
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 »

Users please take note - wonderful V7+ ....

Thank You Simon :)
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply