cloudy cloudy

Author Topic: HWS-template (WD34 / weather34) April release  (Read 3648 times)

0 Members and 2 Guests are viewing this topic.

Offline bitsostring

  • Posts: 796
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: HWS-template (WD34 / weather34) April release
« Reply #75 on: May 04, 2019, 05:55:44 PM »
But the three warning-scripts are external / other authors scripts and better maintained by not changing too much.

That word "external" made me think that I could port them over to my January release. . . but it's not that simple, is it  :?
It's meant to be fun. . .

Offline ktuley

  • Posts: 5
  • Albuquerque, NM USA
  • OS/Browser:
  • Mac OS X 10.14.5
  • Safari 12.1.1
    • Tuley Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #76 on: May 05, 2019, 05:41:05 PM »
Thanks bitsostring for noticing the clock issue...a
and double thanks to Wim for the quick fix...

appreciate you both!!!!


Offline bitsostring

  • Posts: 796
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: HWS-template (WD34 / weather34) April release
« Reply #77 on: May 08, 2019, 02:04:15 PM »
As posted in Wish List:

Quote
I know we get to choose the rain rate units, but I still think the units should be shown in the Rainfall block. Please. . .

It actually doesn't matter what you choose in easyweather, because you always get mm/hr. Rain rate from clientraw #10 is converted in w34_livedata.php as:

Code: [Select]
$num                            = $wd[10]*60;            //  mm/min to mm/hr
$weather["rain_rate"]           = convert_precip ($num,$from,$to);

and is used unchanged in rainfall_block.php no matter what is shown in w34_settings1.php  :?
It's meant to be fun. . .

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,129
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 74.0.3729.131
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #78 on: May 08, 2019, 02:47:54 PM »
As posted in Wish List:
It actually doesn't matter what you choose in easyweather, because you always get mm/hr. Rain rate from clientraw #10 is converted in w34_livedata.php as:
Code: [Select]
$num                            = $wd[10]*60;            //  mm/min to mm/hr
$weather["rain_rate"]           = convert_precip ($num,$from,$to);
and is used unchanged in rainfall_block.php no matter what is shown in w34_settings1.php  :?
http://wd34.weather-template.com/pws07/
Rainrate is shown in rain block with either 3 decimals for unit / hour  or 4 decimals for unit / minute.
The translated-period is shown after the translated word for "rate"

I can not find data yet with a correct value for rain-rate
Wim
« Last Edit: May 08, 2019, 02:54:35 PM by wvdkuil »

Offline bitsostring

  • Posts: 796
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: HWS-template (WD34 / weather34) April release
« Reply #79 on: May 08, 2019, 02:56:07 PM »
rainrate is shown in rain block with either 3 decimals for unit / hour  or 4 decimals for unit / minute.
The translated-period is shown after the translated word for "rate"

I can not find data yet with a correct value for rain-rate
Wim

Sorry, Wim, I meant the Jan and April releases.

