WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: dilly on February 21, 2021, 02:50:30 PM
-
Hi everyone,
I updated my scripts yesterday (full disclosure - for the first time in a while) and now I appear to be missing some pieces on my webpage dashboard/main page. I checked the FAQ and searched the forum but have not yet found a obvious direction to go to troubleshoot or which php pages might be the culprit. I tried to compare to a backup of my old files to no avail (so far)
I admit I have been away from the editing of these files for a bit but when reviewing them I am not quite sure what I am missing as far as settings/parameters that need to be changed/edited.
www.particularlynastyweather.com
Running Cumulus MX on a Rasp Pi if that is helpful
- Cannot seem to get some NWS forecast icons to show up in the forecast or the outlook (see below)
- Have some duplicate text on the NWS Forecast (see below)
- Rain information does not appear to be updating
Any ideas on what to torubleshoot or what file I should inspect closer?
[ You are not allowed to view attachments ]
-
It looks like you need to change Settings.php from
$SITE['fcsticonstype']= '.jpg'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
to $SITE['fcsticonstype']= '.jpg'; // default type='.gif' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
to show the GIF icons instead. That will correct the doubled text in the forecast.
Looking at https://www.particularlynastyweather.com/wxstatus.php shows the missing rain info is due to very stale CUtags.php uploads.
You need to set CumulusMX via Settings, Extra Web Files to upload CUtags.php after processing for current weather info from your station.
Also.. looks like you have a few more updates to do to the website scripts to be fully current :)
-
looks like your not processing anything either
https://www.particularlynastyweather.com/wxstatus.php
[ You are not allowed to view attachments ]
-
Thanks so much guys. Edited the gif piece and that seems to have solved that problem. Thank you!
With regard to not procesing my local files, I am wondering if that is because I have the wrong local location for them (I am using this new Cumulus MX "ready to go" raspberry pi image and the file locations are different from my previous installation for sure.
This is what I am using within Cumulus. Any experience with this raspberry pi image and it's associated local location for the extra web files?
[ You are not allowed to view attachments ]
-
Did you put the local filename files in the directory cited (/opt/CumulusMX/web/ )? The pre-built image may not have those files in there.
Also, you don't have to have realtime.txt in the Extra web files.. just tick the checkbox on the Settings, Web/FTP settings menu.
Also, you seem to have enabled .jpg images for the forecasts, but... you're missing a bunch of the static .jpg images. Only the DualImage.php images seem to be working.
Download https://saratoga-weather.org/saratoga-icons2.zip and upload to your website.. it has a complete set for you to use along with the full icon templates for DualImage.php to use also.
-
Thank you again for your help. The jpgs were there just I think in the wrong folder maybe? I re-added them and things on the forecast page appear to be showing now.
Getting closer I believe on the ftp uploads. You were correct the rasp pi image does not include those "extra web files" files. I created them and now have a different view on the status page when I force an ftp upload via cumulus interface.
Still a couple of items maybe not firing but at least one more than before appears to be working?
[ You are not allowed to view attachments ]
-
The date for the weather data is due to Settings.php having
$SITE['WDdateMDY'] = true; // for WD date format of month/day/year. =false for day/month/year
Your CUtags.php is using dd/mm/yyyy dates, so change to $SITE['WDdateMDY'] = false; // for WD date format of month/day/year. =false for day/month/year
to correct that issue.
Alternatively, you can use raspi-config to change the RPi locale to use en_US format which would also change the date format to mm/dd/yyyy and you can leave the Settings.php entry with $SITE['WDdateMDY'] = true;
-
Thanks! That got it!
[ You are not allowed to view attachments ]
Is the NOAA report anything needed/critical?
-
With the negative times, I suspect you're running the RPi on GMT/UTC.
I suggest you use raspi-config again to change the default timezone to America/New_York, then the RPi and Template will both be using the same timezone.
The NOAA reports are uploaded once daily (just after midnight), so that should resolve tomorrow (assuming you ticked the NOAA reports as enabled) in the CumulusMX configuration.
-
Thanks!
Yes I tried to update the raspi config locale and could not find evidence it took...
Which en_US should I be selecting?
[ You are not allowed to view attachments ]
-
use the en_US ISO-8859-1 option
After you set the locale and the timezone, then 'sudo reboot' to make them work.
-
OK that worked. Thanks again!
At the risk of wearing out my welcome this evening can I ask just two more questions and I will leave you alone for the night. :)
- Is there a setting to change the below to a 12 hour clock and possibly change the date format?
[ You are not allowed to view attachments ]
And lastly, what parameter am I missing to show the extended forecast on my home page. I suspect I edited it out long ago and now would love to have it back. Similar to the forecast on your homepage:
[ You are not allowed to view attachments ]
Thank you again for all of your help and troubleshooting!
-
Since your change of Locale and reboot, you'll need to revert Settings.php
$SITE['WDdateMDY'] = true;
back to $SITE['WDdateMDY'] = false;
as your CUtags.php now shows date as $WX['date'] = '02/21/2021';
$WX['time'] = '23:30 on 21 February 2021';
(date is now in mm/dd/yyyy format).
The time displayed when the AJAX script runs, the field 1 in realtime.txt which is in 24hr format is displayed. The ajaxCUwx.js script doesn't transform that into 12hr am/pm time.
-
Thanks again Ken for your help! Very much appreciated!