Help/suggestions for missing information on new install

Looking for help/suggestions for missing information on my newly installed PWS Dashboard.

Here is the URL for my PWS page: https://novawx.dscloud.me/pwsWD/index.php

I did use Advanced Search to see if I could locate my specific issues but didn’t find any.

During setup, I had one error, check 4 : json support was flagged as read only, I changed the folder to read/write and the files in that folder are being updated and are current.

Here’s what’s missing (error in bold text) and what I tried in blue text:

  1. Earthquakes error: earthquake_c_small.php (96):, Invalid / no JSON data eqnotification.txt, Check settings and data
  2. WU Forecast: (52): WU forecast file not ready wufct_en-US_e.txt.
    I have updated my WU API and added it to the API&Keys tab in the setup. My WU ID is KVAALDIE28.
  3. NOAA/NWS Warnings: warning are not for my local area (Virginia), they are for Santa Cruz, California and New Haven, Connecticut.
    My timezone is America/New_York and my latitude/longitude are correct.
  4. No graphs displayed: No valid data found for ./chartswudata/KVAALDIE28YMD.txt.
    I’ve tried using both WU data “Use our WeatherUnderground data for charts” and “Save the daily data for the charts” but graphs do not display.

Thanks for any help.

If you run PWS_module_test.php and go “Load files” you will still see a lot of warnings about permission to rename files in /jsondata. If you can correct that things might begin to work. Then running PWS_cron_stationcron.php every 5 minutes should refresh the data files regularly.

Re NWS warnings, you have to edit the included core files (maintained by Ken True) first, as mentioned in easyweathersetup. There is a readme in /pwsWD/nws-alerts.

If you upload to WU I recommend using WU for graphs and History:

One can generate a "start-history" using the stations WU-data: => pwsWD/PWS_hist_recreate.php?pw=12345 One can always update the history file if it has an error-value in it: => pwsWD/PWS_hist_update.php?pw=12345
If you run PWS_module_test.php and go "Load files" you will still see a lot of warnings about permission to rename files in /jsondata. If you can correct that things might begin to work. Then running PWS_cron_stationcron.php every 5 minutes should refresh the data files regularly.

Yes, I did a quick look and there are permission warnings because even though I had changed the /jsondata folder permissions from Read-only by unticking the box in Properties, it keeps reverting back to Read-only. I made the change via Windows Explorer but maybe I need to do so directly on the NAS. I also thought I had fixed it because the WDapi.txt file is current and updating.

Right after I installed pwsWD, I did setup the cron to run every 5 minutes from WD per the instructions provided. Maybe, like you said, fixing the json permissions might get things working.

Re NWS warnings, you have to edit the included core files (maintained by Ken True) first, as mentioned in easyweathersetup. There is a readme in /pwsWD/nws-alerts.

I do remember seeing that in the easyweatherseup but I didn’t recall it pointing to a readme file in nws-alerts. I guess I have some reading to do now that I know where to look.

If you upload to WU I recommend using WU for graphs and History:

The real-time data looks fine, but it’s not plotting graphs.

I’ll look at “start-history” and updating the history per your suggestion. WU is still producing data for me here: Willowsford Farm - WU Station History, so I should be able to get it working.

Real-time data comes from clientraw.txt, not WDapi (it says at the bottom of the page). I don’t know why you are uploading WDapi as well.

Graph files are in /chartsmydata or /chartswudata: I think you are still set to “use my data”? In fact, there is one day’s data, and “last 30 days” graphs are working and showing 30 August data. Switch to WU and check in module_test to see if you get errors loading or saving the .csv files. These should give you fully populated graphs.

If you use WU you will also find a 2022 array file in /wudata, regularly updated.

Your problems are caused by:

[ol]
[li]permission for the jsondata folder contents
Use your FTP program to set the rights to “anybody all” / and click “apply to enclosed” to set the permissions for the documents in the folder also. Attached example of a FTP program folder setup
Ask your provider for help as they know their system and are paid for helping their customers. [/li][/ol]

[ul][li]To use wu for your graphs

  • menu → click settings → passowrd
  • third tab data → last question → The data to use for the graphs → select “Use our WeatherUnderground . . .”
  • click green button
    [/ul]
    [/li]
    [li]PWS_module_test.php → “Load files” first loads a new file, renames the existing file and then saves and renames the new file.
    The “permissions” cause it to fail fail in renaming the old file and therefor can not save the new file with the correct name.
    The script should have “no errors” and all files will be crated if the permissions are set correctly.[/li]

Example

Warning: rename(/volume1/web/pwsWD/jsondata/metar34KIAD.txt,/volume1/web/pwsWD/jsondata/metar34KIAD.txtold): No such file or directory in /volume1/web/pwsWD/PWS_load_files.php on line 464
Warning: rename(/volume1/web/pwsWD/jsondata/metar34KIAD.txtrnm,/volume1/web/pwsWD/jsondata/metar34KIAD.txt): Permission denied in /volume1/web/pwsWD/PWS_load_files.php on line 465
Warning: rename(/volume1/web/pwsWD/jsondata/metar34KIAD.txtold,/volume1/web/pwsWD/jsondata/metar34KIAD.txt): No such file or directory in /volume1/web/pwsWD/PWS_load_files.php on line 468
PWS_load_files.php (461) METAR-KIAD____: time spent: 0.0785 -  CURL OK for https://api.checkwx.com/metar/KIAD/decoded
PWS_load_files.php (467) METAR-KIAD____: File /volume1/web/pwsWD/jsondata/metar34KIAD.txtcould not be created, check permissions of file and folder

====
Setting permissions is tricky and sometimes explorer fail in doing so.
Use a decent FTP program to do it.Check also the folders

  • _my_settings → for the history- and status-file
  • chartswudata → for all WU files
  • nws-alerts → all folders → for the logs and images which are saved
  • wudata which is the cache of all retrieved data from WU

