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 4018) - 28 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 Global Sager Weathercaster PHP Scripts For CumulusMX

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

Moderator: daj

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 Global Sager Weathercaster PHP Scripts 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.
User avatar
ConligWX
Posts: 1571
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by ConligWX »

Just installed this on a test site but I was not seeing the forecast displayed on the cumulusmx index.htm page.

it was blank where the forecast should be.

bt-sager.php shows the correct displayed forecast.

inspected the index.htm page and error shows:

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.
anyone know how to fix this?

https://www.conligwx.org/cmx/bt-sager.php

https://www.conligwx.org/cmx/index.htm
Regards Simon

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

Image
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

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

Post by Mapantz »

ConligWX wrote: Wed 24 Jun 2020 8:47 pm Just installed this on a test site but I was not seeing the forecast displayed on the cumulusmx index.htm page.

it was blank where the forecast should be.

bt-sager.php shows the correct displayed forecast.

inspected the index.htm page and error shows:

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.
anyone know how to fix this?

https://www.conligwx.org/cmx/bt-sager.php

https://www.conligwx.org/cmx/index.htm
Try putting this in your .htaccess file

Code: Select all

<filesMatch "\.(html|htm|php)$">
 FileETag None
 <ifModule mod_headers.c>
 Header unset ETag
 Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
 Header set Pragma "no-cache"
 Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
Image
User avatar
PaulMy
Posts: 3777
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by PaulMy »

I just checked mine and see that the forecast is not showing on my Cumulus home page, but likely a different reason to yours. However both www.komokaweather.com/weather/bt-sager-wc.php and www.komokaweather.com/weather/bt-sager.php do display.

If I recall correctly, I had to change to indexT.php ==> index.php as an added file to process and FTP for this script to execute.

BTJ has recently revisited the forum and hopefully he will see your post.

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
ConligWX
Posts: 1571
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by ConligWX »

Mapantz wrote: Wed 24 Jun 2020 9:08 pm
Try putting this in your .htaccess file

Code: Select all

<filesMatch "\.(html|htm|php)$">
 FileETag None
 <ifModule mod_headers.c>
 Header unset ETag
 Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
 Header set Pragma "no-cache"
 Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
Thanks for the tip, though I get the same issue.
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice »

As you are using javascript to write into the html page, ensure the bottom of bt-sager-wc.php

looks like this:

Code: Select all

echo "document.write ('$sf');";// This allows displaying the forecast on a HTML webpage.  Add // to the front of this line if using a PHP webpage.
// End The Sager Weathercaster.
ie. echo is NOT commented out.

As Paul showed, if you go to bt-sager-wc.php you should see document.write('your forecast ......

There are some legacy problems with this code ....
you may want to try this modified version
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ConligWX
Posts: 1571
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by ConligWX »

thankx for the heads up but the new v2 files give more issues as stated in your thread. it also gives the same initial error message of refusing 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.

Guess these script are no longer compatible with newer versions of php and web browser policies.

thanks for all you help guys. I'll leave it for now.
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice »

Try ..

<a href = "bt-sager.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager-wc.php" type = "application/javascript"></script></font></b></a></p>

Edit:
If that doesn't work try ...

<a href = "bt-sager.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager-wc.php" type = "application/x-httpd-php"></script></font></b></a></p>

Let us know if either of them work ;)

It's the server being fussy ....
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ConligWX
Posts: 1571
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by ConligWX »

beteljuice wrote: Thu 25 Jun 2020 12:36 pm Try ..

Let us know if either of them work ;)

It's the server being fussy ....
yep tried them both and one reported the usual error, the other reported nothing. Thanks for you help though. I'll leave it be. Thanks everyone.
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by beteljuice »

How odd ....

Your server seems to be running php, but not recognizing they are executable pages ...

Do you have any php code running anywhere ??
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ConligWX
Posts: 1571
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by ConligWX »

beteljuice wrote: Thu 25 Jun 2020 10:18 pm How odd ....

Your server seems to be running php, but not recognizing they are executable pages ...

Do you have any php code running anywhere ??
php scripts are working, just they dont work in htm pages:) I'll reply with more info in your V2 script page.
Regards Simon

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

Image
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

I need to stop procrastinating on this forum, lol. I'll have an update to these scripts coming soon. I swear!
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 Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

Version 2020-12-12 is now live. It is attached to the bottom of the first post in this thread.
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 Global Sager Weathercaster PHP Scripts For CumulusMX

Post by Buford T. Justice »

One thing I have been working on is finding a source online to where the weather station's GPS coordinates can be used to tell the current sky/cloud conditions. If I could get this condition as a variable somehow, I could strip out the METAR code and requirement.

Another thing is PHP 7. I am not 100% sure if the scripts in their current form will work with PHP 7.
Post Reply