cloudy cloudy

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

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,066
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 73.0.3683.86
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #15 on: April 13, 2019, 12:36:04 PM »
Wow I love this thanks for putting together.
I've got one question and wonder what I'm doing wrong.  I get a 24 hour clock displayed even though I've picked 12 hour in the display and set times to g:i:s a.
In the attached screen shot you can see 24 hour time in the clock box, however the temp box is picking up the correct format.
@bitsostring already pointed you to the previous discussion.
Did not find enough time to test the 12 < > 24 hour clock.
Please make a copy of your current clock_small.php script and replace with this test version.
When the setting is for 24 hrs no changes.
When easyweather is set to 12 hr clock it will display the format as in the attached screenshot. 

Wim
« Last Edit: April 13, 2019, 12:40:04 PM by wvdkuil »

Offline drparker151

  • Posts: 18
  • Chicago Area
  • OS/Browser:
  • Win NT 10.0
  • Chrome 73.0.3683.103
    • Display Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #16 on: April 13, 2019, 12:55:33 PM »
Excellent, that works great. :D

thanks,
Drew

Offline bitsostring

  • Posts: 733
  • 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 #17 on: April 13, 2019, 01:22:49 PM »
I see Celcius is still spelled wrongly in the small balloon on Temp block. . .
« Last Edit: April 13, 2019, 01:53:57 PM by bitsostring »
It's meant to be fun. . .

Offline johnmac78

  • Posts: 71
  • Westminster, Massachusetts USA
  • OS/Browser:
  • Win NT 10.0
  • Chrome 73.0.3683.103
    • Village at Old Mill - Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #18 on: April 13, 2019, 01:49:27 PM »
I believe this was discussed previously, but I cannot find any info - Is there any way to speed the refresh rate on the forecast block and current conditions block? They are showing old data and both blocks are useless if you are just opening weather34 for a short time, otherwise great program.

Thanks,

John
John
scannorthcounty.net

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,066
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 73.0.3683.86
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #19 on: April 13, 2019, 02:53:09 PM »
I believe this was discussed previously, but I cannot find any info - Is there any way to speed the refresh rate on the forecast block and current conditions block? They are showing old data and both blocks are useless if you are just opening weather34 for a short time, otherwise great program.
Thanks,
John

When using the 5 minute cron-job  => all data is always recent. If not, there is a problem.
So I assume, based on your question,  that you are NOT running a 5 or 10 minute cron-job?

Please always type the URL to the template so i can check if there is a problem.

The weather34/ based template works as follows:
1. A person (you) visits the site.
2. The index.php draws the blocks on the screen without any data inside the blocks
3. The index.php loads updater.php which sends a bunch of small javascript-functions to the browser
3.1 First javascript-function starts a server-side "load_files" php-script which re-loads all external data files if they are to old
3.2 The other javascript-functions will each start (and refresh) a server-side php-script to fill one block with data.

All blocks, including the forecast block, when started by their javascript-function, process the available data, recent or old does not matter to a block script
The forecast blocks are refreshed every 5-6 minutes and will process the then available data.

===
Reloading external data:
The darkSky and WU api have a maximum number of allowed free accesses / day.
The forecast and CCN (=current conditions)-data is fetched by the "load_files" script based on the age of the data
DarkSky and WU-forecast max-age 1800 seconds = 0.5 hour
METAR default max-age 900 seconds

Without the cron-job,  if the data is old,  one has to wait 1 or 2 seconds and do a page-refresh. The recent data will be shown

===

A 5 minute  cron-job will also load the same "load_files" script but the allowed age  reduced with 20%.
This makes sure that all visitors will always get the recent data.

Wim

« Last Edit: April 13, 2019, 03:00:45 PM by wvdkuil »

Offline drparker151

  • Posts: 18
  • Chicago Area
  • OS/Browser:
  • Win NT 10.0
  • Chrome 73.0.3683.103
    • Display Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #20 on: April 13, 2019, 10:08:23 PM »
Just spotted something else.  When you pick short time = "g:i:s a" in easysetup it only saves "g:i:s" in w34_settings1.php.  I have manually edited w34_settings to add the a and that works. However if I go back into easysetup it reverts to just "g:i:a" and I have to do another manual edit.

Offline johnmac78

  • Posts: 71
  • Westminster, Massachusetts USA
  • OS/Browser:
  • Win NT 10.0
  • Chrome 73.0.3683.103
    • Village at Old Mill - Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #21 on: April 13, 2019, 11:39:06 PM »
When using the 5 minute cron-job  => all data is always recent. If not, there is a problem.
So I assume, based on your question,  that you are NOT running a 5 or 10 minute cron-job?

Please always type the URL to the template so i can check if there is a problem.

The weather34/ based template works as follows:
1. A person (you) visits the site.
2. The index.php draws the blocks on the screen without any data inside the blocks
3. The index.php loads updater.php which sends a bunch of small javascript-functions to the browser
3.1 First javascript-function starts a server-side "load_files" php-script which re-loads all external data files if they are to old
3.2 The other javascript-functions will each start (and refresh) a server-side php-script to fill one block with data.

