HWS-template (WD34) July version available

  1. Maybe: The permissions for those files are strange: 750 ? => probably not the problem, see point 2
  2. Maybe: Caching for the text files as they seem to be updated at 3 september 23:55 => the file-timess were modified at the correct time ?
  3. Maybe: Wrong time for w34_cron_empty.php ? that one should run at ten minutes after midnight
  4. Maybe: It is not a problem as the data for 3 september 23:55 is in the file?

Also when I run the cron (w34_cron_addtoyear.php) in a browser, a new line is added to the text files .

contents of "./chartsmydata/2019_09.txt", processed as filetype "text file"
Filetime (UTC): 2019-09-04T07:47:34+00:00 which an age of 0 hrs 00 min 12 seconds

date,MAX_outsideTemp,MIN_outsideTemp,MAX_dewpoint,MIN_dewpoint,MAX_raintoday,MAX_windGust,MAX_windSpeed,MAX_radiation,MAX_barometer,MIN_barometer,SUM_lightning,MAX_UV,
2019-09-01 23:55:00,70,56.8,65.3,46.8,0,17,15,n/a,30.08,29.8,n/a,n/a,
2019-09-02 23:55:00,72.1,50.5,49.6,41.9,0,14,12,n/a,30.24,30.08,n/a,n/a,
2019-09-03 23:55:00,73.9,49.3,53.8,44.2,0,16,16.1,n/a,30.27,30.17,n/a,n/a,
2019-09-04 09:42:20,62.3,62.3,55.0,55.0,0.0000,7.0,3.0,165,30.064,30.064,0,0,
2019-09-04 09:47:34,63.2,63.2,55.0,55.0,0.0000,7.0,3.0,390,30.063,30.063,0,1,

How are you running those crons?
Do you have a log-file or a last message?

Wim

@Wim

for cron spots i use “cron-job.org” …
the “Last execution” do not send me any errors!
cf. screnn attacment for “Execution history” for (w34_cron_addtoyear.php) ??
thnx

ps_
meanwhile I had launched a script execution :oops:
/_cvt_wu_csv.php


Wim,
I changed the w34_livedata.php file.
It fixed the temps.
On top row min temp says 32, no wind or rain totals.
Baro not inhg

https://www.shermanctweather.org/pws09/index.php

Tom

Yes as there is no min temp available it has 0 in C for temp

no wind or rain totals.
Baro not inhg
Yes a type from me :oops: I attach an update
https://www.shermanctweather.org/pws09/index.php
Tom

Also check the demo for weatherflow Leuven Home Weather Station (wf version)
The data coming from WeatherFlow for stations in your area had only wind values of 0 (zero). Now theres seems to be some wind.
To have the min max values for all weather items you need to run the crons.
But it seems that the station-cron is not updating correctly, I have to setup a imperial testsite to test what is wrong,
Wim


w34_livedata.php.zip (9.62 KB)

I ran a test with your latitude/longitude, units, WF-ID on a fresh download , with the correct livedata scripts.
Every 5 minutes I ran w34_cron_stationcron in the browser.
It updated correctly the history file, so the min-max values are updated. See attached screenshot.

At your site, the cron sas it is updating the history, success files loaded + history recalculated but it seems that the file is not . The file is empty, only n/a values
https://www.shermanctweather.org/pws09/w34_listfile.php?file=./chartsmydata/history.txt&type=arr

Probably there is a problem with the permissions/ownership of the ./chartsmydata/history.txt file

I added more debug messages in the script, please unzip and upload the attached script

Wim


w34_cron_stationcron.php.zip (2.95 KB)

Wim,
I have downloaded the script.
I now have the crons setup.
I noticed wind max changed from 9 to 2?
On top row no times on wind.
Rain has zero for Sept. but we have had .80 in.

Tom

Could you also update the livedata script from HWS-template (WD34) July version available - #336 by pwsdashboard - PWS Dashboard 2012 - Weather-Watch Forum

I tested your site again and the history file is not updated with new contents.
I ran out of ideas for now, I must rethink and try to add extra debug messages.

Thanks for testing so far,

Wim

Wim,
I had downloaded that w34_livedata.php file which did correct the temps. I will download it again.
I also changed permissions on the chartsmydata file to 775.

Thank you for all your work.
Tom

Thanks, but I really do like these problems. Thank you for beta-testing the scripts so others can use them also.

I attach a new version of station-cron, I think it will clear the errors from the history file.
If not we have to remove the history.txt and let the script generate a new one.

=== For your information:
The weatherFlow-api only delivers current values for the weather-items. So the highest and lowest values for today and other periods have to come from the history file.

That file is generated and kept correct by the station-cron.
That script can not look back in time, from today the history starts with today’s values.

When the history is correct for a couple of days, we will run a script to load all history values from your WeatherUnderground data.
But first the updating of the history should function correctly.

Wim


w34_cron_stationcron.php.zip (3.02 KB)

Looks like it. . . I commented out the conditionals (for direction and average) and got the arrow back. I presume the fact that the arrow is not quite at “12 o’clock” is a rounding artefact?

