Author Topic: Saratoga Template and conds.php for Meteobridge  (Read 96 times)

0 Members and 1 Guest are viewing this topic.

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 543
  • #conligwx
    • conligwx.org
Saratoga Template and conds.php for Meteobridge
« on: May 17, 2020, 01:06:37 PM »
Ken.

I have been looking at the conds.php file and came across this line:

Code: [Select]
$cacheFileDir = './';                     // default cache file directory
$cacheName = "MBconditions.txt";           // locally cached conditions string from Meteobridge

when does this file get created? I dont seem to have this on my site so I am not sure if I have an issue or not?
« Last Edit: May 17, 2020, 01:09:42 PM by ConligWX »
Regards Simon
Davis Vantage Pro2 Plus with DFARS - Meteobridge Nano SD - CumulusMX - Saratoga Templates
Do you need help in fixing Wunderground issues?  - just delete your account, problem solved! :lol:


Offline Jasiu

  • Forecaster
  • *****
  • Posts: 718
    • LexMAWeather
Re: Saratoga Template and conds.php for Meteobridge
« Reply #1 on: May 17, 2020, 02:36:55 PM »
Peek down a few more lines of code.

Code: [Select]
// overrides from Settings.php if available
global $SITE;
if(isset($SITE['cacheFileDir']))     { $cacheFileDir = $SITE['cacheFileDir']; }
$outFileName = $cacheFileDir.$cacheName;
if(isset($SITE['realtimefile']))     { $outFileName = $SITE['realtimefile']; }

If you have "realtimefile" set in the $SITE array (in Settings-weather.php), the "MBconditions.txt" file name never gets used.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7912
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Template and conds.php for Meteobridge
« Reply #2 on: May 17, 2020, 03:35:10 PM »
The conds.php script should be invoked by HTTP 'download' in Meteobridge

See: 5. Setup of optional AJAX updates using HTTP upload in https://saratoga-weather.org/wxtemplates/setup-Meteobridge.php

By doing this, you'll have MBrealtime.txt and MBrealtimegauges.txt created and updated for you.  No need to change settings in the script.. it will put the files at the document root/current directory in your website.
« Last Edit: May 17, 2020, 03:41:24 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything