cloudy cloudy

Author Topic: HWS-template (WD34) July version available  (Read 3041 times)

0 Members and 2 Guests are viewing this topic.

Offline Mogens

  • Posts: 7
  • Frederikshavn, DK
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.100
Re: HWS-template (WD34) July version available
« Reply #135 on: July 14, 2019, 02:42:40 PM »
I have installed this fine template.
My weather station is a WS-1001 clone that sends the data to WU every 16 seconds without using a computer. I have a new API key from WU and get live data from there.
w34_cron_stationcron.php runs every 5 minutes.

But I have some mystifications.

-  The current data is displayed correctly, but the max and min values ​​for both wind and temperature look mysterious.
It appears that it is always the minimum value displayed for both max and min for temperature. What numbers are displayed for max and minimum wind I cannot figure out.

-  I selected 1 decimal for temperature display. I also get 1 decimal, but the temperature is always rounded to the nearest whole number, so the decimal always shows zero. (If I switch to Fahrenheit, a decimal will be displayed correctly).

-  If I use Chrome browser, pop-ups for displaying e.g. "Wind today" fills the whole screen and the close button does not work, so I can only go back to the main screen with the browser's left arrow. When I use Firefox, it works normally.

Is that something that can be arranged?
There is no rush. The weather is the same, no matter what my weather station reports.

Link to template
http://weather.inaogmogens.dk

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #136 on: July 14, 2019, 03:17:21 PM »
. . . shortened  . . .
-  The current data is displayed correctly, but the max and min values ​​for both wind and temperature look mysterious.
It appears that it is always the minimum value displayed for both max and min for temperature. What numbers are displayed for max and minimum wind I cannot figure out.
The template can not display more information than WU gives us.
Please check the debug-console here => http://weather.inaogmogens.dk/w34_module_test.php
Second row shows the file-contents as loaded from WU at the left dropdown-box:
"./jsondata/wucom.txt" => last measurement  =>current temp = 20 degrees
"./jsondata/wucom_day.txt" => todays high-lows
As you can see the three temp fields contain the same data, 16 degrees

You can check all the (recalculated) values we use in the template right dropdown-box: "Live data values"
I assume there is a small hick-up in the WU data as other stations are reporting normal values at the moment
Quote
-  I selected 1 decimal for temperature display. I also get 1 decimal, but the temperature is always rounded to the nearest whole number, so the decimal always shows zero. (If I switch to Fahrenheit, a decimal will be displayed correctly).
The temperature WU gives us is without any decimals. That is a huge problem for all users. Also their new dashboard has the same problem.
When you use the F button the template scripts do the recalculation and round it to the 1 decimal you want.
But when loading the data from WU you should better use no decimals for temp.
Quote
-  If I use Chrome browser, pop-ups for displaying e.g. "Wind today" fills the whole screen and the close button does not work, so I can only go back to the main screen with the browser's left arrow. When I use Firefox, it works normally. Is that something that can be arranged?
I can not reproduce that using Chrome on your website. I myself use Chrome 95% of the time and do all development and testing with it. All graphs should work the same way as they are using the same script and the same pop-up code.
I attach a screenshot of the "Today" graph using Chrome.
QUESTION: Is it the daily-graph or the forecast (4th pop-up) by wind?
Quote
There is no rush. The weather is the same, no matter what my weather station reports.
Link to templatehttp://weather.inaogmogens.dk
Thanks for using the template, and i will check a few times why your min-max temp values are all equal.

Wim

P.S. comparing your weather-values in the WU-uploads with those on your WU-dashboard there are more errors in the upload, also the pressure  min-max are both equal to the min value
https://www.wunderground.com/dashboard/pws/IDKFREDE2
« Last Edit: July 14, 2019, 03:29:12 PM by wvdkuil »

Offline Mogens

  • Posts: 7
  • Frederikshavn, DK
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.100
Re: HWS-template (WD34) July version available
« Reply #137 on: July 14, 2019, 06:07:29 PM »
Thanks for the quick response.

