Anyone running the Wxreports by Murry Conarroe at Wildwood Weather using WeeWX as a source? I have not seemed to of cracked the changes needed yet to be successful. I recently switched from Weather Display to WeeWx.
I have the path I think set correctly in wx-report-settings"
$path_dailynoaa = $SITE['NOAAdir']; // path to NOAA reports
which resolves to "./NOAA/"
$locmc = $path_dailynoaa;
echo "the NOAA path is " . $locmc;
echo "<BR>the software is " . $SITE['WXsoftware'];
adding the echos above in wxraindetail.php gets me
the NOAA path is ./NOAA/
the software is WEEWX
In wxreportinclude.php, I made an entry for what I believe is the right filenaming format for WEEWX:
#Added for WEEWX - dae 08/06/2023
if($wxsoftware == 'WEEWX') {
$filename = "NOAA" . "-" .$year . "-" . str_pad(($m + 1), 2, "0", STR_PAD_LEFT) . ".txt";
}
in context here:
function get_noaa_filename ($year, $m, $wxsoftware, $current_month){
if($wxsoftware == 'CU') {
$filename = "NOAAMO" . str_pad(($m + 1), 2, "0", STR_PAD_LEFT) . substr($year,2,2) . ".txt";
}
if($wxsoftware == 'WL') {
$now = getdate();
print "<!-- now \n" . print_r($now,true) . " -->\n";
$now_month = sprintf("%02d",$now['mon']);
$now_year = $now['year'];
$prior_month = $now['mon'] - 1;
$prior_year = $now['year'];
$last_year = $prior_year -1;
if ($prior_month < 1) {$prior_month = 12; $prior_year--;}
$prior_month = sprintf("%02d",$prior_month);
global $path_dailynoaa;
$NOAAdir = $path_dailynoaa;
$LastMonthFile = $path_dailynoaa.'NOAAPRMO.TXT';
$now_hour = $now['hours'];
if(! file_exists("$path_dailynoaa/NOAA$prior_year-$prior_month.TXT") and
file_exists($LastMonthFile) and
$now_hour >= 6) {
print "<!-- copying $LastMonthFile to $NOAAdir/NOAA$prior_year-$prior_month.TXT -->\n";
if (copy($LastMonthFile,"$NOAAdir/NOAA$prior_year-$prior_month.TXT")) {
print "<!-- copy successful -->\n";
} else {
print "<!-- unable to copy -->\n";
}
}
if ($current_month){
$filename = "NOAAMO.TXT";
} else {
$filename = "NOAA" . $year . "-" . str_pad(($m + 1), 2, "0", STR_PAD_LEFT) . ".TXT";
}
}
if($wxsoftware == 'VWS') {
$filename = $year . "_" . str_pad(($m + 1), 2, "0", STR_PAD_LEFT) . ".txt";
}
if($wxsoftware == 'WV') {
$filename = "NOAA" . "-" .$year . "-" . str_pad(($m + 1), 2, "0", STR_PAD_LEFT) . ".txt";
}
#Added for WEEWX - dae 08/06/2023
if($wxsoftware == 'WEEWX') {
$filename = "NOAA" . "-" .$year . "-" . str_pad(($m + 1), 2, "0", STR_PAD_LEFT) . ".txt";
}
if ($wxsoftware == "WD"){
if ($current_month){
$filename = "dailynoaareport.htm";
} else {
$filename = "dailynoaareport" . ( $m + 1 ) . $year . ".htm";
}
}
return ($filename);
}
./NOAA directory contains files with a naming format of NOAA-2023-08.txt for the dailies and NOAA-2023.txt for the annuals.
So, If someone already has this working, I would be grateful if you shared. It feels like I am missing something obvious, but it eludes me.