Could we start a new topic for the new beta version, so July version problems don’t get swamped?


NorthWind2.png

I updated the livedata script and that corrected the temp readings, so they are all imperial now.

Barometer block is not following the “inHG” format even though it says it is.

Also, not sure I understand the Top Wind block. Is that for just the last few minutes or another time frame? I thought it was for the top gust for the day, if so it does not match the weatherflow data. Nor does the history pop-up show the correct data. w34_cron_stationcron is updating every 5 minutes. The main wind block does not have the proper gust either. I also downloaded the newest stationcron.php mentioned in message #341.

John

http://scannorthcounty.net/pws09/index.php

Hi Wim
I use WD to trigger the cron jobs so the station cron is done every 10 min the addtoyear cron is done at 23:58 but the empty cron is run at midnight and I do not see a way to change it to 00:10
will the history still work not using WU
http://ballaugh.no-ip.biz:2082/pws09/index.php is my test link on my local server

The livedata was updated twice today as I made a typo. That will remove the inHg conversion missing. I attach the script.

Also, not sure I understand the Top Wind block. Is that for just the last few minutes or another time frame? I thought it was for the top gust for the day,
Yes it is for the day.
if so it does not match the weatherflow data.
I can not find if the WF-api data for wind is in m/s or in km/h
Could you explain what is wrong and / or to what other data I can compare the api data
Nor does the history pop-up show the correct data. w34_cron_stationcron is updating every 5 minutes. The main wind block does not have the proper gust either. I also downloaded the newest stationcron.php mentioned in message #341.
John
http://scannorthcounty.net/pws09/index.php

Wim


w34_livedata.php.zip (9.62 KB)

The advice to run empty cron 10 minutes in the new day was because some weather-programs upload previous day data after 00:00

As the data AND the crons come from WD, there will not be old data uploaded after 00:00, I think.
The only real problem is with rainfall, that should be set to zero every new day.

Wim

The second livedata.php update corrected the barometer problem.

The wind question was - the top wind block and the main wind block show incorrect data. my wind gust was 19.4mph at 11:55, but the blocks show 16mph at 11:51. The history pop-up also shows 16mph at 11:51. Also do not understand how the wind and wind gust can be different values at the same time. See top wind block attached.

At this point everything else is looking good. http://scannorthcounty.net/pws09/index.php

John


WindBlock.jpg

I think this version is not the right one for a WF-owner such as you. You are running other templates also and a 24/7 weather-program.

This WF version is meant to be useful for WeatherFlow owners who

  1. do not run a weather-program 24/7 => if one uses MB or WD to get the data from their WeatherFlow, they should use another version of PWS_Dashboard.
  2. AND do not upload to WeatherUnderground. => frequent uploading to WU should give more accurate data, better use the WU version of the Dashboard.

They have to accept the consequences of not having a real 24/7 weather-program.
The PWS_Dashboard gets the WeatherFlow data every 4 to 5 minutes using thisURL
https://swd.weatherflow.com/swd/rest/observations/station/2167?api_key=_API_SETTING_

The data returned from the WF-server is a snapshot for that moment without min-max values (except for daily rain and lightning).
Weather data such as temperature and pressure do not vary that much in 4 minutes.
The max-wind will be “nearly” reached quit often during a day, as it is averaged to every so many seconds/minutes

Highest wind-gust can be a “problem” that is a "part-of-a-second value, can be a one-time happening with a large difference between the highest gust and the next one.
The snapshot of 11:51 => wind-gust 16.x mph , snapshot 11:56 probably missed the 19.4mph of 11:55
Those measurements we are discussing here are from yesterday and they are removed from the today.txt, therefor we can not check the “log”

Increasing the data retrieval rate to every 1 or 2 minutes does only slightly increase the chance to just catch the “higher” wind-gust-speeds.

===
There was another problem with the small wind/gust block, I attach an updated version for the livedata script.

===
Thanks for testing this beta-version,

Wim


w34_livedata.php.zip (9.62 KB)

hello Wim, if i use wd clientraw have no data http://www.lokaleolucalisa.altervista.org/pws09/index.php
ciao

Debug console: http://www.lokaleolucalisa.altervista.org/pws09/w34_module_test.php
Left selector for your clientraw => http://lokaleolucac.altervista.org/wdisplay2/clientraw.txt
Click on “List contents” => result

Warning: file_get_contents(http://lokaleolucac.altervista.org/wdisplay2/clientraw.txt): f
ailed to open stream: HTTP request failed! 
HTTP/1.0 403 Forbidden in /membri/lokaleolucalisa/pws09/w34_listfile.php on line 17

You should have the clientraw on the website you are working on.
You are not allowed on most websites/webhosting companies to do a file_get_contents from another domain.

Wim

thank you Wim, very kind, hello

My weatherFlow hardware is completely separate from my Davis weather software, at any rate the lack of immediate feedback of data is an issue for me with the wf template and the pwsWD template. I will continue to follow and update the the templates as needed. Thanks for your comments on the templates.

John