Author Topic: Meteobridge weather data - NOT Current  (Read 671 times)

0 Members and 1 Guest are viewing this topic.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Meteobridge weather data - NOT Current
« on: June 06, 2025, 02:39:22 PM »
After working fine for a long time, I started seeing

Meteobridge weather data   NOT Current   223693:31:44   > 0:05:15
Tue, 30-Nov-1999 12:00am EST

In the status page: https://www.rogerscityweather.com/wxstatus.php

The Almanac Trends is also showing the same issue: https://www.rogerscityweather.com/wxstatus.php with the 1999 date.

https://www.rogerscityweather.com/gen-MBtags.php seems to show the source code (executable attrib is set) and MBtags.php has a couple of error codes:

Code: [Select]
Notice: Undefined variable: WX in /home/rogersci/public_html/MB-defs.php on line 47

Notice: Undefined offset: 1 in /home/rogersci/public_html/MB-defs.php on line 1051

I have been going around in circles between meteobridge settings the the gen-MBtags, etc.

I would appreciate any suggestions.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9719
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Meteobridge weather data - NOT Current
« Reply #1 on: June 06, 2025, 03:35:01 PM »
For the template, Meteobridge has to load gen-MBtags.php as a template.  It can only use http (not https) to do that.  If your site config is set to forward http->https, then turn that off in cPanel, then have Meteobridge reload the template.  Then you can turn http->https in cPanel again.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Meteobridge weather data - NOT Current
« Reply #2 on: June 06, 2025, 04:48:46 PM »
For the template, Meteobridge has to load gen-MBtags.php as a template.  It can only use http (not https) to do that.  If your site config is set to forward http->https, then turn that off in cPanel, then have Meteobridge reload the template.  Then you can turn http->https in cPanel again.

"Force HTTPS Redirect" was Off under cPanel Domains. I tried it both off and on and changed the URL to be http. Am I in the right place in cPanel?

I did try the loading of the gen-MBtags.php both ways. Still no luck.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9719
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Meteobridge weather data - NOT Current
« Reply #3 on: June 06, 2025, 08:21:21 PM »
It's meteobridge that has to load the template from http://www.rogerscityweather.com/gen-MBtags.php .. if that access results in a 302 redirect to https, then the template will fail to load.

Check https://www.rogerscityweather.com/check-fetch-times.php?show=wx to see the contents of Settings-weather.php, MBtags.php and MB-defs.php