All blocks, including the forecast block, when started by their javascript-function, process the available data, recent or old does not matter to a block script
The forecast blocks are refreshed every 5-6 minutes and will process the then available data.

===
Reloading external data:
The darkSky and WU api have a maximum number of allowed free accesses / day.
The forecast and CCN (=current conditions)-data is fetched by the "load_files" script based on the age of the data
DarkSky and WU-forecast max-age 1800 seconds = 0.5 hour
METAR default max-age 900 seconds

Without the cron-job,  if the data is old,  one has to wait 1 or 2 seconds and do a page-refresh. The recent data will be shown

===

A 5 minute  cron-job will also load the same "load_files" script but the allowed age  reduced with 20%.
This makes sure that all visitors will always get the recent data.

Wim

Wim,

Thanks for the detailed explanations. Where do I find info on these cron-jobs, are they part of WD or Weather34? I have not seen any discussion about these cron-jobs, but I do see a tab in WD for Weather34 with no explanation.

Thanks,

John
John
scannorthcounty.net

Online Weather Display

  • Posts: 86,484
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 73.0.3683.103
    • Weather Display
Re: HWS-template (WD34 / weather34) April release
« Reply #22 on: April 13, 2019, 11:45:50 PM »
you can set the cron jobs up in WD under control panel, webfiles/web page setup, custom web page setup

Offline johnmac78

  • Posts: 71
  • Westminster, Massachusetts USA
  • OS/Browser:
  • Win NT 10.0
  • Chrome 73.0.3683.103
    • Village at Old Mill - Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #23 on: April 14, 2019, 02:27:41 AM »
you can set the cron jobs up in WD under control panel, webfiles/web page setup, custom web page setup

I am using the Darksky forecast, can I update that from WD?
John
scannorthcounty.net

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,066
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 73.0.3683.86
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #24 on: April 14, 2019, 07:07:36 AM »
I am using the Darksky forecast, can I update that from WD?
Who to use to run the cron-job
As the cron-job runs on your website, the website itself can not start the cron-job.
Your website provider probably has a cron-job facility and there are other free or paid-for cron-job-providers
But WD is already running 24/7 and has al cron-job services built in.  No need to use another way.

How does it work:
WD will start the cron-job with a http call to your website => that is the only thing WD has to do
The "cron-job" will be run on your webserver as it is a normal PHP script
The "cron-job" will load the  server-side "load_files" php-script which re-loads all external data files if they are to old, but this time with 80% of the allowed age

Some documentation
http://wd34.weather-template.com/ => Documentation => http://wd34.weather-template.com/documentation/WDapi-stationcron-2019-01.pdf

PLEASE ALWAYS SUPPLY THE URL TO YOUR WEBSITE
Sometimes a small problem or a provider-setting inhibits loading the external data.
Only with the link  the poeple who try to help you, can check if there is another problem

Wim
« Last Edit: April 14, 2019, 07:21:16 AM by wvdkuil »

Online Torjan

  • Posts: 162
  • vantage pro2 plus
  • Randaberg. Norway
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Regnskvett verstasjon
Re: HWS-template (WD34 / weather34) April release
« Reply #25 on: April 14, 2019, 11:38:17 AM »
Hi!
For you who use the new language section xx, just a tip.

Should you use WXsim do not forget and create plaintext-parser-lang-xx.txt to get the right language in the weather forecast.

Torjan.

Offline bitsostring

  • Posts: 733
  • 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 #26 on: April 15, 2019, 05:25:38 PM »
Personal opinion: I have to say I do not like the new style of pop-up, with a really black background. (For comparison, the "Meteors" pop-up still has the original format.)

I have one (Moon info) in my original version setup, too. Tried to change the background colour today but the moonphase "myMoonlight" object has a black background as well. . .

Didn't really notice this at all in beta: I think I've only just realised what my "problem" is.
« Last Edit: April 15, 2019, 06:59:47 PM by bitsostring »
It's meant to be fun. . .

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,066
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.13.6
  • Chrome 73.0.3683.86
    • My PWS at Leuven Belgium Europe
Re: HWS-template (WD34 / weather34) April release
« Reply #27 on: April 16, 2019, 04:23:44 PM »
Personal opinion: I have to say I do not like the new style of pop-up, with a really black background. (For comparison, the "Meteors" pop-up still has the original format.)

I have one (Moon info) in my original version setup, too. Tried to change the background colour today but the moonphase "myMoonlight" object has a black background as well. . .

Didn't really notice this at all in beta: I think I've only just realised what my "problem" is.
This will all be solved in the new css.
This version has a slight "off-black" #1A1C20 back-ground which is used for the fill of the moon back-ground also.
You can adapt it at line 221
Wim

Offline bitsostring

  • Posts: 733
  • 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 #28 on: April 16, 2019, 06:33:24 PM »
This version has a slight "off-black" #1A1C20 back-ground which is used for the fill of the moon back-ground also.

Thanks, Wim. Looks much better alongside the other pop-ups in the original release  :)
It's meant to be fun. . .

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,474
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 73.0.3683.103
    • Traveling RV Weather
Re: HWS-template (WD34 / weather34) April release
« Reply #29 on: April 16, 2019, 11:51:49 PM »
Very nice, I like it!