***closed*** weather34 for WeatherDisplay (clientraw and WDapi)

Have you found the windows magnifier it my help
https://support.microsoft.com/en-us/help/11542/windows-use-magnifier

Wow! I don’t quite need that much, thanks!

It appears the tags being used in w34 for rain are incorrect for last hour rain. The monthly is also wrong but that is an issue with WD not correctly reporting data until the first day of a month is over…but the last hour rain as shown in the WD screen is correct. Is w34 able to access the Clientrawhour.txt file to grab info?


wd34rain.png

wd_rain.png

Weather forecast from Darksky is not working properly.
The API key is correct and I can see from my account page on their website that my installation is pulling the API about 80 - 100 times a day.
Still, the information shown is not up to date. See attached picture.


It is impossible to check what is happening when there is no link to the website.

Wim

Sorry, I forgot to add url!
Try this one:
new-weather.meisal.com:82

There is one script to load all external data:

Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/weather/public_html/w34_load_files.php:201 
Stack trace: #0 /home/weather/public_html/w34_load_files.php(50): fnctn_load_file() 
#1 /home/weather/public_html/_test.php(4): include('/home/weather/p...') 
#2 {main} thrown in /home/weather/public_html/w34_load_files.php on line 201

Your own private PHP should support CURL to load the data from external sites.

I do not know which script is successfully accessing and using the DarkSky data 80-100 times a day.
All external accesses for “HWS-template for WD” should pass through this script.

For future problems you could make a info.php script available on your site. I attach this 1 line script,

Wim


info.php.zip (179 Bytes)

Thank you Win.
info.php added

Yes there is a problem. For clientraw it seems correct during the day, but not just after midnight, and when using the adapted script. WDapi fails also.

I think that “Rain last hour” is a nice-to-have but non-essential value. It is not available in some other w34-versions. It was inserted as it was available from a Meteobridge-tag. Maybe we should drop that value.

If users want that value, we first have to define what it should contain: Assume it is now 10:15.
Do we want a “last-hour” => from 1 minute ago to 60 minutes ago: 09:15 => 10:14, that is how I try to calculate it from clientraw’s 60 minutes fields.
Or “previous-hour” : 09:00 => 10:00, what i expected from the Wd-api
That value should also not be reset at 24:00 hours.

Maybe some active WD and HWS-user could ask Brian to check this out and how we can have a real “last-hour”
No problem to use another clientraw file for that, as long as the user it is uploading, but is would be nice to have the same value for clientraw and for Wdapi.

Wim

There is indeed no CURL-support in your PHP.
Is should be in your php info as in the attached screenshot
You have to add that in your php config otherwise no external files can be loaded when using these scripts.

Wim


curl.jpeg

Thank

[quote author=GW400 link=topic=67468.msg543108#msg543108 date=1549096321]
Thank

Great!
Very usefull to know about this.
Thank you a lot for all the good work you are doing!

Question about the temp popup. When the cron job resets at midnight, I thought the X-axis would start from 0:00, not going back to the previous day’s temps. Is there a setting to change this? I’m also getting dewpoint spikes that are not actually happening according to my Davis.


There should be two midnight cron-jobs 1 before and 1 after midnight.
The second one purges the SQL-table and writes a new header to the .csv file.
When I now check your files, they are empty, => chartsmysql/result.csv only has the header line with the fields names.
The graphs are therefor empty also.
Wim

Both settings are ticked in WD screen. Graphs are not empty for me: Raymond, ME Home Weather Station (wd version)


The second job should clear the table and clear the daily .csv
The daily file ./chartsmysql/result.csv
Has one line only , with the headers
Filetime (UTC): 2019-02-01T23:00:32+00:00 which an age of 15 hrs 46 min 02 seconds
It was purged exactly midnight Norway time. Your question about old data is answered, that data will be correctly removed at midnight
Now to find out why no data is added during the day, use the test program . . . /_test.php?test=w34_cron_stationcron.php “et voila”

Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/weather/public_html/w34_load_files.php:201 

Same reason as for another problem, no CURL. The main task of cronjob is to load the data before it is needed. The script fails so it can not do the other tasks. You could set WDapi to do the task.

Wim

I would expect that the last hour would be the previous 59 minutes from the current time. My screen grabs were from 1900 hrs (not close to midnight), and the value shown in w34 was 0.95" out of the total days rain amount of 0.96". My vote is if the value is going to be shown then it should be correct, otherwise remove it.

I agree. I’ve played with the data and I don’t think it’s reasonable to make this calculation from what is currently available.

I haven’t found a WD tag with last hour rain either, would be nice to have it somewhere since it is a WD main screen displayed value.

I think the WD console is able to correctly compute the last hour rain but for some reason Brian never added it to the clientraw file. I would disagree that it isn’t an important weather detail to display…

I just noticed that w34 was correctly showing last hour rain amount until there was no rain last hour. It has been over an hour since the last rain tip and now w34 is now showing todays total rain amount for last hour rain amount.