Temperature without decimals is OK for me. I just wondered.

The mystification with the pop-ups applies to all the links in the bottom of each field, but there is obviously a mistake in my Chrome - I just borrowed my wife's computer, and it works correctly, so sorry for the inconvenience  :oops:

Concerning maximum and minimum issues.
When I test modules that you suggest, I can see that the wucom_yday.txt file, which the program generates, writes minimum and maximum temperatures equally.

It seems to me that part of this file has been copied from wucom.txt in a way I can't figure out.

However, I can observe that the correct maximum and minimum temperatures and wind speeds can be found in the "pristine" wucom_yday.txt file. As far as I can see, WU has actually sent them correctly.

See
http://weather.inaogmogens.dk/jsondata/wucom_yday.txt

Mogens

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #138 on: July 14, 2019, 07:39:58 PM »
FOUND A SOLUTION SEE NEXT RESPONSE

. . . shortened . . .
Concerning maximum and minimum issues.
When I test modules that you suggest, I can see that the wucom_yday.txt file, which the program generates, writes minimum and maximum temperatures equally.
Those are exact copies of the file as we get from WU
https://api.weather.com/v2/pws/observations/current?stationId=IDKFREDE2&format=json&units=m&apiKey=_API_SETTING_   => current conditions
is  saved in    http://weather.inaogmogens.dk/jsondata/wucom.txt  to be used for 180 seconds before reloaded

https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=m&date=20190714&apiKey=_API_SETTING_   => todays data for July 14
is saved in  http://weather.inaogmogens.dk//jsondata/wucom_day.txt  to be used for 600 seconds before reloaded

https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=m&date=20190713&apiKey=_API_SETTING_  => yesterdays data for July 13
is saved in http://weather.inaogmogens.dk/jsondata/wucom_yday.txt  to be used until the next day.

Quote
However, I can observe that the correct maximum and minimum temperatures and wind speeds can be found in the "pristine" wucom_yday.txt file. As far as I can see, WU has actually sent them correctly.
See  http://weather.inaogmogens.dk/jsondata/wucom_yday.txt
The values on the template you are talking about are from today as generated by WeatherUnderground.
Those values are generated from the database and sent to the website every time the scripts ask for it.
So even if the yesterday values are correct, the todays values were and are incorrect.
You can test that yourself with the link above, just fill in your api-key replacing the _API_SETTING_
Quote
Mogens
RECAP:
I even used another API-key and still the data from July 13 has correct values, from today, July 14, has incorrect values.
Your dashboard shows correct values for today but the api data has incorrect (the same) values for all temp fields and also equal values for pressure.
The time fields show that even in the browser, todays data is from just after midnight. obsTimeLocal   "2019-07-14 00:04:51"
So there is definitely a problem with the database at WU, not with a script.
Code: [Select]
observations stationID "IDKFREDE2"
tz "Europe/Copenhagen"
obsTimeUtc "2019-07-13T22:04:51Z"
obsTimeLocal "2019-07-14 00:04:51"
metric
tempHigh 16  tempLow 16  tempAvg 16
pressureMax 1014.22  pressureMin 1014.22

When I retrieve my own and other stations I get a correct obsTimeLocal and correct values
Code: [Select]
stationID "IVLAAMSG47"
tz "Europe/Brussels"
obsTimeUtc "2019-07-14T19:29:38Z"
obsTimeLocal "2019-07-14 21:29:38"
metric
tempHigh 20  tempLow 15  tempAvg 17

When I retrieve your data but in English units (F, mph, inHg) I get correct values
https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=e&date=20190714&apiKey=_API_SETTING_
Code: [Select]
obsTimeLocal "2019-07-14 21:29:41"
imperial
tempHigh 72   tempLow 60   tempAvg 65
pressureMax 30.01  pressureMin 29.95

