WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: miraculon on August 03, 2020, 09:47:58 AM

Title: Meteobridge realtime shows Not Current, then Current
Post by: miraculon on August 03, 2020, 09:47:58 AM
The data fed by my original MR3030-based Meteobridge shows "Not Current", then "Current". It seems that some time overlap or some other inconsistency is causing this to switch back and forth between the two status indications.

I was looking through include-wxstatus.php trying to find where I can adjust the "expiration" time, but I am not sure where I could do this.

The meteobridge time is correct.

Any ideas on how to stop these "No Current" indications?

You can watch it happen at http://www.rogerscityweather.com/wxstatus.php (http://www.rogerscityweather.com/wxstatus.php)

I never have any problem with the other status indications. (FTP, etc.)

Greg H.
Title: Re: Meteobridge realtime shows Not Current, then Current
Post by: Jasiu on August 03, 2020, 10:47:42 AM
Looks like the updates are being sent every two minutes.  The server code expects an update every ten seconds and then provide some slack for a miss or two.

Here is the code in include-wxstatus.php where 40 seconds (10 second updates plus 30 seconds slack) is:

Code: [Select]
  if($SITE['WXsoftware'] == 'MB' and isset($SITE['realtimefile'])) {
do_check($SITE['WXsoftwareLongName']." ".langtransstr("realtime"),
  $SITE['realtimefile'],30+10,'file');
  }

So if you actually want to only send the real time data every two minutes, that's the code to adjust. Or you can set the MB to send every ten seconds (which is the default recommended in Ken's instructions).
Title: Re: Meteobridge realtime shows Not Current, then Current
Post by: ConligWX on August 03, 2020, 10:58:58 AM
Ha, beat me too it.

though he should update the include-wxstatus.php - add support for Meteobridge

http://www.rogerscityweather.com/check-fetch-times.php?show=versions

and a few others
Title: Re: Meteobridge realtime shows Not Current, then Current
Post by: miraculon on August 03, 2020, 11:22:57 AM
Thanks, I modified the interval as follows:

Code: [Select]
// MODIFIED FOR TWO MINUTE UPLOAD INTERVAL
  if($SITE['WXsoftware'] == 'MB' and isset($SITE['realtimefile'])) {
do_check($SITE['WXsoftwareLongName']." ".langtransstr("realtime"),
  $SITE['realtimefile'],30+120,'file');

Due to restrictions on the number of open FTP sessions on my hosting service, I aggregate meteobridge, meteobridge PRO, snow sensors and a bunch of other stuff on my own FTP Linux box and then do a combined single upload. It was my workaround for their restrictions. Thus, I set time to 120 seconds.

I'll dig into the needed updates later.

Greg H.