Page 3 of 7

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

Posted: Tue 19 Mar 2019 6:08 am
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 !

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

Posted: Tue 19 Mar 2019 6:14 am
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.

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

Posted: Tue 19 Mar 2019 6:17 am
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.

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

Posted: Tue 19 Mar 2019 7:23 am
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

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

Posted: Tue 19 Mar 2019 2:01 pm
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

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

Posted: Tue 19 Mar 2019 4:16 pm
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.

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

Posted: Tue 19 Mar 2019 4:59 pm
by kocher
Thank you very much BetelJuice

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

Posted: Wed 20 Mar 2019 9:58 am
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.

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

Posted: Wed 20 Mar 2019 3:59 pm
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 !!

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

Posted: Wed 20 Mar 2019 7:49 pm
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

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

Posted: Wed 20 Mar 2019 10:13 pm
by beteljuice
@uncle_bob: Something very not right > Low > Year 548.97 hPa on 14/02/2019

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

Posted: Fri 22 Mar 2019 5:00 pm
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.

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

Posted: Fri 22 Mar 2019 11:42 pm
by uncle_bob
Great to see you're still alive and kicking BT. I was thinking the worst had happened until just now.

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

Posted: Thu 25 Jun 2020 6:53 am
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.

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

Posted: Thu 25 Jun 2020 12:43 pm
by beteljuice
Users please take note - wonderful V7+ ....

Thank You Simon :)