Lets see if it is OK tomorrow, otherwise I have to think about some solution using English units.
You can check my test-wu-website at https://hwsdemo.000webhostapp.com/pws07/index.php
It displays the data correctly as WU is delivering correct data.
For now I have no quick solution.
Wim
« Last Edit: July 14, 2019, 08:43:19 PM by wvdkuil »

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #139 on: July 14, 2019, 08:53:52 PM »
. . . shortened . . .
There seems to be an error in WU data retrievel.
It always returns the same data you first asked for the day.  The whole day exactly the same data is returned
https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=m&date=20190714&apiKey=_API_SETTING_
That is why i got recent data when testing a few valid WU-ID's, as they did not used this api earlier today.
I now tried a modified (but not  in the official API-docs) api call which seems to work better, a range of dates but for today only.  I think it is a 50% change that it works tonight.
https://api.weather.com/v2/pws/history/daily?stationId=IVLBRABA2&format=json&units=m&startDate=20190714&endDate=20190714&apiKey=_API_SETTING_

I adapted the script, please test it a.s.a.p.

But probably they start using a large caching server which simply does not return the data more often then 1 /day. Also for today.

Wim
« Last Edit: July 14, 2019, 09:03:48 PM by wvdkuil »

Offline Mogens

  • Posts: 7
  • Frederikshavn, DK
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.100
Re: HWS-template (WD34) July version available
« Reply #140 on: Today at 07:20:49 AM »
Hello once again thanks for quick response.

As you probably have discovered, I have no understanding of programming, but with your explanations I understand more and more  :wink:.

I have replaced w34_load_files.php with the new one.
Unfortunately, it doesn't seem to change anything, - still the same value for min and max.

I'm almost sorry to bother you. If the error is with WU, the problem may be impossible for you to solve.

Mogens

Offline Mogens

  • Posts: 7
  • Frederikshavn, DK
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.100
Re: HWS-template (WD34) July version available
« Reply #141 on: Today at 08:04:42 AM »
Correction:
I tried again my wife's computer and her computer showed the page correctly.
Now I've cleaned up my Chrome and it looks like the max and min are currently showing up correctly. I will watch it during the day.

The problem with pop-ups is no longer there either.

« Last Edit: Today at 08:27:15 AM by Mogens »

Offline Mogens

  • Posts: 7
  • Frederikshavn, DK
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.100
Re: HWS-template (WD34) July version available
« Reply #142 on: Today at 01:15:18 PM »
Unfortunately, still an inaccuracy.
Early in the afternoon, the temperature crept up above 20 degrees for a short while.
It can be properly seen on the Temp today pop-up.
But maximum temperature is still displayed as 19 degrees.

http://weather.inaogmogens.dk

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #143 on: Today at 01:19:22 PM »
Unfortunately, still an inaccuracy.
Early in the afternoon, the temperature crept up above 20 degrees for a short while.
It can be properly seen on the Temp today pop-up.
But maximum temperature is still displayed as 19 degrees.

http://weather.inaogmogens.dk
Ye, I know.
I am on vacation until July 28. immediately thereafter I will have a new version for todays and yesterdays data.
Maybe even earlier, but one has to wait for a hours to check if a solution works also later in the day.

Wim

Offline Mogens

  • Posts: 7
  • Frederikshavn, DK
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.100
Re: HWS-template (WD34) July version available
« Reply #144 on: Today at 01:49:59 PM »
Ye, I know.
I am on vacation until July 28. immediately thereafter I will have a new version for todays and yesterdays data.
Maybe even earlier, but one has to wait for a hours to check if a solution works also later in the day.

Wim

It's great that you want to look at it.
But you must enjoy your vacation.
As I wrote, there is nothing urgent.

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #145 on: Today at 02:29:02 PM »
It's great that you want to look at it.
But you must enjoy your vacation.
As I wrote, there is nothing urgent.
Thanks, but for myself and all other WU-template users it needs to be solved somehow.

And rest assured, this is the fun part of this hobby, how to solve this kind of challenges.

Wim




Offline MatteoPV

  • Posts: 3
  • OS/Browser:
  • Win NT 6.3
  • Firefox 68.0