If all fails sent me a PM or e-mail with your “FTP userID and password” and the “easyweather” password.
I will then check all data folders


Thanks for the suggestions. Adding the write permission for /jsondata was a simple fix doing it directly on my Synology NAS, which is where I host my website. I just had to open Synology’s file station and change the permission there. I should’ve started there instead of trying to do it via Explorer in Windows. Now the earthquake data and WU forecast is showing (see attached screen capture).

Now I have to work on the WU graphs and NOAA NWS alerts when I have some time.

Real-time data comes from clientraw.txt, not WDapi (it says at the bottom of the page). I don't know why you are uploading WDapi as well.

I am using clientraw.txt. I don’t know about WDapi.txt - maybe that being generated since I turned on the WD cron?

I’ll report back with my successes based on your suggestions.


Sorry to disappoint you, no files can be written by the scripts in the other data folders.
https:/. . your website . . /pwsWD/_test.php?test=PWS_load_files.php
The wu data is downloaded OK but it can not be saved in the chartswudata folder ==> permissions
Probably similar for the wudata folder

The cron can not save the updates history file in the _my_settings folder.==> permissions

Succes, Wim

Officially you cannot run the stationcron every 5 minutes in WD, but you can set it to run every 10 minutes as shown below. AFAIK you do not need to enter anything in the top box or turn the big switch on, you just hit “OK”. That way WDapi.txt is not created.

Brian was going to change the setting to 5 minutes, but never did.


Wim,

Thanks for taking time to help me find the issues. I thought the folders had write permission because their attributes, shown below on the left were “Create files/Write data” but when I selected all the options under “Write” (right image) things started working.

I ran https:/. . your website . . /pwsWD/_test.php?test=PWS_load_files.php that is now clear of errors. Also, thank you for a great application!

bitsostring,

Thanks for the tip and screen capture from the WD cron. I’ll set it up identical to yours.

And as for the NOAA NWS alerts, I read through Ken’s instructions and finally found where to enter my Zone and comment-out the default zones. Now instead of a warning, the forecast for tonight is in that section of the tile, which I hope is correct since we have no warnings currently - not a cloud in the sky, sunny and 31° C right now.

novawx
if your using a synology unit, to get 5 min cron try setting up task manager on it to do a user defined task
General tab gives it a name and i have root in the second box and set schedule tab to 5min, daily with first time 00:00 and end time 23::55 then in task settings put
curl “http://xxx.xxx.xxx.xxx/pwsWD/PWS_cron_stationcron.php?PASS=PWSpassword
in the big box at the bottom changing xxx.xxx.xxx.xxx to the ip of your synology unit and pwsWD to your folder that the cron is in and of coarse PWSpassword is changed to your password

Harold

Hey Harold - thanks for the tip on setting up a task on the Synology. I currently run all my scheduled tasks on my Windows PC but had been wondering if I could do so from my NAS. I tried to run river-fetch.php from the Task Scheduler but it didn’t work, most likely because I didn’t know what I was doing and didn’t have the time to devote to learning it. I will try setting up the cron as you suggested. Bill

Do you need a password?

That is not necessary when one is in ones own home / secure internet area.

It can be used if necessary, the setting in in the script at line 7.

Wim

Thanks, Wim.

It can be used if necessary, the setting in in the script at line 7.

I didn’t know that. I didn’t know about the other settings in lines 39-42, either :wink:

I finally had a chance to try to set up and run the cron on my Synology NAS and it seems to be working. Here’s what the General, Schedule, and Task Settings look like in the Synology Task Scheduler. I used the script with and without the PWS Password and it works either way, per Wim’s post.

The script does run every 5 minutes and it’s not generating an error. The output.log file from the Task Scheduler looks like this, although I’m not sure what it all means!

[color=brown] % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0      0    0       0      0       0         0          0 --:--:--   --:--:--   --:--:--      0
0      0    0       0      0       0         0          0 --:--:--   0:00:01  --:--:--      0

100 111 0 111 0 0 56 0 --:–:-- 0:00:01 --:–:-- 56
100 111 0 111 0 0 56 0 --:–:-- 0:00:01 --:–:-- 56
success files loaded + history was already valid + need upload to others + 0 uploads + no roll-over needed[/color]

The message summarises all actions taken by the cron-job. It is a one line message when all results are OK.
The message is short as most cron-servers only allow a one line message to be returned from the “cron”-script.

Based on your “easyweather” settings there can be more short remarks.

success files loaded
All external files were (correctly) loaded by the PWS_load_files.php script
history was already valid
Hi/Low (if any are there new ones in the last 5 minutes) are updated into the history values, in this example there were no new high lows
need upload to others + 0 uploads
the script checks if there are uploads needed to external weather-networks, none in your case
no roll-over needed[
at 00:05 each day, 00:05 each new month and 00:05 each year the history data is “moved” to the new period

Wim

Thanks Wim. That’s very informative. This was my first time setting up a cron job in a Linux environment, although on a Synology NAS, since it’s a GUI interface in a web browser, it’s different than the good old days of creating a cron via the command line. I had system/software engineers do so at work on Linux systems I used, but never did it myself. Also, thanks to Harold for providing me with the one-liner Curl command and steps within the NAS.

And, by the way Harold, I was able to setup a cron for the river levels (river-fetch.php) on the Synology so that they update every 15 minutes by using the same Curl command that you provided for the PWSDashboard. The river update command was simply curl “https://novawx.dscloud.me/River/river-fetch.php.

Most of my other scripts that run on my Windows PC are Powershell scripts. Not sure if Powershell will run on the NAS, but I might look into it, just for fun.