Hi, very cool, would you share it? I found 2 versions, global and v2, there is even another much older one, I am testing and comparing it, I am using both on the same page to test them. https://www.meteoviso.es/script/bt-sager/index.phplse-cumulus wrote: ↑Sun 22 Dec 2024 1:46 pm I have not been aware of Sager-Weathercaster before, but when browsing the forum this thread got my attention. I made some small modifications to bt-sager-cu.php (webtags) and sager_test.php and integrated bt-sager-wc.php succesfully in my PWS-Suttenbrunn Cumulus Utils page under PHP 5.3.x. as entries in CUsermenu.txt. All is working fine, the Sager forecast is more accurate than the standard CMX forecast, and on top of it, I added a Sager forecast html page in CURPT style.
https://leonas.ddns.net/Wetterstation.S ... nbrunn.php
https://leonas.ddns.net/Wetterstation.S ... r_test.php
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
BT's Sager PHP Script V2 - For Cumulus
Moderator: daj
-
CarlosLSev
- Posts: 73
- Joined: Wed 03 Mar 2021 10:25 pm
- Weather Station: Waldebeck Halley
- Operating System: Raspberry Os
Re: BT's Sager PHP Script V2 - For Cumulus
- lse-cumulus
- Posts: 102
- Joined: Mon 11 Jul 2022 3:39 am
- Weather Station: Fine Offset Ecowitt
- Operating System: Windows 11
- Location: Austria
- Contact:
Re: BT's Sager PHP Script V2 - For Cumulus
my version is based on the zipfile from page-1 of this thread here: bt-sagerV2.zip; Modified bt-sager files 19/03/2019
Please find attached my modifications from 22-Dec-2024 and my CURPT style additional php output file.
Please find attached my modifications from 22-Dec-2024 and my CURPT style additional php output file.
You do not have the required permissions to view the files attached to this post.
Leo
Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html

Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html
-
CarlosLSev
- Posts: 73
- Joined: Wed 03 Mar 2021 10:25 pm
- Weather Station: Waldebeck Halley
- Operating System: Raspberry Os
- lse-cumulus
- Posts: 102
- Joined: Mon 11 Jul 2022 3:39 am
- Weather Station: Fine Offset Ecowitt
- Operating System: Windows 11
- Location: Austria
- Contact:
PHP Script V3 for combined Sager/Zambretti Weathercaster for CMX and CU
I made some further modifications to the PHP scripts from BT for Sager and Zambretti weathercast (generate ouput code and try to map to original forecast text) and then included BOTH weathercaster into one (1) html page that can be used in a user report style for Cumulus Utils or as a standalone webpage.
https://leonas.ddns.net/Wetterstation.S ... bretti.php
Please find attached the zip file with the code and a readme.txt file.
27.12.2024: updated zip file with fix in file bt-sager-wc.php for php 8.x and usage of function join/implode parameters seperator, array
https://leonas.ddns.net/Wetterstation.S ... bretti.php
Please find attached the zip file with the code and a readme.txt file.
27.12.2024: updated zip file with fix in file bt-sager-wc.php for php 8.x and usage of function join/implode parameters seperator, array
You do not have the required permissions to view the files attached to this post.
Last edited by lse-cumulus on Fri 27 Dec 2024 11:56 am, edited 1 time in total.
Leo
Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html

Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html
- De Hout
- Posts: 92
- Joined: Thu 09 Oct 2014 5:40 pm
- Weather Station: Davis Vantage Pro2+ FARS
- Operating System: Windows 11 | CU v1.9.4 (10992)
- Location: Alkmaar, The Netherlands
- Contact:
Re: BT's Sager PHP Script V2 - For Cumulus
I am following this with great interest. Missed this discussion before.
The V2 script has been running standalone on my server for a few days, but it is not integrated in the website yet.
https://www.alkmaarweer.nl/sager_test.php
At the moment, the Sager forecast is not very accurate here. Atmospheric pressure is very high (highest of 2024) and there is almost no wind, so it is obvious that the forecast is 'fair'. The real circumstances are different. It is overcast, with RH >98%. It does not feel like 'fair' but it's not 'unsettled' either. 'Stable' would be more appropriate. Sager does not have the 'stable' option. Zambretti does. That's why the combination of Sager and Zambretti isn't such a bad idea.
Keep up the good work!
The V2 script has been running standalone on my server for a few days, but it is not integrated in the website yet.
https://www.alkmaarweer.nl/sager_test.php
At the moment, the Sager forecast is not very accurate here. Atmospheric pressure is very high (highest of 2024) and there is almost no wind, so it is obvious that the forecast is 'fair'. The real circumstances are different. It is overcast, with RH >98%. It does not feel like 'fair' but it's not 'unsettled' either. 'Stable' would be more appropriate. Sager does not have the 'stable' option. Zambretti does. That's why the combination of Sager and Zambretti isn't such a bad idea.
Keep up the good work!
-
TheBridge
- Posts: 119
- Joined: Mon 16 Mar 2020 3:23 am
- Weather Station: Davis
- Operating System: Windows 10
- Contact:
Re: BT's Sager PHP Script V2 - For Cumulus
It has been a couple of years since I filled around with this code HOWEVER I recall I modified the variable $PO which offsets to barometric pressure it reads from my Davis weather station. This line is on the same code file (sorry I don’t recall the which sager file name was off the top of my head) as the one where you set the local airport code so the sager code can fetch the METAR reading. The $PO is right below that setting and described in text. I recall some general warning in the comment text such as ‘DON’T CHANGE THIS’ which of course I ignored and kept changing until I generally got the forecast that reflects much closer to actual conditions.
- De Hout
- Posts: 92
- Joined: Thu 09 Oct 2014 5:40 pm
- Weather Station: Davis Vantage Pro2+ FARS
- Operating System: Windows 11 | CU v1.9.4 (10992)
- Location: Alkmaar, The Netherlands
- Contact:
Re: BT's Sager PHP Script V2 - For Cumulus
The above modification works, thanks Carlos.CarlosLSev wrote: ↑Wed 18 Dec 2024 3:31 pm Hi, it's working now. In case it helps anyone, I had to modify line 173 of bt-sager-wc.php. I run php 8.4.1, maybe it will work in other versions.
https://www.meteoviso.es/script/bt-sage ... r_test.phpCode: Select all
// Change this line: $pattern = "/[-+]?(" . join ($pcodes, "|") . ")/"; // With this one: $pattern = "/[-+]?(" . implode("|", $pcodes) . ")/";
@Leo, what version of PHP are you using on your webserver?
[edit] I see in your page source: <!-- server running PHP ver 5.3.27 -->
You might consider using a more recent version of PHP, especially because you are developing the Sager script which will not work with the newest and common used PHP versions 8.x. (says the man who still uses CU1
-
CarlosLSev
- Posts: 73
- Joined: Wed 03 Mar 2021 10:25 pm
- Weather Station: Waldebeck Halley
- Operating System: Raspberry Os
Re: PHP Script V3 for combined Sager/Zambretti Weathercaster for CMX and CU
Hi, that's great. I'll soon be able to publish a forecast similar to the one Davis does but with Cumulus, Sager and Zambretti. It's looking better and better. The one based on Metar is easier to translate than the one from Zambretti, but very good work.lse-cumulus wrote: ↑Thu 26 Dec 2024 10:09 am I made some further modifications to the PHP scripts from BT for Sager and Zambretti weathercast (generate ouput code and try to map to original forecast text) and then included BOTH weathercaster into one (1) html page that can be used in a user report style for Cumulus Utils or as a standalone webpage.
https://leonas.ddns.net/Wetterstation.S ... bretti.php
Please find attached the zip file with the code and a readme.txt file.
https://www.meteoviso.es/script/bt-sage ... bretti.php
I will continue testing
- lse-cumulus
- Posts: 102
- Joined: Mon 11 Jul 2022 3:39 am
- Weather Station: Fine Offset Ecowitt
- Operating System: Windows 11
- Location: Austria
- Contact:
fixed V3 version for PHP 8.X
Derk, Carlos,
thx for the hint about the codeline of function join/implode that has not been working for PHP 8.x. I overlooked the older post already pointing that out when I created the new version V3. Fixed in an updated version of my zip file in the post before.
I try to keep my php scripts compatible from PHP 5.x up to 8.x. It is much more work/fun to get scripts downgraded for PHP 5.x while having the upgrade to 8.x on my backlog to do list (my PHP version is bundled with the OS and that waits for a HW change of my webserver).
thx for the hint about the codeline of function join/implode that has not been working for PHP 8.x. I overlooked the older post already pointing that out when I created the new version V3. Fixed in an updated version of my zip file in the post before.
I try to keep my php scripts compatible from PHP 5.x up to 8.x. It is much more work/fun to get scripts downgraded for PHP 5.x while having the upgrade to 8.x on my backlog to do list (my PHP version is bundled with the OS and that waits for a HW change of my webserver).
Leo
Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html

Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html