Your current MBtags.php is empty (indicating a failure by Meteobridge to load the template from gen-MBtags.php.

If turning off the http->https redirect using cPanel doesn't work, then check .htaccess on your site for an explicit redirect.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Meteobridge weather data - NOT Current
« Reply #4 on: June 07, 2025, 08:42:02 AM »
It's meteobridge that has to load the template from http://www.rogerscityweather.com/gen-MBtags.php .. if that access results in a 302 redirect to https, then the template will fail to load.

Check https://www.rogerscityweather.com/check-fetch-times.php?show=wx to see the contents of Settings-weather.php, MBtags.php and MB-defs.php

Your current MBtags.php is empty (indicating a failure by Meteobridge to load the template from gen-MBtags.php.

If turning off the http->https redirect using cPanel doesn't work, then check .htaccess on your site for an explicit redirect.

Thanks, Ken. I'll try your additional suggestions. I will check the .htaccess file and look for anything strange.

I noticed the blank MBtags.php myself and thought that it had something to do with it.

When I was having SSL problems (on Hostinger's end), I was using rcwx.tech since that seemed to partially work albeit without the front page data.

I changed a lot of the php files to rcwx.tech trying to get things to partially work. There are redirects for sunrisesideweather.com and rcwx.tech to rogerscityweather.com. I'll try cleaning those up and see if that gets me anything too.

Greg H.




Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Meteobridge weather data - NOT Current
« Reply #5 on: June 07, 2025, 09:03:40 AM »
It's meteobridge that has to load the template from http://www.rogerscityweather.com/gen-MBtags.php .. if that access results in a 302 redirect to https, then the template will fail to load.

Check https://www.rogerscityweather.com/check-fetch-times.php?show=wx to see the contents of Settings-weather.php, MBtags.php and MB-defs.php

Your current MBtags.php is empty (indicating a failure by Meteobridge to load the template from gen-MBtags.php.

If turning off the http->https redirect using cPanel doesn't work, then check .htaccess on your site for an explicit redirect.

I tried renaming .htaccess to DOT.htaccess AND switching off the redirect to https on cPanel. Still no luck.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Meteobridge weather data - NOT Current
« Reply #6 on: June 07, 2025, 10:07:09 AM »
I tried reverting the meteobridge SW to an earlier version (6.0) and get this:

Quote
Error (Event #07): Download of template failed: https://rogerscityweather.com/gen-MBtags.php: HTTPS support not compiled in.

Which fits with the other suggestions...

I'll keep trying...

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Meteobridge weather data - NOT Current
« Reply #7 on: June 07, 2025, 10:22:28 AM »
I tried reverting the meteobridge SW to an earlier version (6.0) and get this:

Quote
Error (Event #07): Download of template failed: https://rogerscityweather.com/gen-MBtags.php: HTTPS support not compiled in.

Which fits with the other suggestions...

I'll keep trying...

Greg H.

OK, got it working again. While on SW 6.0, I renamed .htaccess to disable it (and the SSL), made sure that https was disabled in the cPanel and reloaded gen-MBtags.php. It worked!

Still working after renaming .htaccess back to normal.

Thanks, Ken for the ideas. I don't know why reverting the meteobridge SW seemed to set it up to fix it, but I'm going to stick with it since it works.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4175
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Meteobridge weather data - NOT Current
« Reply #8 on: June 10, 2025, 09:19:39 AM »
After it went back to the same issue after a power failure (reboot of meteobridge), I had to do the same thing with renaming the .htaccess file.

I decided to try commenting out the first lines of .htaccess as follows:

Code: [Select]
#RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#Header always set Content-Security-Policy: upgrade-insecure-requests
#RewriteEngine on

#RewriteOptions inherit

<Files 403.shtml>
order allow,deny
allow from all
</Files>

<Files wp-login.php>
order allow,deny
deny from all
</Files>

SecFilterEngine Off
SecFilterScanPOST Off

...etc etc...

There is this Warning that appeared: Warning: A non-numeric value encountered in /home/rogersci/public_html/MB-defs.php on line 354
This happened before, but it "fixed itself" and eventually disappeared. I expect that it will go away again.
The error line refers to the 3 days ago Wind Direction:
3 days ago   61.1   --   -- (--°)   72   51.8   29.99   -0.04   --

The "Status" page looks OK, so I will just wait for this to clear itself. (unless someone knows how to make this go away)

I also let it update to the lastest meteobridge software version and it is OK with that. Apparently, the only value was the ability to see the template upload error which did not appear with the current varion.

Greg H.
 UPDATE: Also missing the thermometer graphic... FIXED: for some reason the thermometer.php was pointing to a non-existent realtime.txt file, I corrected it to MBrealtime.txt. Working now. The warning is gone too. Not sure why, but I will take it...
« Last Edit: June 10, 2025, 10:08:30 AM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline Jasiu / JJ

  • Forecaster
  • *****
  • Posts: 1029
    • LexMAWeather
Re: Meteobridge weather data - NOT Current
« Reply #9 on: June 10, 2025, 03:48:16 PM »
That section of code assumes that if the 72 hour temperature is set that all of the other variables within that "if" clause are valid, which they obviously aren't.  Line 354 is actually the line where the rain total is calculated.

Code: [Select]
if ( MB_isdata('th0temp-avg@h72') ) { // only set if the variable has valid data por AGallardo
  $temp3dayago = $WX['th0temp-avg@h72'];
  $wind3dayago = $WX['wind0avgwind-avg@h72'];
  $dir3dayagodeg = $WX['wind0dir-avg@h72'];
  $dir3dayago =  MB_deg2dir($dir3dayagodeg);
  $hum3dayago = $WX['th0hum-avg@h72'];
  $dew3dayago = $WX['th0dew-avg@h72'];
  $baro3dayago = $WX['thb0seapress-avg@h72'];
  $rain3dayago = sprintf($rainDP,($WX['rain0total-avg@h72']-$WX['rain0total-ydmin'])); // should be dmax!
  $rainrate3dayago = $WX['rain0rate-avg@h72'];

You could get similar errors for any of the if clauses within that section of code if something isn't set.  I suspect the issue "goes away" after it has values for everything that is accessed.  You could add to the "if" check to see if the two values being subtracted are also valid (MB_isdata). And you probably need to add that for all the days below that in the code.

EDIT: And it probably "goes away" once the MB has been running long enough to have good data for everything.
https://lexmaweather.info
Mastodon: @LexMAWeather@toot.community
Bluesky: @LexMAWeather.toot.community.ap.brid.gy