Author Topic: DarkSky info is out of wack after upgrading Meteobridge and Weather34**SOLVED  (Read 844 times)

0 Members and 1 Guest are viewing this topic.

Offline new2ark

  • Member
  • *
  • Posts: 10
    • AW1401-IP  Home • Weather • Station
i have been using Weather34 and Meteobridge for over a year and this new problem has me scratching my head...check out my website....https://pwsincabotar.com/
« Last Edit: March 14, 2019, 12:03:58 PM by new2ark »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
It looks like ./jsondata/wuupdate.php script is missing so none of the external sites data (DarkSky included) is being loaded.
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 weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
in meteobridge version wuupdate.php is not part of the forecast the forecast data is driven by mbdbfiles/stationcron.php which is called by meteobridge

Code: [Select]
<?php
if ($position6=="forecast3ds.php"){
// weather34 darksky  curl based
$url4a 'https://api.forecast.io/forecast/'.$apikey.'/'.$lat.','.$lon.'?lang='.$language.'&units='.$darkskyunit ;
$ch4a curl_init($url4a);
$filename4a '../jsondata/darksky.txt';
$complete_save_loc4a $filename4a
$fp4a fopen($complete_save_loc4a'wb'); 
curl_setopt($ch4aCURLOPT_FILE$fp4a);
curl_setopt($ch4aCURLOPT_HEADER0);
curl_exec($ch4a);
curl_close($ch4a);
fclose($fp4a);}?>


Offline new2ark

  • Member
  • *
  • Posts: 10
    • AW1401-IP  Home • Weather • Station
current conditions is now correct....forecast is still wrong

Offline new2ark

  • Member
  • *
  • Posts: 10
    • AW1401-IP  Home • Weather • Station
3 new files did the trick....thanks for resolving this so quickly

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
thank you for highlighting have updated repo with 3 new files for darksky related ..

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
in meteobridge version wuupdate.php is not part of the forecast the forecast data is driven by mbdbfiles/stationcron.php which is called by meteobridge

Code: [Select]
<?php
if ($position6=="forecast3ds.php"){
// weather34 darksky  curl based
$url4a 'https://api.forecast.io/forecast/'.$apikey.'/'.$lat.','.$lon.'?lang='.$language.'&units='.$darkskyunit ;
$ch4a curl_init($url4a);
$filename4a '../jsondata/darksky.txt';
$complete_save_loc4a $filename4a
$fp4a fopen($complete_save_loc4a'wb'); 
curl_setopt($ch4aCURLOPT_FILE$fp4a);
curl_setopt($ch4aCURLOPT_HEADER0);
curl_exec($ch4a);
curl_close($ch4a);
fclose($fp4a);}?>

Ahh... thanks for that, Brian.  I had been unaware of the move of that code to stationcron from the original wuupdate.
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 weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
no problem ken

the reason for that file difference in cumulus etc is I spent so many hours answering emails a few years ago about what is and how to use a cronjob..so i just come up with a dirty solution to kick the necessary files at periods when the template was being browsed , it doesn't do anything unless the site is being viewed it was not a perfect solution but it worked ok and Im not the best explainer of technical methods like cron jobs I guess years of using it you forget to be patient and just do it ..perhaps you might have a cleaner solution specifically for cumulus may be your aware of some function cumulus itself to trigger the file , in meteobridge as you know its just setup the http request in the services tab at whatever interval and thats it ,not sure how it works in cumulus ..

 

anything