Re: HWS-template (WD34) July version available
« Reply #146 on: Today at 03:25:44 PM »
I wanted to ask something. I ordered UV and solar radiation sensors for my Davis VP2. Once arrived I will activate in the template the relative section that will indicate the data coming from these two sensors. In the pemplate Demo the UV / Solar box is active but not by trend graphs. I wanted to know if they will ever be implemented and especially if the indication of the ET index will ever be implemented.
It's just my curiosity

Offline WxTrader

  • Posts: 3
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Mozilla compatible
Re: HWS-template (WD34) July version available
« Reply #147 on: Today at 03:29:49 PM »
I have installed your new template version at https://www.weatherinharrogate.co.uk/pwsWDjuly/ and I have changed all the settings except the path to the clientraw.txt data and the webcam picture. If I try putting these paths in I get a Wordfence Error on my screen with error 403. The previous version is installed at https://www.weatherinharrogate.co.uk/pwsWD/ and this works fine. I can change the path in the easyweather setup up file and it is okay in this version. I can send you the password.   

-------------------------This is what appears on the screen
403 Forbidden

A potentially unsafe operation has been detected in your request to this site.


Generated by Wordfence at Mon, 15 Jul 2019 15:24:00 GMT.
Your computer's time: Mon, 15 Jul 2019 15:23:59 GMT.

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #148 on: Today at 04:16:41 PM »
I have installed your new template version at https://www.weatherinharrogate.co.uk/pwsWDjuly/ and I have changed all the settings except the path to the clientraw.txt data and the webcam picture. If I try putting these paths in I get a Wordfence Error on my screen with error 403. The previous version is installed at https://www.weatherinharrogate.co.uk/pwsWD/ and this works fine. I can change the path in the easyweather setup up file and it is okay in this version. I can send you the password.   
-------------------------This is what appears on the screen
Code: [Select]
403 Forbidden

A potentially unsafe operation has been detected in your request to this site.
Generated by Wordfence at Mon, 15 Jul 2019 15:24:00 GMT.
Your computer's time: Mon, 15 Jul 2019 15:23:59 GMT.
April version: https://www.weatherinharrogate.co.uk/pwsWD/w34_module_test.php  => click left bottom box with ../weatherdisplay/clientraw.txt
=> 403 Forbidden A potentially unsafe operation has been detected in your request to this site. a.s.o.
So both versions complain, but the April version  works although there is a complaint.

I inserted in the html the link to the webcam in the July version => OK
So these errors seem not to block the working. The Wordfence does not like linking to another folder backwards, i think. But it still seems to work.
Could you please add the correct links to your settings?  So that i can see if it works?
Wim
« Last Edit: Today at 05:07:26 PM by wvdkuil »

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,290
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 75.0.3770.100
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34) July version available
« Reply #149 on: Today at 04:29:32 PM »
I wanted to ask something. I ordered UV and solar radiation sensors for my Davis VP2. Once arrived I will activate in the template the relative section that will indicate the data coming from these two sensors. In the pemplate Demo the UV / Solar box is active but not by trend graphs. I wanted to know if they will ever be implemented and especially if the indication of the ET index will ever be implemented.
It's just my curiosity
The data for the graphs com from WU and there is only UV data available, no solar.
As it is still not clear if and how WU will continue access to out own data, I will start after my vacation with new graphs based on the new WU-api.
The 7 day data contains both UV and solar.  There can probably be a meaningful  UV-solar graph added.

I do not understand what what you mean with ET-index.
There is a calculated ET-value (Evapotranspiration) when there is a Davis console but not all weather-programs deliver that.
There are requests for soil-moist sensors and extra temp-hum sensors, so the ET-value can be added to the list of new weather-values.
Be aware that the WU-data does not deliver any ET-values as I am aware of.

Use for all these and further  "wishes" the special "wishes"-topic => https://www.weather-watch.com/smf/index.php/topic=68196.new#new
There we discuss the needed enhancements to the template for the next version.

Wim

 

cumulus