(And, presumably, the beta at http://wd34.weather-template.com/pwsTEST/)
« Last Edit: May 08, 2019, 03:03:43 PM by bitsostring »
It's meant to be fun. . .

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,129
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 74.0.3729.131
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #80 on: May 08, 2019, 03:04:51 PM »
Sorry, Wim, I meant the Jan and April releases.

(And, presumably, the beta at http://wd34.weather-template.com/pwsTEST/)
Nor in any of the other weather-versions, I think. 

The beta is identical to the April release as there is no new beta, yet.

Offline richardcr

  • Posts: 4
  • OS/Browser:
  • Win NT 10.0
  • Chrome 74.0.3729.131
    • Collapit Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #81 on: May 09, 2019, 10:58:54 AM »
Not sure if this is a WU thing or not but if you visit my site at http://www.collapit.org.uk/pwsWD/index.php, blocks displaying weather station data are first shown as offline (even though the station is online). Refresh the page and every block is updated. Do nothing and after 30 seconds or so the temperature block will update and then one by one the other blocks will gradually update. It is several minutes though before the barometer updates by itself.
« Last Edit: May 09, 2019, 11:20:16 AM by richardcr »

Offline bitsostring

  • Posts: 796
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
It's meant to be fun. . .

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,129
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 74.0.3729.131
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #83 on: May 09, 2019, 12:05:33 PM »
Not sure if this is a WU thing or not but if you visit my site at http://www.collapit.org.uk/pwsWD/index.php, blocks displaying weather station data are first shown as offline (even though the station is online). Refresh the page and every block is updated. Do nothing and after 30 seconds or so the temperature block will update and then one by one the other blocks will gradually update. It is several minutes though before the barometer updates by itself.
That behavior is "by design". The HWS-template expects that a weather-program uploads the weather-data. When the template is started all blocks are loaded and display the available data.  Together with the block-scripts a check-the-data script (w34_load_files.php) is started  to check if the other data-sets which should be loaded from external websites (f.i. forecast) are up-to-date and loads those data sets if they are to old.

A visitor arrives at your site:
=> index.php draws the empty boxes, menu a.s.o.
=> index.php starts all block-scripts
===> those block-scripts display the available data
===> and as long as the visitor remains at your site
=====>  those scripts are "restarted" every so many seconds to display the most recent data

=> index.php also starts w34_load_files.php
===> which checks the  age of the external data and loads the "to old" data-sets
===> and as long as the visitor remains at your site
=====>  w34_load_files.php is "restarted" every 5 minutes to check if the external data is recent

As long as there is at least 1 visitor the data remains valid and the "on-line" times are displayed.

The problem:
After a period, f.i. 1 hour,  of inactivity at your site, the next start will always detect old weather-data .
The blocks which need external data display "off-line".  Within  few minutes the correct data is retrieved by the w34_load_files.php script. Every block when it refreshes itself,  will find new data available and switches to "on-line times"

As WU does not upload the data to your website, the w34_load_files.php script grabs the necessary data from the WU-website, when it is active. When there is no visitor the WU data can not be loaded.

The solution is the use of a cron-job to continue the loading of data even when there are no visiors.

That cron-job should execute http://www.collapit.org.uk/pwsWD/w34_cron_stationcron.php  every 5 minutes or so.
You can use your providers cron-server or a free/paid external cron-server.

Wim



« Last Edit: May 09, 2019, 12:13:58 PM by wvdkuil »

Offline GW400

  • Posts: 81
  • Klepp, Norway
  • OS/Browser:
  • Win NT 10.0
  • Chrome 74.0.3729.131
Incorrect wind speed
« Reply #84 on: May 09, 2019, 09:03:01 PM »
I use WeeWx to download data generated by Davis Vantage Pro2 using Davis Weather Envoy to read the data via USB port.
Data is made available to WD34 in realtime.txt file using Cumulus Real-Time service extension crt.

Somehow WD34 is interpreting wind speed data from realtime.txt incorrectly:
                        Time         Gust  Wind
WeeWx      08:35   9,02   6,46
WD34      08:35   33,8   29,0
WD34/WeeWx                   3,74   2,49

WD34 gust/WeeWx gust is close to 3,6 which led me to think about conversion error (wind speed x 3,6 m/s is wind speed in km/hour), but WD34 wind/WeeWx wind is down to 2,5 which might indicate this is not the case.
See also the two charts, one from Belchertown Skin and one from WD34
Urls: weather.meisal.com (WD34) and iwdl.meisal.com (Belchertown)
« Last Edit: May 09, 2019, 09:06:03 PM by GW400 »
Regards G400

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,129
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 74.0.3729.131
    • My PWS at Leuven Belgium Europe
Re: Incorrect wind speed
« Reply #85 on: May 10, 2019, 08:07:34 AM »
I use WeeWx to download data generated by Davis Vantage Pro2 using Davis Weather Envoy to read the data via USB port.
Data is made available to WD34 in realtime.txt file using Cumulus Real-Time service extension crt.

Somehow WD34 is interpreting wind speed data from realtime.txt incorrectly:
           Time     Gust   Wind
WeeWx      08:35    9,02   6,46
WD34       08:35    33,8   29,0
WD34/WeeWx          3,74   2,49

WD34 gust/WeeWx gust is close to 3,6 which led me to think about conversion error (wind speed x 3,6 m/s is wind speed in km/hour), but WD34 wind/WeeWx wind is down to 2,5 which might indicate this is not the case.
See also the two charts, one from Belchertown Skin and one from WD34
Urls: weather.meisal.com (WD34) and iwdl.meisal.com (Belchertown)
Your realtime.txt uploaded file  /nfs/weather/realtime.txt changes every 2 seconds.
You can check at http://weather.meisal.com/w34_module_test.php, just click on "List contents" button on the left.
Inside the uploaded file the wind values are the ones to change nearly every click.

So it is very difficult to pinpoint if there is a problem and what it could be.
This is the data retrieval PHP-code fin w34_livedata.php for weewx/realtime.txt
Code: [Select]
$weather["wind_units"]         = $data_wind = $cu[13];
$weather["wind_speed"]         = convert_speed ($cu[6],$from,$to);
$weather["wind_speed_avg"]     = convert_speed ($cu[5],$from,$to);
$weather["wind_gust_speed"]    = convert_speed ($cu[40],$from,$to);
$weather["wind_speed_max"]     = convert_speed ($cu[30],$from,$to);
$weather["wind_gust_speed_max"]= convert_speed ($cu[32],$from,$to);
I copied multiple times a realtime.txt file from the w34_module_test.php display,  and did some testing. 
The uploaded values in realtime.txt  from 09:09:07 are
Code: [Select]
    [13] => km/h
    [6] => 3.2
    [5] => 0.7
    [40] => 4.8
    [30] => 11.3
    [32] => 20.9
When the wd34-test-site is in km/h the displayed values are identical to those from the upload.
Code: [Select]
    [wind_speed] => 3.2
    [wind_speed_avg] => 0.7
    [wind_gust_speed] => 4.8
    [wind_speed_max] => 11.3
    [wind_gust_speed_max] => 20.9
When switching to Nordic units, the calculated values seem correct
Code: [Select]
    [wind_speed] => 0.9
    [wind_speed_avg] => 0.2
    [wind_gust_speed] => 1.3
    [wind_speed_max] => 3.1
    [wind_gust_speed_max] => 5.8

  • Your WD34 website is refreshed every 2 seconds, your iwdl website uses  1/minute data http://iwdl.meisal.com/json/weewx_data.json
  • So there will be differences between the values as the upload-time will always be different.
  • The question if both sites display the same variables is not easy to answer also as I do not know on what weather-station-variables the iwdl site is based.

It is extremely difficult to compare different templates. Especially when they paint the window using different upload files.
I also have no idea what the two rows for WD34 are referring to, there is only 1 link to a WD34 website.
WD34       08:35    33,8   29,0
WD34/WeeWx          3,74   2,49


The internal WD34 upload filename is /nfs/weather/realtime.txt If you have the external URL of the realtime.txt file I can do some more tests.

====

The graphs:
I think i did find a problem with the graphs when not using WU for that. Please unzip attachment.
After making copy of the two scripts, replace the scripts on your webserver.
Can you please PM me when you have done so, I want to check if the graphs are correct.

Wim
« Last Edit: May 10, 2019, 12:37:59 PM by wvdkuil »

Offline richardcr

  • Posts: 4
  • OS/Browser:
  • Win NT 10.0
  • Chrome 74.0.3729.131
    • Collapit Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #86 on: May 10, 2019, 08:15:54 AM »
That behavior is "by design". The HWS-template expects that a weather-program uploads the weather-data. When the template is started all blocks are loaded and display the available data.  Together with the block-scripts a check-the-data script (w34_load_files.php) is started  to check if the other data-sets which should be loaded from external websites (f.i. forecast) are up-to-date and loads those data sets if they are to old.

A visitor arrives at your site:
=> index.php draws the empty boxes, menu a.s.o.
=> index.php starts all block-scripts
===> those block-scripts display the available data
===> and as long as the visitor remains at your site
=====>  those scripts are "restarted" every so many seconds to display the most recent data

=> index.php also starts w34_load_files.php
===> which checks the  age of the external data and loads the "to old" data-sets
===> and as long as the visitor remains at your site
=====>  w34_load_files.php is "restarted" every 5 minutes to check if the external data is recent

As long as there is at least 1 visitor the data remains valid and the "on-line" times are displayed.

The problem:
After a period, f.i. 1 hour,  of inactivity at your site, the next start will always detect old weather-data .
The blocks which need external data display "off-line".  Within  few minutes the correct data is retrieved by the w34_load_files.php script. Every block when it refreshes itself,  will find new data available and switches to "on-line times"

As WU does not upload the data to your website, the w34_load_files.php script grabs the necessary data from the WU-website, when it is active. When there is no visitor the WU data can not be loaded.

The solution is the use of a cron-job to continue the loading of data even when there are no visiors.

That cron-job should execute http://www.collapit.org.uk/pwsWD/w34_cron_stationcron.php  every 5 minutes or so.
You can use your providers cron-server or a free/paid external cron-server.

Wim

Thanks Wim. Issue resolved.
I'm new to cron-jobs and so this is a good learning experience. The solution you suggested was easy for me to achieve by opening an account with cron-job.org and scheduling a job.
Is it worth mentioning this in the installation instructions?
Richard

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,129
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 74.0.3729.131
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #87 on: May 10, 2019, 08:24:03 AM »
Thanks Wim. Issue resolved.
I'm new to cron-jobs and so this is a good learning experience. The solution you suggested was easy for me to achieve by opening an account with cron-job.org and scheduling a job.
Is it worth mentioning this in the installation instructions?
Richard
AFAIK (as far as i know) you are a very rare species, using WU.
So you are the first one to encounter this.

But yes, it should be in the documentation and it will be for sure when i am finished with the final WD34 release somewhere in October-December.
Wim

Offline meteosa

  • Posts: 48
  • Italy
  • OS/Browser:
  • Win NT 10.0
  • Firefox 66.0
    • MeteoSantAngelo.it
Re: HWS-template (WD34 / weather34) April release
« Reply #88 on: May 10, 2019, 07:00:59 PM »
Hello,
I can't translate the phrase: "This hour:" in the "Current Conditions" block of WD, I added the sentence in the language file but it does not translate it, why?
Thank you

site: https://stazione.meteosantangelo.it/pwsWD/

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,129
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 74.0.3729.131
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #89 on: May 10, 2019, 07:23:22 PM »
Hello,
I can't translate the phrase: "This hour:" in the "Current Conditions" block of WD, I added the sentence in the language file but it does not translate it, why?
Thank you

site: https://stazione.meteosantangelo.it/pwsWD/
@ALL
If you have untranslated words for a block  => in this case in the currentconditionsWD_block.php
1. Use the debug script w34_module_test.php => https://stazione.meteosantangelo.it/pwsWD/w34_module_test.php
2. Select the block in the top-row selection boxes and press "Test it"
3. The unformatted information is displayed iincluding
3.1 Error messages if there are any
3.2 Missing translation strings
Code: [Select]
  |Notte|Notte|
 |Asciutto|Asciutto|
 |snow|snow|
 |This hour|This hour|
 |Precipitation|Precipitation|
In this case there are 5 missing translations. The first two are caused by Italian words from WD and DarkSky, so they are correct Italian Language..
Then 3 translations which should be added.
The easy way, copy the missing translations, in this case the bottom 3, and add them to the bottom of the language file /pwsWD/languages/lang_it.txt
If meteosa checks that file, he will see that the language entry he added in the file also has the : character
Code: [Select]
|This hour:|Quest ora:|
It is best to always use the debug console and not copy the words from the pwsWD/index.php screen/blocks. As in this case it was the : character.
Sometimes the missing translations are composed of more then 1 translation.

Hopes this helps others also with these problems.

Wim

 

cumulus