cloudy cloudy

Author Topic: ***closed*** weather34 for WeatherDisplay (clientraw and WDapi)  (Read 23428 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #270 on: February 02, 2019, 08:24:48 AM »
Thank you Win.
info.php added
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
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline GW400

  • Posts: 83
  • Klepp, Norway
  • OS/Browser:
  • iOS 12.1.3
  • Safari 12.0
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #271 on: February 02, 2019, 08:32:01 AM »
Thankís a lot Wim!👍
Iíll add curl support Shortly.
Did you use Fiddler or something similar to find the ertor?
Regards G400

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #272 on: February 02, 2019, 08:43:55 AM »
Thankís a lot Wim!👍
Iíll add curl support Shortly.
Did you use Fiddler or something similar to find the ertor?
Default, all scripts run with error display & reporting switched off.
But there is a test-bed which switches all error reporting on, suitable for most of the scripts ......./w34_module_test.php. This is all needed for 80% of the errors
When that does not help one can test any (other) script with ....../_test.php?test=xyz.php

Wim
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline GW400

  • Posts: 83
  • Klepp, Norway
  • OS/Browser:
  • iOS 12.1.3
  • Safari 12.0
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #273 on: February 02, 2019, 08:48:51 AM »
Great!
Very usefull to know about this.
Thank you a lot for all the good work you are doing!
Regards G400

Offline jzinckgra

  • Posts: 150
  • Maine, U.S.A
  • OS/Browser:
  • Win NT 10.0
  • Firefox 60.0
    • Personal weather site
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #274 on: February 02, 2019, 01:55:21 PM »
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.

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #275 on: February 02, 2019, 02:23:39 PM »
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
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline jzinckgra

  • Posts: 150
  • Maine, U.S.A
  • OS/Browser:
  • Win NT 10.0
  • Firefox 60.0
    • Personal weather site
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #276 on: February 02, 2019, 02:44:00 PM »
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: http://weather911.net/pwsWD/index.php

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #277 on: February 02, 2019, 02:56:13 PM »
Both settings are ticked in WD screen. Graphs are not empty for me: http://weather911.net/pwsWD/index.php
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"
Code: [Select]
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

Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,553
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 72.0.3626.81
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #278 on: February 02, 2019, 03:53:34 PM »
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.

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.

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,171
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 71.0.3578.98
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #279 on: February 02, 2019, 04:11:56 PM »
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.         
« Last Edit: February 02, 2019, 04:18:55 PM by niko »

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,553
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 72.0.3626.81
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #280 on: February 02, 2019, 04:28:42 PM »
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.
« Last Edit: February 02, 2019, 04:47:08 PM by NorCal Dan »

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,346
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 71.0.3578.98
    • My PWS at Leuven Belgium Europe
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #281 on: February 02, 2019, 04:37:14 PM »
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.
The value which is shown comes from the WDapi (which uses metric units). You can inspect all values at . . . /pwsWD/w34_module_test.php  click on "Show WDapi values"

Code: [Select]
rain total last 60 minutes [43] => 0.5
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,553
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 72.0.3626.81
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #282 on: February 02, 2019, 04:53:19 PM »
The value which is shown comes from the WDapi (which uses metric units). You can inspect all values at . . . /pwsWD/w34_module_test.php  click on "Show WDapi values"

Code: [Select]
rain total last 60 minutes [43] => 0.5

Thanks for that...I will keep an eye on it and see what happens.

Offline jzinckgra

  • Posts: 150
  • Maine, U.S.A
    • Personal weather site
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #283 on: February 02, 2019, 05:31:03 PM »
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"
Code: [Select]
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 am using dapi for tasks

Sent from my Pixel 2 using Tapatalk


Offline jzinckgra

  • Posts: 150
  • Maine, U.S.A
    • Personal weather site
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #284 on: February 02, 2019, 06:18:23 PM »
Any reason I can't bring up pop ups on phone?

Sent from my Pixel 2 using Tapatalk