It’s been over 2 years since I last updated. Mostly because everything was working great! That’ll teach me. Basically, Max-Min stopped updating. I have combed the my previous posts (where I had a similar problem) and everywhere else with no solution. Sorry.
One anomaly … when I updated, all the files migrated out of my [pwsWD] folder and into my main folder up one level (public_html). Not sure why.
Now, Max-Min in both Temp and Wind isn’t updating. I tried running the PWS_hist_recreate.php script, pointing it to the public_html folder. It successfully ran but didn’t solve the problem. The PWS_hist_update.php script looked interesting but I didn’t mess with it.
I looked in the wudata folder and found that the today.txt file hadn’t updated since Oct 4. A clue … but I’m not sure what to do with it. A cruise through the chartswudata folder didn’t help me.
So I need some help. Those of you that have helped me in the past (wim, bitsostring, etc.) know that I know enough about this to be REALLY dangerous. Please speak slowly and in language a non-coder can understand.
I tried running PWS_cron_stationcron.php and while it reported success, no luck with getting Max-Min to work correctly. Also, Annual Rainfall is off too. Maybe I didn’t notice before.
CHECK 1
As you moved your website from the . . /pwsWD/ folder to the root you have to to check your cron-setup that it is not using the old . ./pwsWD/ folder
This link prints your history file → historyURL
It shows the age of the history file and at the bottom the last daily / monthly / yearly roll-overs.
Major problem: The last time a correct cron job has run around midnight is October 3
That is the reason the high-lows are not updated as the values in the history file contain high-lows of the period Oct 3 → till now.
Every midnight between 23:55 and 00:30 the cron-job will “roll-over” todays high-lows into month/year and reset the values to the latest measurements.
As you can see, the Cron Job in my cPanel is set up for every 5 minutes. I fixed the command so it points to the root folder by removing /pwsWD/ from the command line.
I ran the scripts for history_recreate.php and stationcron.php again. Everything appears to be back to normal on the website for Temp and Wind. I assume I have to wait for it to rollover again to really know for sure. The Today.txt file in the root wudata folder has not updated since Oct 4. That may have something to do with the following.
Annual Rainfall is another problem. I think it has to do with the WU data going to the old /pwsWD/ folder, as you pointed out with the Cron Job. I did some detective work and found the following WU scripts with old /pwsWD/ references:
> <?php $scrpt_vrsn_dt = 'PWS_wuhistory.php|01|2023-02-15|'; # beta release 2012_lts
> #-----------------------------------------------
> # EXTRA SETTINGS for this script
> $wu_fldr= '../wuhistory/'; # next to pwsWD/
> #$wu_fldr= './wuhistory/'; # inside pwsWD/
> #
> <?php $scrpt_vrsn_dt = 'PWS_wureports.php|01|2023-02-15|'; # beta release 2012_lts
> #-----------------------------------------------
> # EXTRA SETTINGS for this script
> $wu_fldr= '../wureports/'; # next to pwsWD/
> #$wu_fldr= './wureports/'; # inside pwsWD/
> $dateLongFormat = 'l d F Y';
I truly apologize for moving everything to the root folder … but I have no idea how I did it. All it did was follow the instructions, or so I thought. I know that support like this is a royal PITA for you. I appreciate you and this wonderful template!!!
Because of the folder/directory change, nothing in your setup seems to know where $this_server or $wu_server is. So, for example, you can’t get WU data because PWS_load_files.php is looking for …/pwsWD/PWS_DailyHistory.php. And at this time of night I can’t remember where you enter the server address. . . Sorry.
Once that’s sorted, we can turn to the problem that you have no graph data since 31 December 2022.
The remaining problems are caused by incorrect file pointers as there is still a pwsWD/ in some file links.
ToDo first
Go to easyweather-setup and click the green button save your settings.
Thats make sure all file pointers are now pointing to your current dashboard folder and not to your non-exisitng old pwsWD? folder.
Check screenshot
Done. I checked the today.txt file in the wu data folder and it seems to be updating properly. Same for the chartswudata folder. YAY! Should I expected the Annual Rainfall to update properly as well after tonights rollover?
bitsostring: Of course, you are right about the graphs. Any guidance you can offer would be greatly appreciated!
When searching for a way to financially support your work, Wim, I came to the “How should the new version be distributed?” discussion too late. I would be happy to make a donation now … and pay a yearly support fee on an ongoing basis. It has been 2 years since my last support request. But you and the other members of this forum are always here for me. That is worth something!
If you run PWS_module_test.php and list the contents of the chartswudata files you will find that KCOCARBO8YMD.txt is OK, …YM.txt is empty, and …Y.txt ends at 31 December 2022.
I’m sorry, I don’t know. . .
All 2023 files need to be removed.
In …/chartswudata/
delete or rename KCOCARBO8Y.txt, . . .YM.txt, . . .Y.txtold, . . .YM.txt.old
In …/wudata/
delete 2023 folder and delete KCOCARBO8-metric-2023.arr
Then use the …/PWS_module_test.php script and press bottom button “Load files”
I did what you suggested, except that I deleted KCOCARBO8-english-2023.arr instead of KCOCARBO8-metric-2023.arr. There was no “metric” file available and I figured that’s what you meant.
Unfortunately, no luck. In chartswudata, KCOCARBO8YMD.txt is still OK, …YM.txt is empty, and …Y.txt ends at 31 December 2022.
Just for fun, I went to my WU page. The daily and monthly rainfall totals seem to be correct. There doesn’t seem to be a way to see yearly totals. Is the yearly total math done inside the PWS program? Is there a way to fix or alter that calculation?
First: What you see on those WU pages is the calculated 5 minute data (one line) done by WU as WU has to do that task also.
That WU-page data is very from what you can read-nack from WU yourself. Go to your debug dashboard: Module test PWS_Dashboard
Bottom row has three buttons:
Left one “Show contents” displays the data you read back from WU after your WeatherCat weather-program uploaded the data
The second button shows which data-items we use
The third button shows all data we minimally need.
Still no high-lows a.s.o. as those will be calculated by the cron-job