Weather-Watch.com

Weather and the Internet => Creating Weather Web Sites => Custom Templates and Scripts => Topic started by: wvdkuil on January 01, 2019, 09:36:24 AM

Title: ***closed*** weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 01, 2019, 09:36:24 AM
There  has been other discussions about support for WeatherDisplay in the "weather34" template as designed and developed by BrianUnderdown.
BrianUnderdown now fully supports the Meteobridge version at  his template-site (https://weather34.com/homeweatherstation/).
You can check there (scroll down to Notice Please Read) which other versions are supported by which person and where to find those versions.

As from today,  the first release of "weather34 version for WeatherDisplay" is available for download at  http://wd34.weather-template.com/index.php (http://wd34.weather-template.com/index.php)
Please use this  post for comments and questions for the WD-version so we keep them separated from the discussions about the other versions.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 01, 2019, 04:50:48 PM
Very nice Wim...excellent work... :wink:

http://travelingrvwx.com/pwsWD/ (http://travelingrvwx.com/pwsWD/)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on January 01, 2019, 04:53:29 PM
Yes, nice work Wim! It's very good to see this option actively supported again  :D
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on January 01, 2019, 05:29:46 PM
Great work Wim :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: carseman on January 01, 2019, 07:04:15 PM
Wim,
Working here - thanks for your hard work.
https://carseweather.uk (https://carseweather.uk)

However…. I do not see an entry in Weather Display control panel for the home weather station API . My version of WD is 10.37 B85, dated  27/12/18 - Brian can you please shed light on this?

Chris
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on January 01, 2019, 07:09:21 PM
you just need to create a file (for now) called homeweatheron.txt
where WD is installed
Wim must have that mentioned somewhere I am sure
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: carseman on January 01, 2019, 07:16:55 PM
Brian,
Thanks - I should have RFTM.   :oops: :oops: :oops:    I will have play later.

Chris
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 01, 2019, 09:27:51 PM
I do not see the W34 logo in the WD version 10,37s85
what to do
Thank you
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: carseman on January 01, 2019, 09:33:33 PM
see Brian's reply  above

Chris
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: johnmac78 on January 02, 2019, 12:51:55 AM
Having an issue setting up my webcam with Weather 34 for Weather Display.

Weather 34 is in the pwsWD directory (Public_html/pwsWD/)

The webcam is at (public_html/webcam/image.jpg) in the settings page I have tried all the following - (./webcam/image.jpg )  (../webcam/image.jpg)  I also tried adding the public_html/webcam/image.html.

Any suggestions would be greatly appreciated.

Thank you, John
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 02, 2019, 02:29:28 AM
$webcam_img     =  '../webcam/jpgwebcam.jpg';

Works for me here...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 02, 2019, 07:47:28 AM
Having an issue setting up my webcam with Weather 34 for Weather Display.

Weather 34 is in the pwsWD directory (Public_html/pwsWD/)

The webcam is at (public_html/webcam/image.jpg) in the settings page I have tried all the following - (./webcam/image.jpg )  (../webcam/image.jpg)  I also tried adding the public_html/webcam/image.html.

Any suggestions would be greatly appreciated.

Thank you, John
Sorry, I did not write it clear enough in the settings script.
You set the link to  "../webcam/image.jpg" which is 100% correct
The scripts add a timestamp to the static image link to bypass old images in the browser cache.
If you change it in the settings to "../webcam/image.jpg?" (so add an ? to the link) it will function as it should.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 02, 2019, 09:13:24 AM
This is normal, to do the translation
is in lang_extra.txt
# days
                             |Fri |Fri |
                              |Mon|Mon|
                             |Mon |Mon |
                             |Sat |Sat |
                             |Sun |Sun |
                            |Thur |Thur |
                             |Tue |Tue |
                             |Wed |Wed |
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 02, 2019, 09:31:41 AM
This is normal, to do the translation
is in lang_extra.txt
# days
                             |Fri |Fri |
                              |Mon|Mon|
                             |Mon |Mon |
                             |Sat |Sat |
                             |Sun |Sun |
                            |Thur |Thur |
                             |Tue |Tue |
                             |Wed |Wed |
The re are a lot of scripts with a lot of words which should be translated
If you want to make your own translation, as an example to Spanish, translate only the right part.
So
Code: [Select]
                              |Mon|Lun|
                             |Mon |Lun |
If that is not your question, please clarify what you want to ask.  Leave a space in the translation as that is probably needed to keep the words apart.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: meteosa on January 02, 2019, 11:43:03 AM
Hi everyone,
in the guide is written to set to WD "Home weather station" in Control Panel, but I do not have it, I have the latest version installed, why?
I am attaching the image
Thank you
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 02, 2019, 11:55:11 AM
in the guide is written to set to WD "Home weather station" in Control Panel, but I do not have it, I have the latest version installed, why?

See reply #5, above.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 02, 2019, 03:05:17 PM
Hi everyone,
in the guide is written to set to WD "Home weather station" in Control Panel, but I do not have it, I have the latest version installed, why?
I am attaching the image
Thank you
http://wd34.weather-template.com/documentation/WDapi-upload-2019-01a.pdf
I adapted the sentence about the needed "unhide" file as it was overlooked easily.
Step 1
To use the api (lets call it WDapi for short) you first have to "unhide" the setup in WeatherDisplay.
Therefor you should create a file (can be empty) called homeweatheron.txt in the same folder where WD is installed


Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 02, 2019, 03:14:46 PM
Installed OK, but: Dark Sky API Forecast and Current Conditions not working (language is set to English); CheckWX API metar not working (for "nearby" EGPH); Sun, Moon & Space module not working; and no WU graphs. See http://swanston.maui.co.uk/pwsWD/

I have had server problems before with, e.g., the WU API in W34 setup, so I guess I'll speak to my service provider about that, but not sure about the missing module.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 02, 2019, 03:26:53 PM
Installed OK, but: Dark Sky API Forecast and Current Conditions not working (language is set to English); CheckWX API metar not working (for "nearby" EGPH); Sun, Moon & Space module not working; and no WU graphs. See http://swanston.maui.co.uk/pwsWD/

I have had server problems before with, e.g., the WU API in W34 setup, so I guess I'll speak to my service provider about that, but not sure about the missing module.
It seems that you r website is not allowed to access files outside your server.
The scripts to load files from outside your server all time-out.
The sun script fails as a PHP function is not defined, first time I see that
Code: [Select]
Fatal error: Call to undefined function gregoriantojd() in /web/maui/swanston/htdocs/pwsWD/sun_block.php on line 7It is a standard PHP function for versions 4 to 7.2  but the provider should enable that (most do)
http://php.net/manual/en/calendar.installation.php
Quote
To get these functions to work, you have to compile PHP with --enable-calendar .
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 02, 2019, 04:19:41 PM
It is a standard PHP function for versions 4 to 7.2  but the provider should enable that (most do)

Thanks, Wim, I'll pass that on when I ask about access to outside files. Does this lack of access explain the lack of pop-up d/m/y graphs?

If so, I'll ask my provider about that too, because the graphs on my old W34 version (at /pws, not /pwsWD) have recently stopped working as well.

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 02, 2019, 04:34:36 PM
Thanks, Wim, I'll pass that on when I ask about access to outside files. Does this lack of access explain the lack of pop-up d/m/y graphs?

If so, I'll ask my provider about that too, because the graphs on my old W34 version (at /pws, not /pwsWD) have recently stopped working as well.
The scripts at pws/ work OK.The year 2019 just started so there is not that much data. Those scripts probably used "filegetcontents" to load the data

 pwsWD/ has no data at all, uses CURL to get the data.

So ask your provider what the problem with CURL is?  Maybe it has to be enabled for you?

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 02, 2019, 06:23:00 PM
Very nice Wim...excellent work..

translated Spanish

http://www.meteotorrelavega.com/pwsWD/index.php?lang=nl
Please mail me  a zip of the Spanish language file. And I will add it for others.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 02, 2019, 07:47:08 PM
Great work and thanks for script at a begining of New year!
This is my page http://vreme.in.rs/knjazevac/pwsWD/
I have a problem to set Metar data from LYNI in Serbia. I set LYNI in EasyweatherSetup for WD but on main page I have data from EBBR Brussels.
I set Dark sky forecast and in main page work fine but in Extras Dark Sky forecast show for  Leuven-Sluispark.
And one more question. Is there a  (wide)16:9 version?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 02, 2019, 08:08:59 PM
Very nice Wim...excellent work..

translated Spanish

http://www.meteotorrelavega.com/pwsWD/index.php?lang=sp
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: johnmac78 on January 03, 2019, 01:26:07 AM
Sorry, I did not write it clear enough in the settings script.
You set the link to  "../webcam/image.jpg" which is 100% correct
The scripts add a timestamp to the static image link to bypass old images in the browser cache.
If you change it in the settings to "../webcam/image.jpg?" (so add an ? to the link) it will function as it should.

Wim

Thanks Wim, that did the trick

John
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 08:02:53 AM
Wind run from clientraw [173] should not be converted from kts to m/s or km/h.
This data show "daily wind run (km)"
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 09:05:24 AM
Wind run from clientraw [173] should not be converted from kts to m/s or km/h.
This data show "daily wind run (km)"
OK, I was told that all wind measurements in the clientraw are in kts and assumed the same for windrun.
Should have checked that one as it is undefined (numeric)  in my  own clientraw checker  (http://www.weerstation-leuven.be/weather2/index.php?p=93-6)
I will check with Brian and report back here.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 09:14:14 AM
Can I get an explanation for the data that I rounded up on the picture that I attached?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 09:34:43 AM
Can I get an explanation for the data that I rounded up on the picture that I attached?
The avatar on the left of your posts, points to an invalid website: http://www.knjazevac.co.yu/Meteo/wxindex.php

I checked your previous posts: is this the site you are discussing about: http://vreme.in.rs/knjazevac/pwsWD/  ?
You can check any module and the most recent data form WeatherDisplay as used by the template here
http://vreme.in.rs/knjazevac/pwsWD/w34_module_test.php
Click on "live data values" and they are displayed in the large box below. Those are the "recalculated" values from your upload file = clientraw
If they are uploaded by WDapi there is a button to display the raw WDapi values also
Code: [Select]
    [wind_direction] => 83
    [wind_direction_avg] => 259
wind_direction comes from clientraw [3]
wind_direction_avg from  clientraw [146]
===
For how the graphs are drawn and on which values they are based, I have to check with BrianUnderdown.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 09:59:50 AM
The avatar on the left of your posts, points to an invalid website: http://www.knjazevac.co.yu/Meteo/wxindex.php

Sorry for bad link. I change that.


Code: [Select]
    [wind_direction] => 83
    [wind_direction_avg] => 259

wind_direction comes from clientraw [3]
wind_direction_avg from  clientraw [146]
===


I think that should be

10 minute average wind direction  from clientraw [176]

clientraw [146] is "Hr Wind Dir 01" that is data for wind direction 60min ago
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 10:15:26 AM
Sorry for bad link. I change that.

I think that should be

10 minute average wind direction  from clientraw [176]

clientraw [146] is "Hr Wind Dir 01" that is data for wind direction 60min ago
You are right. A minor problem is that [176] is available only in recent clientraw files.
I would prefer [117], that contains the same value. I check your clientraw at: http://www.weerstation-leuven.be/weather2/index.php?p=93-6
I will have to add code to check if [176] exists when using that one.
For now, you can change it in line 143 of w34_livedata.php and i will put the change in the intermediate update.

Thanks for spotting this error,
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 10:26:27 AM
I change

Code: [Select]
$weather["wind_direction_avg"]  = $wd[117];
and

Code: [Select]
$weather["wind_run"]            = $wd[173];
I think that now work fine :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 10:39:28 AM
I change
. . . shortened . . .
Code: [Select]
$weather["wind_run"]            = $wd[173];
I think that now work fine :)
The line for windrun should be
Code: [Select]
$weather["wind_run"]            = convert_speed ($wd[173],'km/h',$to);It would not translate to miles if a visitor switched to that on your site. Check the demo site
http://wd34.weather-template.com/pwsWD/?units=us  => 19.9 mi
http://wd34.weather-template.com/pwsWD/?units=metric => 32 km
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 10:45:46 AM
The line for windrun should be
Code: [Select]
$weather["wind_run"]            = convert_speed ($wd[173],'km/h',$to);It would not translate to miles if a visitor switched to that on your site. Check the demo site
http://wd34.weather-template.com/pwsWD/?units=us  => 19.9 mi
http://wd34.weather-template.com/pwsWD/?units=metric => 32 km
Wim

but on http://wd34.weather-template.com/pwsWD/?units=scandinavia => 9 km

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 10:50:34 AM
but on http://wd34.weather-template.com/pwsWD/?units=scandinavia => 9 km
That should be 9 m/s
Thanks for spotting that bug.  :oops:
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 10:54:21 AM
That should be 9 m/s
Thanks for spotting that bug.  :oops:
Wim

but can not convert km to m/s. Should be stay

19.9 mi for us
32 km for metric
32 km for scandinavia metric



This is my page http://vreme.in.rs/knjazevac/pwsWD/
I set Dark sky forecast and in main page work fine but in Extras Dark Sky forecast show for  Leuven-Sluispark.
And one more question. Is there a  (wide)16:9 version?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 11:08:45 AM
but can not convert km to m/s. Should be stay
19.9 mi for us
32 km for metric
32 km for scandinavia metric
I tried to use "meter". Have to find a solution for this , as there is for now no distance setting.Will do that a.s.a.p.
Quote
I set Dark sky forecast and in main page work fine but in Extras Dark Sky forecast show for  Leuven-Sluispark.
That is an example of "extra pages " in the menu using an iframe. I used one of my own pages for that
Explained here: http://wd34.weather-template.com//documentation/WD34-questions.pdf
=> Menu options
=> Display Extra links in Menu (default false)
The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.
Quote
And one more question. Is there a  (wide)16:9 version?
No, not as far as i know.
And  as the design is strictly BrianUnderdown (weather34 on this forum) you should ask him.
I am available for support  of the clientraw/WDapi version.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 11:21:25 AM
I tried to use "meter". Have to find a solution for this , as there is for now no distance setting.Will do that a.s.a.p.That is an example of "extra pages " in the menu using an iframe. I used one of my own pages for that
Explained here: http://wd34.weather-template.com//documentation/WD34-questions.pdf
=> Menu options
=> Display Extra links in Menu (default false)
The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.No, not as far as i know.
And  as the design is strictly BrianUnderdown (weather34 on this forum) you should ask him.
I am available for support  of the clientraw/WDapi version.

Wim

Thank you for help!
I set DarkSky and EWN forecast to my town Knjazevac in w34_frames.php :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 03, 2019, 11:38:03 AM
Hello, when I do Test / Update for the api I get this:
any suggestions
Thank you
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 12:16:24 PM
Hello, when I do Test / Update for the api I get this:
any suggestions
Thank you
The script works at your site.
http://www.meteotorrelavega.com/pwsWD/w34_WDapi.php?test&d=1
Returns correctly the error message.
Your screenshot shows more like a "page not found" type error.
Check the spelling as we can not see what is in the URL box, should be  w34_WDapi.php  without any spaces after it.
===
It does not upload yet as the data on your site is still the original download test-data
http://www.meteotorrelavega.com/pwsWD/w34_module_test.php => click on "Show WDapi values"
or use http://www.meteotorrelavega.com/pwsWD/jsondata/WDapi.txt

 Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 03, 2019, 01:16:45 PM
Should there be something else to be changed in the script, except for the translation of lang_extra.txt
I make lang_sr.txt with some part of serbian translation and upload on my server but http://vreme.in.rs/knjazevac/pwsWD/index.php?lang=sr have not serbian translate.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 03, 2019, 01:18:46 PM
thanks, a spelling error
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 01:25:38 PM
Should there be something else to be changed in the script, except for the translation of lang_extra.txt
I make lang_sr.txt with some part of serbian translation and upload on my server but http://vreme.in.rs/knjazevac/pwsWD/index.php?lang=sr have not serbian translate.
Yes, it needs more as the scripts do not know about the 'sr' language. It is on the f
There are only 4 languages in the download.
We already did three languages that way.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 03, 2019, 01:53:01 PM
I had to deactivate line 261 of:
w34 livedata.php
because it gives me error
// $ weather ["lux"] = number_format ($ wd [41] /0.0079*0.95299*1.0012,0, '.', '');
any suggestions
Thank you #-o #-o
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on January 03, 2019, 01:56:40 PM
There  has been other discussions about support for WeatherDisplay in the "weather34" template as designed and developed by BrianUnderdown.
BrianUnderdown now fully supports the Meteobridge version at  his template-site (https://weather34.com/homeweatherstation/).
You can check there (scroll down to Notice Please Read) which other versions are supported by which person and where to find those versions.

As from today,  the first release of "weather34 version for WeatherDisplay" is available for download at  http://wd34.weather-template.com/index.php (http://wd34.weather-template.com/index.php)
  • This version supports FTP-upload of clientraw.txt and HTTP-upload using the WDapi.
  • The current conditions can be from WD-clientraw, DarkSky (needs an API-key) or METAR  (needs an API-key).
  • Forecast data only from DarkSky (+API-key)  for this version, probably wxsim and met.no will be available in the next release
  • Next release (April) will also use the latest css I just received from Brian Underdown
  • Graphs can be generated from your WU-data or from a SQL-table which is relative easy to setup
Please use this  post for comments and questions for the WD-version so we keep them separated from the discussions about the other versions.

Wim

What is the recommended install procedure for installing on Ubuntu 18.10?
I tried to follow this https://weather34.com/homeweatherstation/guides/setupubuntu.html (https://weather34.com/homeweatherstation/guides/setupubuntu.html), but ended up having this issue:
502 Bad Gateway
nginx/1.14.2
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 02:07:35 PM
What is the recommended install procedure for installing on Ubuntu 18.10?
I tried to follow this https://weather34.com/homeweatherstation/guides/setupubuntu.html (https://weather34.com/homeweatherstation/guides/setupubuntu.html), but ended up having this issue:
502 Bad Gateway
nginx/1.14.2
I do not understand what your question is about.
This discussion-thread is about using the WD version of the weather34 template, not about installing webservers.
This template should run on any webserver with PHP 7.x and optional SQL(lite)
Consider posting your question  on another forum.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 02:10:08 PM
I had to deactivate line 261 of:
w34 livedata.php
because it gives me error
// $ weather ["lux"] = number_format ($ wd [41] /0.0079*0.95299*1.0012,0, '.', '');
any suggestions
Thank you #-o #-o
It seems that WD uploads "--" when the solar/uv is not available when using the WDapi.
All tests until now had UV/Solar in their station or set it  so in the WDapi window in WD

It is strange that you get an error as error-reporting should be switched off, by default. I will have to look into this more in detail.

Can you please try the attached version, thanks
I added the code to check if the data is numeric.
But still do not understand why there are errors in the logs.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 03, 2019, 03:28:14 PM
It seems that your website is not allowed to access files outside your server.
The scripts to load files from outside your server all time-out.
The sun script fails as a PHP function is not defined, first time I see that
Code: [Select]
Fatal error: Call to undefined function gregoriantojd() in /web/maui/swanston/htdocs/pwsWD/sun_block.php on line 7It is a standard PHP function for versions 4 to 7.2  but the provider should enable that (most do)

All sorted by my provider today, including pop-up graphs, at http://swanston.maui.co.uk/pws.

Old version still at /pwsold.

Thanks for your help, Wim.


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: R_o_B on January 03, 2019, 03:31:09 PM
Wim, I have discovered some additional errors regarding the data from the WeatherFlow Smart Weather station.

The error are with the 'w34_livedata.php' script. The following two array index do not exist (anymore/yet): '$item['lightning_strike_last_epoch']' and '$item['lightning_strike_last_distance']'

I have attached the index list for the JSON '$json' array.

Note: My WeatherFlow station has the most up-to-date firmware update: Firmware Revision 103 released December 13, 2018.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 04:16:19 PM
Wim, I have discovered some additional errors regarding the data from the WeatherFlow Smart Weather station.

The error are with the 'w34_livedata.php' script. The following two array index do not exist (anymore/yet): '$item['lightning_strike_last_epoch']' and '$item['lightning_strike_last_distance']'

I have attached the index list for the JSON '$json' array.

Note: My WeatherFlow station has the most up-to-date firmware update: Firmware Revision 103 released December 13, 2018.
My station: 2167 => Firmware  hub: 103  Air: 20  Sky: 43
As far as I can see, the same as your station 5447
The other test-stations all report the two other values as in the past. Your station does not.
Maybe this occurs when theere has never been a strike?  I will adapt the script, just to make sure.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 03, 2019, 05:50:45 PM
I am trying to figure out why the "nearby" button on the current conditions block is always showing EBBR in Brussels.  I entered KAST for my metar in easysetup but it's not loading that data into the "/jsondata/metar34.txt" file.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 06:21:12 PM
I am trying to figure out why the "nearby" button on the current conditions block is always showing EBBR in Brussels.  I entered KAST for my metar in easysetup but it's not loading that data into the "/jsondata/metar34.txt" file.
You have to enter a valid API key in your easyweathersetyup.
The API key field still seems to hold "ADD YOUR API KEY"

http://wd34.weather-template.com//documentation/WD34-questions.pdf
At the bottom => API keys for data retrieval => To get METAR information ...=>  https://www.checkwx.com/signup

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 03, 2019, 06:38:51 PM
Hi, changed the script:
w34 livedata.php
has not given an error
Thank you
Emilio
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 03, 2019, 06:47:50 PM
You have to enter a valid API key in your easyweathersetyup.
The API key field still seems to hold "ADD YOUR API KEY"

Thanks Wim...working now  :wink:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on January 03, 2019, 06:58:01 PM
windrun is in KM in the clientraw data, sorry about that confusion
Wim, you should include a donate button for all your help/time?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 03, 2019, 07:12:54 PM
Hello,
my programming skills are scarce
I changed in the script:
barometer_block.php
the next line for the translation to take place
line 53
echo 'Trend';
by
echo '' .lang ('Trend'). ' <br> ';
any opinion
regards
 #-o #-o
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: R_o_B on January 03, 2019, 07:21:10 PM
Maybe this occurs when theere has never been a strike?  I will adapt the script, just to make sure.
Wim, using the WeatherFlow REST API, the 'latest station observation' data that is returned for my station is as follow (as of 11:15 PST):
Code: [Select]
outdoor_keys": [
    "timestamp",
    "air_temperature",
    "barometric_pressure",
    "station_pressure",
    "sea_level_pressure",
    "relative_humidity",
    "precip",
    "precip_accum_last_1hr",
    "precip_accum_last_24hr",
    "precip_accum_local_day",
    "precip_accum_local_yesterday",
    "wind_avg",
    "wind_direction",
    "wind_gust",
    "wind_lull",
    "solar_radiation",
    "uv",
    "brightness",
    "lightning_strike_count",
    "lightning_strike_count_last_3hr",
    "feels_like",
    "heat_index",
    "wind_chill",
    "dew_point",
    "wet_bulb_temperature",
    "delta_t",
    "air_density"
],
But then, looking at the 'latest station observation' for another station, the data that is returned is:
Code: [Select]
outdoor_keys": [
    "timestamp",
    "air_temperature",
    "barometric_pressure",
    "station_pressure",
    "sea_level_pressure",
    "relative_humidity",
    "precip",
    "precip_accum_last_1hr",
    "precip_accum_last_24hr",
    "precip_accum_local_day",
    "precip_accum_local_yesterday",
    "wind_avg",
    "wind_direction",
    "wind_gust",
    "wind_lull",
    "solar_radiation",
    "uv",
    "brightness",
    "lightning_strike_last_epoch",
    "lightning_strike_last_distance",
    "lightning_strike_count",
    "lightning_strike_count_last_3hr",
    "feels_like",
    "heat_index",
    "wind_chill",
    "dew_point",
    "wet_bulb_temperature",
    "delta_t",
    "air_density"
],
Both station have the same firmware: 'firmware_revision": "103"'

I have no idea why the returned data would be different from one station and another!  :?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 07:22:41 PM
Hello,
my programming skills are scarce
I changed in the script:
barometer_block.php
the next line for the translation to take place
line 53
echo 'Trend';
by
echo '' .lang ('Trend'). ' <br> ';
any opinion
regards
 #-o #-o
Good catch,
I tried to find all untranslated words, but they hide very well.  And a lot of English and Dutch words are the exactly the same in spelling, albeit not always in the meaning.
So I changed this one in the scripts also from
Code: [Select]
echo 'Trend';to
Code: [Select]
echo lang('Trend');No need to add those . as those are only used to concatenate strings.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 07:25:56 PM
Wim, using the WeatherFlow REST API, the 'latest station observation' data that is returned for my station
. . .  shortened on request of R_o_B . . .
I have no idea why the returned data would be different from one station and another!  :?
The logical explanation is that the stations without any lightning in the past, can not have a date of the last lightning,  nor a distance of the last lightning. They therefor will not output those two extra fields.
    "lightning_strike_last_epoch",   "lightning_strike_last_distance",

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: R_o_B on January 03, 2019, 08:41:01 PM
Wim, why is the data from both the Davies Instruments and WeatherFlow weather stations being processed in this newer version of the 'weather34' templates - should it not be either the data from the Davies Instruments weather stations (ie: Weather Display - clientraw.txt/WDapi.txt) or the data from the WeatherFlow weather station (ie: WeatherFlow API - weatherflow.txt).

From what I can see so far (looking through the different scripts), the 'weather34' templates appear to use mostly the data from Weather Display (ie: clientraw.txt/WDapi.txt).

I understand that most users only have one weather station. Would it not be better/simpler if the data used was from only one provider (ie: Weather Display or WeatherFlow).

Just curious...  :?

Wim, may I make a suggestion - when replying to a message could you either not quote the whole message or only quote the part of the message you are replying to - otherwise the message thread very long very quick.  :wink:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 03, 2019, 09:07:44 PM
Wim, why is the data from both the Davies Instruments and WeatherFlow weather stations being processed in this newer version of the 'weather34. . . shortened . . .
A weatherwebsite can have multiple extra sensors, f.i.   AirQuality sensor => supported Luftdaten, Purpleair and official, a lightning-sensor => supported Nextstorm and WeatherFlow. Same as for current conditions, supported WD, Metar or Darksky.
In this version of weather34,  the WeatherFlow measurements used are only the lightning ones. No other values.
And UV/solar for those stations who are missing an UV / Solar-sensor.
There is als a weather34  version for Weatherflow where almost all data comes from Weatherflow.
The 2017 version for WD also used some WF values, at least the version I had to start with making this new one from.

Also nobody has to use the weatherflow. All extra sensors arte optional.

Same for forecasts. As soon as the new WU-api is available one can choose between DarkSky or WU again for forecasts.
Wim, may I make a suggestion - when replying to a message could you either not quote the whole message or only quote the part of the message you are replying to - otherwise the message thread very long very quick.  :wink:
As > 90% of my post are answers to questions or other posts I burned myself a few times by not quoting completely.
Some persons change their original quote AFTER they get an answer so that the answer is not valid anymore.
That is why I try to include their complete original text, to make sure that my answers make sense, even after the original post is changed or removed.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 04, 2019, 08:08:29 AM
Hello Wim,
checking the template missing put:
in w34_easyweathersetup.php
the catalan language
line 225
original: | 02 | - | - | flag | select | en | en # English! nl # Dutch! fr # French! de # German! it # Italian! sp # Spain |
modified:
| 02 | - | - | flag | select | en | en # English! Nl # Dutch! Fr # French! De # German! It # Italian! Sp # Spain! Ct # Catalan |
  and so that the flag comes out at the end of the sript
ask for a flag: img / flags / ct.svg
is not, you would have to add or modify the script to call ct.svg
Thank you
Emilio
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 04, 2019, 08:16:41 AM
Hello Wim,
checking the template missing put:
in w34_easyweathersetup.php
the catalan language
line 225
original: | 02 | - | - | flag | select | en | en # English! nl # Dutch! fr # French! de # German! it # Italian! sp # Spain |
modified:
| 02 | - | - | flag | select | en | en # English! Nl # Dutch! Fr # French! De # German! It # Italian! Sp # Spain! Ct # Catalan |
  and so that the flag comes out at the end of the sript
ask for a flag: img / flags / ct.svg
is not, you would have to add or modify the script to call ct.svg
Thank you
Emilio
It is already in the downloads since yesterday on http://wd34.weather-template.com/
Additional/changed scripts to support the Italian, Spanish and Catalan language. Thank you Daniel and Emilio
Before posting the update I installed at the demo site, it looks catalan to me, the flag looks different, so i assume it is working. http://wd34.weather-template.com/pwsWD/
Please check again and e-mail me if there are problems.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 04, 2019, 08:33:09 AM
I attach two images of the problem
the first image is with the modified sript so that it comes out catalan
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 04, 2019, 08:45:12 AM
I attach two images of the problem
the first image is with the modified sript so that it comes out catalan
:oops:  I misunderstood, thought you referred to the flag in the menu. Thanks for spotting the error.
I adapt the easyweathersetup and upload a new version.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 04, 2019, 09:38:16 AM
I think that light breeze should be 2 Bft not 6 Bft  :?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 04, 2019, 11:05:14 AM
I think that light breeze should be 2 Bft not 6 Bft  :?
Yes, it should be 6 Kts or 2 Bft  or both.
Will check if there is enough space for both.OK at http://wd34.weather-template.com/pwsWD/?units=metric
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 04, 2019, 11:42:58 AM
The line for windrun should be
Code: [Select]
$weather["wind_run"]            = convert_speed ($wd[173],'km/h',$to);

Did we have a definitive answer to the windrun problem yet? Apologies if I've missed it.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 04, 2019, 11:48:33 AM
Did we have a definitive answer to the windrun problem yet? Apologies if I've missed it.
Just try the block from #66 above.
It should work OK, but as changes, it needs a few days testing.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 04, 2019, 12:36:47 PM
Yes, it should be 6 Kts or 2 Bft  or both.
Will check if there is enough space for both.OK at http://wd34.weather-template.com/pwsWD/?units=metric
Wim

I think that is now OK. Maybe you could at the same time make a change for Wind run for scandinavia meters and wind block. 

In settings I set DarkSky forecast language English but on main page I have Dutch language (I set default Duch language in Settings).
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 04, 2019, 12:57:41 PM
I think that is now OK. Maybe you could at the same time make a change for Wind run for scandinavia meters and wind block. 
Is already in the lates update download. Always check at http://wd34.weather-template.com/pwsWD/
Quote
In settings I set DarkSky forecast language English but on main page I have Dutch language (I set default Duch language in Settings).
Darksky has its own language setting! Nearly at the bottom where the API key is entered. You can select Serbian also there.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on January 05, 2019, 05:10:26 AM
Wim, the weather34 template is really a nice piece of work.  Kudos to you and the team for creating it.  I have mine setup and working but, for some reason, I am not getting the current forecast.  What could I be missing? Also, where are the current weather alerts supposed to come from?  Right now, we have a Wind Advisory posted for our area and there is no alert in the Weather Alert box.

http://ucweather.org/pwsWD/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 09:21:30 AM
Wim, the weather34 template is really a nice piece of work.  Kudos to you and the team for creating it.
100% BrianUnderdown (weather34)  for the design and original scripts. I myself are your humble servant to do the support for this version
Quote
I have mine setup and working but, for some reason, I am not getting the current forecast.  What could I be missing?
You have to apply for a DarkSky api key and enter it in easyweathersetup. Nearly at the bottom
Quote
Also, where are the current weather alerts supposed to come from?  Right now, we have a Wind Advisory posted for our area and there is no alert in the Weather Alert box.
http://ucweather.org/pwsWD/
The weather alerts come from the weather-values in the scripts themselves. Not from an outside company as NWS or Meteoalarm.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on January 05, 2019, 10:58:15 AM
Thanks a lot, Wim.  Working great now, even got a weather alert.  Should be interesting to watch the next several days as we are supposed to get a lot of wind and rain.  BTW, I really like the air quality sensor feature.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 05, 2019, 11:28:05 AM
Hello Wim
Great work. I see some small fixes on the  installation page. How do you update the build?

Thanks
Steve

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 02:54:11 PM
Hello Wim
Great work. I see some small fixes on the  installation page. How do you update the build?
Thanks
Steve
You should unzip the update.
The 10 changed scripts go into the pwsWD/ folder on your server.
There are two folders with a name  "copy to "
One has the extra flag, goes into pwdWD/img/flags/  The other has the extra language files for pwdWD/languages/

Succes,
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 05, 2019, 03:54:44 PM
One small typo, in line 137 of W34_menu.php: 'Select langauge'  should read 'Select language'

(That works in my menu, but I don't know if there are any other places I should look?)

And the words "Template by weather34.com" at bottom right overhang the main template "frame". . .?

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 05, 2019, 04:25:04 PM
Ok Wim will give it a go.

Thanks
Steve
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 05:15:32 PM
One small typo, in line 137 of W34_menu.php: 'Select langauge'  should read 'Select language'
(That works in my menu, but I don't know if there are any other places I should look?)
Very easy solution:
Correct all typing errors by using the language files.  |'Select langauge|Select language|
That way you are sure that with a new release the error does not return.
And that visitors using another language can see the translation to their language also.
The script-editors do not catch those typing errors and English is not my native language either
This: |from text in script |to text visitor sees|  is therefor used by multiple template authors.
Quote
And the words "Template by weather34.com" at bottom right overhang the main template "frame". . .?
Can you make a small screenshot, as I do not understand what the problem is at my test site, thanks.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 05, 2019, 05:31:26 PM
Very easy solution:
Correct all typing errors by using the language files.  |'Select langauge|Select language|
That way you are sure that with a new release the error does not return.

Thanks, Wim.

Can you make a small screenshot, as I do not understand what the problem is at my test site, thanks.

1.JPG shows my site, 2.JPG shows your test site. Legends (Data source, Hardware, etc.) not centred, either.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 05, 2019, 05:48:22 PM
Hello, the page
http://www.meteotorrelavega.com/pwsWD/w34_cron_stationcron.php
Give me this:
No loading of DB neededsuccess files loaded + to day file
Y :
http://www.meteotorrelavega.com/pwsWD/w34_util_createdb.php

weather34 Error creating database: Access denied for user 'meteotorkcmilio' @ '%' to database 'weatherstation'
I have checked name database, use password everything is fine
I connect to phpMyAdmin right
attached images
the second is what I think by importing the sql file
any suggestions
emilio #-o 8O 8O
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Boce on January 05, 2019, 05:57:10 PM
Win direction and avg wind direction always have some direction although they have different ones ° :?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 06:46:35 PM
Thanks, Wim.

1.JPG shows my site, 2.JPG shows your test site. Legends (Data source, Hardware, etc.) not centred, either.
your site http://swanston.maui.co.uk/pws/  shows differently at my place with chrome and FF. I think the height has to be adjusted to fit.
Script w34_index.php line 261 reads now
Code: [Select]
        <img src="img/weather34logo.svg" width="40px" alt="https://weather34.com/homeweatherstation/" class="homeweatherstationlogo" ></a>';}change the height to 30px so we can see if that solves it.
Code: [Select]
        <img src="img/weather34logo.svg" width="30px" alt="https://weather34.com/homeweatherstation/" class="homeweatherstationlogo" ></a>';}
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 06:59:48 PM
Hello, the page
http://www.meteotorrelavega.com/pwsWD/w34_cron_stationcron.php
Give me this:
No loading of DB neededsuccess files loaded + to day file
You have to specify in the settings if the cron file should store the data +  you should have a working database
Quote
Y :
http://www.meteotorrelavega.com/pwsWD/w34_util_createdb.php
Did you give the user all rights to the database? Seems not as the checkboxes are empty.
That user must be allowed to define new tables ans so on, as that is what the
And what are those  strange  characters  '@ '%' doing in the error message?
Quote
weather34 Error creating database: Access denied for user 'meteotorkcmilio' @ '%' to database 'weatherstation'
I have checked name database, use password everything is fine
I connect to phpMyAdmin right
attached images
the second is what I think by importing the sql file
That image is correct as the test record is inserted in the databas-table.
Quote
any suggestions
emilio #-o 8O 8O
You should now give the user all rights.  And set the cron-job to do the updates,
Success, Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 05, 2019, 07:11:17 PM
your site http://swanston.maui.co.uk/pws/  shows differently at my place with chrome and FF.

Apologies: I'm using Edge, and didn't think to check in Chrome  #-o

Quote
I think the height has to be adjusted to fit.
change the height to 30px so we can see if that solves it.

Afraid not. . . see screenshots. (Chrome is better, though, as the logo doesn't interfere with the text!)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 07:13:39 PM
Win direction and avg wind direction always have some direction although they have different ones ° :?
Thank you spotting this.
There must be enough difference, so preferably 22 degrees to show another compass reading, but is always showed the same compass for avg and normal direction.
I attach  a modified script which should remove this error.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 05, 2019, 07:15:16 PM
Very easy solution:
Correct all typing errors by using the language files.  |'Select langauge|Select language|

Sorry, do I add that to lang_extra.txt?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 07:20:55 PM
Sorry, do I add that to lang_extra.txt?
No to lang.en.php if you use English.
It should look like
Code: [Select]
$lang['Select langauge'] = 'Select language';I did not redo the English file as most untranslated words are in English.
The typing errors should be added to the english file in the PHP way as in the original weather34.

sorry, Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 05, 2019, 07:23:53 PM
Apologies: I'm using Edge, and didn't think to check in Chrome  #-o
Afraid not. . . see screenshots. (Chrome is better, though, as the logo doesn't interfere with the text!)
The chrome screenshot looks acceptable.
And yes edge. I do not know how much more differences will show with the very complex  css which is used
At least microsoft will build a new Edge using the chromium engine and then these problems will fade away.
As  soon as Brians new css can be used I will start testing with edge also.

Wim

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 05, 2019, 07:32:04 PM
No to lang.en.php if you use English.

Thank you, again!

At least microsoft will build a new Edge using the chromium engine and then these problems will fade away.

Can't wait  :)


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 05, 2019, 09:05:53 PM
How hard would it be to incorporate this image onto the webpage?  WD is already creating the files, and I don't care if it links to anything, but I would like to display the watches and warnings box to show visitors there is an active watch or warning for our area.

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Dale Reid on January 05, 2019, 09:27:40 PM
I am new to trying this template, so please bear with my new user questions.  I have gone through the various instruction sheets (thank you for the details for WD setup) and have a couple questions.

#1--I have registered for the Dark Sky key and inserted it.  I see from there site that a 1000 queries per month are free.  How many does this program request?  One/hour?  Is there a frequency to select so I don't get billed?

#2--I have in the upper right corner a "Current Conditions" Block the third over.  Right now it is linked to Brussels, and yet I have entered as my nearest airport the KEAU which I not only got from other sources and knew was accurate, but also was the one presented when I searched the link for the nearest airport designation.

Is there some way to update that block so it doesn't reflect what the conditions are at Brussels?

#3--One of the users of this template directed me to investigate this template when I asked in the Weather-Watch forum if there were a command string for custom text output from Weather Display to include the sun elevation and azimuth, among the numerous other data points Brian Hamilton provides through that program.  He said as of now, there isn't a command to output those values, and a user said that Weather34 does indicate the real time elevation and azimuth for the sun. 

Indeed it does, and I assume the program generates those values based on my latitude, longitude and time.  But seeing them on the screen and getting those numbers to use in other things that I want to do are two different things.  Is there an 'output' available from Weather34 to read those numbers for use in other programs?  Is there a matrix or database that can be read by other software to extract those numbers, or does the template just generate and display them in that block?

Thank you and it is a very fun and solid program to deal with, even with my inexperience.
Dale

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 06, 2019, 08:00:53 AM
How hard would it be to incorporate this image onto the webpage?  WD is already creating the files, and I don't care if it links to anything, but I would like to display the watches and warnings box to show visitors there is an active watch or warning for our area.
WD is IMHO not creating the files behind that message.  Those are server side scripts from @Curly maintained by Ken True for the Saratoga template. And they are suitable for the US only. And maybe they need to be changed with the upcoming NWS cutover.

Canada and Europe use totally different sources for the data  as do some other larger countries.

In all cases, if there is a "WeatherDsiplay"-tag in the WD-taglist is is relative easy to use it.
Writing extra scripts and then adding them to the moving target "weather34" is a daunting task.
But I will put in on the " list with wishes " for the next releases.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 06, 2019, 08:19:53 AM
. . . shortened . . .
#1--I have registered for the Dark Sky key and inserted it.  I see from there site that a 1000 queries per month are free.  How many does this program request?  One/hour?
https://darksky.net/dev/docs/faq : The allowed free calls with DarkSky are 1,000 API calls for free each day. All external information loaded in this template is cached, in this case in pwsWD/jsondata/  It is refreshed when needed. For Darksky the allowed age is 24 minutes when using a cronjob. Total calls / day even with multiple languages will be  far below the allowed maximum.
Quote
#2--I have in the upper right corner a "Current Conditions" Block the third over.  Right now it is linked to Brussels, and yet I have entered as my nearest airport the KEAU
. . . . shortened . . . Is there some way to update that block so it doesn't reflect what the conditions are at Brussels?
You should also apply for a "CheckWX Metar API KEY you need to sign up" nearly at the bottom of easyweather
Quote
#3--One of the users of this template directed me to investigate this template when I asked in the Weather-Watch forum if there were a command string for custom text output from Weather Display to include the sun elevation and azimuth,
. . .  shortened . . .
 Is there a matrix or database that can be read by other software to extract those numbers, or does the template just generate and display them in that block?
That is a mix of PHP and javascripts, some very old. All data is generated on the fly. Even touching them is not advised.
Quote
Thank you and it is a very fun and solid program to deal with, even with my inexperience.
Dale
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: weatherist34 on January 06, 2019, 08:47:32 AM
good morning

*important please note weather34 does not offer any support for this weather display version so please no more emails .Much of the code/structure has been completely re-written by Wim van der Kuil and this structure of code is not something Im familiar with and none of the code resembles any versions from Meteobridge or Cumulus so therefore it is important you raise your issues , ideas to Wim van der Kuil not weather34 to get a positive outcome . Wim van der Kuil has done a remarkeable re-write of the template to be used with weather display in a very short time and remember other versions like meteobridge and cumulus were designed and coded to be developed alongside each other continuously to make it easy to maintain and implement ideas across those versions where possible.Many of the current features,display seen in the meteobridge ,cumulus versions are not fully compatible with this version they require a lot of re-writing due to the differences in code structure. The weather display version I last worked on was in Novemebr 2017 since then it recieved no significant updates or major improvements so I think where Wim has got it today in such a short period is an achievement itself and I encourage you all to work with him constructively and collaborate.

sometime in the future I will try and liase with Wim to add similar features as seen in the current meteobridge version if required if not i still think where he has got it today is a great platform for further enhancements .but thats something for the future and choose a suitable period thats suits both of us right now too many other things going on .

screenshot of meteobridge version as of today..

(https://res.cloudinary.com/brian-underdown/image/upload/v1546765181/borismb_copy_rzzuee.png)

brian
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 06, 2019, 02:14:17 PM
You should unzip the update.
The 10 changed scripts go into the pwsWD/ folder on your server.

Shortly after I did that the DarkSky, CheckWX and WU uploads stopped working. Apparently w34_load_files.php needs a line added to make it use the proxy server in my setup. . . now I know that, I can watch out for any more updates to that script and make the necessary addition!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 06, 2019, 07:07:05 PM
WD is IMHO not creating the files behind that message.  Those are server side scripts from @Curly maintained by Ken True for the Saratoga template. And they are suitable for the US only. And maybe they need to be changed with the upcoming NWS cutover.

Canada and Europe use totally different sources for the data  as do some other larger countries.

In all cases, if there is a "WeatherDsiplay"-tag in the WD-taglist is is relative easy to use it.
Writing extra scripts and then adding them to the moving target "weather34" is a daunting task.
But I will put in on the " list with wishes " for the next releases.

Wim

Fair enough. 

The tag is -  $NOAAEvent = '%NOAAEvent%' ; // NOAA Watch/Warning/Advisory
 
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 06, 2019, 08:42:42 PM
Fair enough. 

The tag is -  $NOAAEvent = '%NOAAEvent%' ; // NOAA Watch/Warning/Advisory
 
Do you have real life content of that tag?   It seems to be only a string?  This is the description I found in taglist.txt
Code: [Select]
%NOAAEvent%.................if you have setup the Noaa warning system (if no warning, then it will be NO CURRENT ADVISORIES)
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eddiegonzales on January 06, 2019, 08:44:08 PM
Hi there,

Great work with the Weather34 for WD with API!

Is there a Danish translation underway or should i give it a try?

BR
Stephan
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 06, 2019, 08:54:42 PM
Hi there,
Great work with the Weather34 for WD with API!
Is there a Danish translation underway or should i give it a try?
BR
Stephan
Well maybe another Danish person is doing it, but I do not know of it. It is not a lot of work but after the first batch,  new untranslated words will pop-up. Some weather-descriptions come from outside sources  and all possibile words are not known yet.

So give it a try, maybe other Danish users can help?

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on January 06, 2019, 11:33:28 PM
WD is IMHO not creating the files behind that message.  Those are server side scripts from @Curly maintained by Ken True for the Saratoga template. And they are suitable for the US only. And maybe they need to be changed with the upcoming NWS cutover.

Canada and Europe use totally different sources for the data  as do some other larger countries.

In all cases, if there is a "WeatherDsiplay"-tag in the WD-taglist is is relative easy to use it.
Writing extra scripts and then adding them to the moving target "weather34" is a daunting task.
But I will put in on the " list with wishes " for the next releases.

Wim

Just for info/idea, I was able to include the advisory scripts that I have been using on my main site for years with no problem.  These scripts were created separately using a third party RSS/Atom feed parser and not part of the Saratoga/Curly advisory scripts.  As far as any impact from any NWS cutover goes, I'll cross that bridge when I come to it.

http://ucweather.org/pwsWD/
http://ucweather.org/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 07, 2019, 05:09:48 PM
Just for info/idea, I was able to include the advisory scripts that I have been using on my main site for years with no problem.  These scripts were created separately using a third party RSS/Atom feed parser and not part of the Saratoga/Curly advisory scripts.  As far as any impact from any NWS cutover goes, I'll cross that bridge when I come to it.

Looks great...wish I was smart enough to know how to code that into my site.  I can't even figure out what file I would need to edit in the pwsWD directory to even attempt this mod.  Would you mind sharing your code so I could get some ideas?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 07, 2019, 05:24:45 PM
Looks great...wish I was smart enough to know how to code that into my site.  I can't even figure out what file I would need to edit in the pwsWD directory to even attempt this mod.  Would you mind sharing your code so I could get some ideas?
There will be a "alerts.weather.gov" advisory box and a "meteoalarm.eu" box in the April (2019-04-01) version.
The "alerts.weather.gov" version will use this feed: https://alerts.weather.gov/cap/wwaatmget.php?x=CAZ095&y=0
The "meteoalarm.eu"  version will use: https://www.meteoalarm.eu/documents/rss/nl.rss

The "alerts.weather.gov" feed is  already used in the Leuven-Template, but as always, one needs some time to test and integrate it in the other scripts.

Have had no indication that the  "alerts.weather.gov"  is affected by any planned change.

Wim

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 07, 2019, 05:45:34 PM
But I will put in on the " list with wishes " for the next releases.

Let us know when you feel ready for more "wish list" suggestions  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 07, 2019, 06:28:44 PM
Let us know when you feel ready for more "wish list" suggestions  :)
I forgot to tell, there is already a "wish list" topic in Dutch for the "locals" .
If the "wish" also contains a screenshot or an URL it would be helpfull.

Please make a wish list topic in English also here on the forum.
That way the wishes do not get lost in the installation questions in this topic.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 07, 2019, 08:03:51 PM
There will be a "alerts.weather.gov" advisory box and a "meteoalarm.eu" box in the April (2019-04-01) version.

Should be a nice addition to the pwsWD package.
 

Today I enabled the "extra" menu and checked out the available options.  I have no idea what it showed me.  What I do know is that when I click on the link it is opening "https://weer.sluispark.be/index.php?p=mnu_darks&ipad&lang=en">" and I have no idea where these links are set or how to edit them.

I am frustrated trying to figure out how to edit the files so my site displays what I want to show my visitors, and, making sure that what I show is the correct data.  Having the easy weather setup is a fantastic idea, but it seems to me to be lacking code for all sections of the site.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 07, 2019, 08:21:23 PM
Please make a wish list topic in English also here on the forum.
That way the wishes do not get lost in the installation questions in this topic.

New thread opened here. (https://www.weather-watch.com/smf/index.php/topic,67497.0.html)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 07, 2019, 08:23:00 PM
. . . shortened . . .
Today I enabled the "extra" menu and checked out the available options.  I have no idea what it showed me.  What I do know is that when I click on the link it is opening "https://weer.sluispark.be/index.php?p=mnu_darks&ipad&lang=en">" and I have no idea where these links are set or how to edit them.
I am frustrated trying to figure out how to edit the files so my site displays what I want to show my visitors, and, making sure that what I show is the correct data.  Having the easy weather setup is a fantastic idea, but it seems to me to be lacking code for all sections of the site.
This is to much data for easyweathersetup as you can add as menu entries as you want.
There is always to much or far to less documentation. This is the first new release and this topic helps me to find the proper balance.
Check this readme http://wd34.weather-template.com/documentation/WD34-questions.pdf
Scroll to => Menu options => Display Extra links in Menu (default false)
If you want to include extra pages in the menu, you can use a standard iFrame script.
The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.
You can add as menu entries as you want,  they are all shown with a link in the menu and when click appear in an iframe in the middle of the page.  You have set the name of the page in the menu
The URL which should go into the Iframe
The height of the iframe
Code: [Select]
#  these are examples, please use your own ones
$frame                  = 'EWN_mesonet';
$frm_ttls[$frame]       = lang('European Weather Network');  // name in menu
$frm_src[$frame]        = 'https://www.weerstation-herent.be/ewn/stations.php?lang='.$used_lang;
$frm_hgth[$frame]       = 1500;  // length =  height of frame

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on January 08, 2019, 01:23:57 AM
Looks great...wish I was smart enough to know how to code that into my site.  I can't even figure out what file I would need to edit in the pwsWD directory to even attempt this mod.  Would you mind sharing your code so I could get some ideas?

Here is a sample of the code which I know isn't going to make much sense because the parser uses config statements in order to work.  It's almost a language by itself. In order to even run this code, you would need to get the paid version of the parser https://www.geckotribe.com/rss/carp/ because it uses plugins that are not available with the free version.

<style type="text/css">

.h2 {
     font-family: Verdana,Arial,Helvetica,sans-serif;
     font-size: 8pt;
     font-weight: bold;
     color:white;
     text-align: center;
}
.h3 {
     font-family: Verdana,Arial,Helvetica,sans-serif;
     font-size: 8pt;
     font-weight: bold;
     color:#cc0000;
     text-align: center;
}
.h4 {
     font-family: Verdana,Arial,Helvetica,sans-serif;
     font-size: 8pt;
     font-weight: bold;
}
.feedbox {
width:500px;
border:1px solid blue;
border-radius: 10px;
background:#cccccc;
padding:5px;
}
.feedbox div {
background:black;
width:490px;
border:1px solid #808080;
border-radius: 10px;
padding:2px;
text-align: left;
}
.feedbox a { text-decoration:none; }

.tornado a { color:#ff0000; }
.thunder a { color:#ffa500; }
.flashflood a { color:#fd6347; }
.tsunami a { color:#fd6347; }
.hurricane1 a { color:#cd5c5c; }
.hurricane2 a { color:#ff0000; }
.storm a { color:#ee82ee; }
.blizzard a { color:#ff4500; }
.ice a { color:#ff00ff; }
.heavysnow a { color:#ee82ee; }
.tropical a { color:#ff00ff; }
.winter a { color:#ff69b4; }
.flood1 a { color:#7cfc00; }
.sleet a { color:#87ceeb; }
.flood2 a { color:#00ff00; }
.highwind a { color:#ffd700; }
.lakesnow a { color:#ee82ee; }
.heat a { color:#ff4500; }
.redflag a { color:#ff1493; }
.windchill a { color:#b0c4de; }
.avalanche a { color:#87cefa; }
.dust a { color:#ffe4c4; }
.freeze a { color:#00ffff; }
.gale a { color:#dda0dd; }
.marine a { color:#db7093; }
.spray a { color:#00bfff; }
.quake a { color:#f4a460; }
.local a { color:#ffb6c1; }
.nuke a { color:#ffff00; }

---snip ---

</style>
</head>
<div class="feedbox">
<?php

require_once "/xxxxx/xxxxx/xxx/xxxxx/xxxx/carp/carp.php";

CarpConfReset();

// Show 9999 items
CarpConf('maxitems',9999);

// set the CSS classes of the channel and item links
CarpConf('clinkclass','h2');
CarpConf('ilinkclass','h4');

// surround the item link with a DIV
CarpConf('bctitle','<div style="width:490px; background:blue; padding:2px;  text-align: center;">');
CarpConf('actitle','</div>');

function ShowCapStuff($initem, $fieldname, $itemindex, $itemnumber, $valuearray, $returnvalue) {
   $p=&$GLOBALS['carpconf']['rssparser'];
   $target=$p->GetFieldValue('areaDesc');
   return "$target<br />";
}
CarpMapField('areadesc','cap:areaDesc');
CarpConf('iorder', 'link');
CarpRegisterCallback('','ShowCapStuff','handlefield','capstuff');


// CarpConf('iorder','link,desc');
CarpConf('cborder','');
// CarpConf('cborder','link');
// CarpConf('cborder','link,date,desc');
CarpConf('linktarget',1);

CarpConf('bcdate','<small>Last Update: ');
CarpConf('acdate','</small><br />');
CarpConf('cdateformat','M j Y \\a\\t g:i a T');

CarpLoadPlugin('replacetext.php');

ReplaceTextConf(1, 'link', 1, '^(.*Tornado Warning.*)<br />$', '<div class="tornado">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Severe Thunderstorm Warning.*)<br />$', '<div class="thunder">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Flash Flood Warning.*)<br />$', '<div class="flashflood">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Tsunami Warning.*)<br />$', '<div class="tsunami">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*(Inland Hurricane|Hurricane Force) Wind Warning.*)<br />$', '<div class="highwind">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Hurricane Warning.*)<br />$', '<div class="hurricane2">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.Storm Warning.*)<br />$', '<div class="storm">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Blizzard Warning.*)<br />$', '<div class="blizzard"">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Ice Storm Warning.*)<br />$', '<div class="ice">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Heavy Snow Warning.*)<br />$', '<div class="heavysnow">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Tropical Storm Warning.*)<br />$', '<div class="tropical">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Winter Storm Warning.*)<br />$', '<div class="winter">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*(Coastal|Lakeshore) Flood Warning.*)<br />$', '<div class="flood1">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*High Surf Warning.*)<br />$', '<div class="flood1">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Sleet Warning.*)<br />$', '<div class="sleet">\\1</div>');
ReplaceTextConf(1, 'link', 1, '^(.*Flood Warning.*)<br />$', '<div class="flood2">\\1</div>');

--- snip ---

ReplaceTextConf(1,'link',0,'warnings or advisories','warnings or advisories for San Francisco Bay Shoreline/CAZ508');

CarpConf('cacheinterval',5); // refresh the cache every 5 mins
CarpConf('maxcdesc',1);
CarpConf('maxidesc',0);
CarpConf('maxititle',0);
CarpConf('maxctitle',0);

// Display it
CarpCacheShow("http://alerts.weather.gov/cap/wwaatmget.php?x=CAZ508&y=0");
?>
</div>

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 08, 2019, 12:59:51 PM
Problem in earthquake block: magnitude 5.1 in red is not easily legible in orange circle. See snip Earthquake, viewed in Chrome.

A little later it's OK - see Earthquake2 - for magnitude <5?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 08, 2019, 03:01:31 PM
Problem in earthquake block: magnitude 5.1 in red is not easily legible in orange circle. See snip Earthquake, viewed in Chrome.

A little later it's OK - see Earthquake2 - for magnitude <5?
:D Thank you, that is a nice catch.
I will have to test all combinations for back-ground- and text-color.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 08, 2019, 03:33:33 PM
how to get the :
DarkSkyForecast 
script to include it in:
w34 frames.php
Thank you
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 08, 2019, 03:51:19 PM
how to get the :
DarkSkyForecast 
script to include it in:
w34 frames.php
Thank you
The only thing you can include is an url.  So you have to go tot their site, choose settings for lang and untis a.s.o.,  copy from the address line, example  https://darksky.net/forecast/50.8831,4.702/us12/en
Then put that in the frames script.

Or use a link of your other website such as this forecast:
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&lang=en&ipad

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 08, 2019, 03:55:16 PM
I will have to test all combinations for back-ground- and text-color.

Another one I've noticed is the small "Indoor temp" bubble in the main temp block, where white lettering of that small size doesn't show up well on some of the background colours.

[I have actually modified mine to show extratemp1 from the garden instead of indoor temp, and set the background to be blue for any temp. Blame Google Translate for any bad translations of "Garden"!]
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 08, 2019, 03:59:49 PM
Thank you Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 08, 2019, 04:01:23 PM
IMPORTANT
Please do not mail / PM BrianUnderdown  about this version.  This WD version of the HWS-template is based on a november 2017 version. Plus I changed the logic of the PHP code (not the CSS / SVG) and how blocks are addressed and loaded.
It took 1 1/2 month all my spare time, and I am retired.

So for Brian this code is totally different from his new code. He does not want to offend people who ask him about  this version. But he really can not give the answers needed. 

The whole idea is to have different versions and each version has another person responsible for maintenance and support. 
If you want to mail to Brian buy a Meteobridge first and discuss that version.

BUT do not compare versions.  There is really not much code left of the 2017 version I started with.
Do not ask him to port a block from the MB version to the Wd version. Ask me.

Brian asked me to remove all links (URL's)  to weather34 from the code, and that is the first thing I will do tomorrow.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: eb3bvb on January 08, 2019, 04:14:54 PM
f I put this page in the browser:
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&lang=en&ipad
I get it right
but if I execute it through:
http://www.meteotorrelavega.com/pwsWD/w34_start_frame.php?frame=WXSIM
I get the whole full page of weather 28
any suggestions
Thank you
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 08, 2019, 04:33:35 PM
This is to much data for easyweathersetup as you can add as menu entries as you want.
There is always to much or far to less documentation. This is the first new release and this topic helps me to find the proper balance.
Check this readme http://wd34.weather-template.com/documentation/WD34-questions.pdf
Scroll to => Menu options => Display Extra links in Menu (default false)
If you want to include extra pages in the menu, you can use a standard iFrame script.
The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.
You can add as menu entries as you want,  they are all shown with a link in the menu and when click appear in an iframe in the middle of the page.  You have set the name of the page in the menu
The URL which should go into the Iframe
The height of the iframe
Code: [Select]
#  these are examples, please use your own ones
$frame                  = 'EWN_mesonet';
$frm_ttls[$frame]       = lang('European Weather Network');  // name in menu
$frm_src[$frame]        = 'https://www.weerstation-herent.be/ewn/stations.php?lang='.$used_lang;
$frm_hgth[$frame]       = 1500;  // length =  height of frame

Wim

Thanks for that info.  Another piece of my puzzle figured out  :oops:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 08, 2019, 04:34:18 PM
f I put this page in the browser:
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&lang=en&ipad
I get it right
but if I execute it through:
http://www.meteotorrelavega.com/pwsWD/w34_start_frame.php?frame=WXSIM
I get the whole full page of weather 28
any suggestions
Thank you
When there is a problem like this, you could have made a typing error, or your keybord is "kaput"
This is the link used, there is an extra p at the end
http://www.meteotorrelavega.com/weather28/index.php?p=wsWxsimPrintFull&amp;lang=es&amp;ipadsp

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 08, 2019, 04:35:44 PM
Here is a sample of the code which I know isn't going to make much sense because the parser uses config statements in order to work.  It's almost a language by itself. In order to even run this code, you would need to get the paid version of the parser https://www.geckotribe.com/rss/carp/ because it uses plugins that are not available with the free version.


Thanks...if I already owned carp I would try it, but I don't...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 08, 2019, 05:00:47 PM
Helo Wim
Noticed the wind  data refresh is about 30 seconds. How can i decrease the clientraw refresh interval?

Thanks.

http://www.llanelliweather.co.uk

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 08, 2019, 05:08:43 PM
Noticed the wind  data refresh is about 30 seconds. How can i decrease the clientraw refresh interval?

Is that not set in WD?

Quote
Also when i click on nearby on current conditions i get lots of warning messages...

Working OK here for EGFF.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 08, 2019, 05:18:51 PM
Thanks Bitsostring

Just checked the local and now working?????
Strange.

In the old weather 34 software there was an option to alter the refresh rate. Wait for Wim to see the question

Thanks
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 08, 2019, 07:04:42 PM
. . .
In the old weather 34 software there was an option to alter the refresh rate. Wait for Wim to see the question
. . .
Thanks
There is a setting, BUT it is not user configurable.
Be aware that playing around with reload settings will increase the  load of you server.
http://wd34.weather-template.com/pwsWD/w34_module_test.php => test wind_gust_block.php

wind_gust_block.php (25) include_once =>w34_livedata.php => loads the clientraw or WDapi data
  w34_livedata.php (28) include_once =>w34_settings.php
    w34_settings.php (31) include =>w34_settings1.php
  w34_livedata.php (32) include_once =>w34_shared.php  => loads convert functions and multiple SVG icons
wind_gust_block.php (29) include_once =>w34_common.php  => loads the language file

All other blocks are loaded in the same way and have to load all those supporting scripts/files also
All this to get the "realtime" data in the correct unit and the words translated to the correct language

So if you have a normal hosting account do not set the refresh-times to short.

I will move the default refresh-times settings to easyweather in April.
For now  check the w34_blocks.php which contains the headings, pop-ups and refresh-time for each block used.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 08, 2019, 08:44:34 PM
I assume my server php version is the problem...but this doesn't appear to affect anything...yet.  Should I be concerned?



Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/trave147/public_html/pwsWD/w34_easyweathersetup.php on line 106

weather34 EASY SETUP for WeatherDisplay

Back to the main page

Enter your password for the "Setup Screen" below

Info: Your current PHP version is : 5.5.38
PHP 7+ is advised for this template but it will run also with PHP 5.6.3 or higher
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 08, 2019, 08:55:22 PM
I assume my server php version is the problem...but this doesn't appear to affect anything...yet.  Should I be concerned?
. . .
Quote
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/trave147/public_html/pwsWD/w34_easyweathersetup.php on line 106
. . .
Thanks, I will remove that one also in the April version.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 08, 2019, 11:07:31 PM
windrun is in KM in the clientraw data, sorry about that confusion

Just checked the conversion factor for my old w34 (V.3.4-X5(d)) page too: it was showing 110.6 mi instead of 59.8!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on January 09, 2019, 04:59:25 AM
There will be a "alerts.weather.gov" advisory box and a "meteoalarm.eu" box in the April (2019-04-01) version.
The "alerts.weather.gov" version will use this feed: https://alerts.weather.gov/cap/wwaatmget.php?x=CAZ095&y=0
The "meteoalarm.eu"  version will use: https://www.meteoalarm.eu/documents/rss/nl.rss

The "alerts.weather.gov" feed is  already used in the Leuven-Template, but as always, one needs some time to test and integrate it in the other scripts.

Have had no indication that the  "alerts.weather.gov"  is affected by any planned change.

Wim

In the alerts.weather.gov version, would it be possible to have the ability to add multiple codes i.e. CAZ095 (Kern County Mountains) and CAC029 (Kern County) which is roughly the same area except the zone code CAZ095 could take in a larger area and parts of several counties?  The reason being able to add multiple codes is that the NWS could issue an alert either for the zone or county depending on the type of alert and affected area.  Another good example of this is in Kansas where the counties and zones are the same area.

https://alerts.weather.gov/cap/wwaatmget.php?x=KSZ104&y=1 (Wyandotte)
https://alerts.weather.gov/cap/wwaatmget.php?x=KSC209&y=1 (Wyandotte)




Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 09, 2019, 11:08:35 AM
Hello Wim

Trying to add my links on the extras field.
I have added one of my own but nothing is appearing.The other links that were there are working ok.
Can you see any issue with the data i have entered ?

#
#  these are examples, please use your own ones
#
$frame                  = 'Latest North Atlantic Synoptic Chart';
$frm_ttls[$frame]       = lang('Latest North Atlantic Synoptic Chart');  // name in menu
$frm_src[$frame]        = 'https://ocean.weather.gov/A_sfc_full_ocean_color.png'.$used_lang;
$frm_hgth[$frame]       = 946;  // name in menu
#
$frame                  = 'BNLWN_mesonet';
$frm_ttls[$frame]       = lang('Benelux Weather Network');  // name in menu
$frm_src[$frame]        = 'http://www.beneluxweather.net/mesonet-map/mesonet-map.php?lang='.$used_lang;
$frm_hgth[$frame]       = 1366;  // name in menu
#
$frame                  = 'EWN_mesonet';
$frm_ttls[$frame]       = lang('European Weather Network');  // name in menu
$frm_src[$frame]        = 'https://www.weerstation-herent.be/ewn/stations.php?lang='.$used_lang;
$frm_hgth[$frame]       = 1500;  // name in menu

Thanks
Steve
 
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 09, 2019, 11:17:25 AM
Hello Wim

Trying to add my links on the extras field.
I have added one of my own but nothing is appearing.The other links that were there are working ok.
Can you see any issue with the data i have entered ?
Code: [Select]
$frame                  = 'Latest North Atlantic Synoptic Chart';
$frm_ttls[$frame]       = lang('Latest North Atlantic Synoptic Chart');  // name in menu
$frm_src[$frame]        = 'https://ocean.weather.gov/A_sfc_full_ocean_color.png'.$used_lang;
$frm_hgth[$frame]       = 946;  // name in menu
. . .
Thanks
Steve
Change the link to:
Code: [Select]
$frm_src[$frame]        = 'https://ocean.weather.gov/A_sfc_full_ocean_color.png';
But even then it will not display, check  in your browser: right-click =>  inspect => console
Refused to display 'https://ocean.weather.gov/A_sfc_full_ocean_color.png' in a frame because it set 'X-Frame-Options' to 'sameorigin'
So you are not allowed to display those images in an iframe. 
More and more websites do that as they do not want their content "copied"
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 09, 2019, 12:24:57 PM
Ok Wim thanks
Bit of a bummer but thanks for trying for me
Thanks.
Steve
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 09, 2019, 02:27:02 PM
Ok Wim thanks
Bit of a bummer but thanks for trying for me
Thanks.
Steve
I changed the scripts to also include plain images without an iframe.
Attached zip, replace two scripts but do not forget to make a copy of the current scripts first.
You can check the result at http://wd34.weather-template.com/pwsWD/w34_start_frame.php?frame=TEST

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 09, 2019, 03:51:33 PM
Ok Wim did what you said and looking good.

Any idea why the W34 part of my website won't show on my ipad?

Getting message ...Error: Embedded data could not be displayed.

Think it's the code on my site. Not good at all with this stuff

Ps all shows ok on my laptop

steve
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 09, 2019, 04:07:49 PM
. . .
Any idea why the W34 part of my website won't show on my ipad?
Getting message ...Error: Embedded data could not be displayed.
Think it's the code on my site. Not good at all with this stuff
Ps all shows ok on my laptop
steve
Google is your best friend => "Embed tag was never endorsed by the W3C so it's invalid code, although some browsers support it."
Safari is the engine on the iPad and more strict than others. Chrome on the iPad uses the Safari engine also.
When you redo your site with iframe it will work on all platforms.
Wim

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: pricey on January 09, 2019, 04:15:59 PM
Ok Wim Thanks
Will research it and try
Cheers
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Svenni on January 09, 2019, 08:57:11 PM
Hello Wim

Thx for the update of this nice layout.
I have it up and go, but i se on the right side on the current condition and push the link on "nearby" i get (EEBR , Brussel)

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 09, 2019, 09:03:24 PM
Hello Wim

Thx for the update of this nice layout.
I have it up and go, but i se on the right side on the current condition and push the link on "nearby" i get (EEBR , Brussel)
Did you het your METAR API key?
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Svenni on January 09, 2019, 09:17:35 PM
Ahhhhh sorry Wim, it's on place i forgot to do that. Thx
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 09, 2019, 10:34:29 PM
Temp and Barometer block pop-up graphs for Y and M (not D) show "<br><color>Radiation</color>" after the High/Low legend?

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 10, 2019, 08:47:12 AM
Temp and Barometer block pop-up graphs for Y and M (not D) show "<br><color>Radiation</color>" after the High/Low legend?
That is an unexpected/invalid translation in the language file for english
Add to the bottom of  pwsWD/languages/lang.en.php   1 line just before the ?>
Code: [Select]
$lang['Good']= 'Good Air Quality ';

$lang['Low'] = 'Low';
?>
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 10, 2019, 10:51:08 AM
That is an unexpected/invalid translation in the language file for english

Thanks, Wim, all good now  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: R_o_B on January 10, 2019, 02:40:38 PM
Wim, is there a way to force a page refresh when the page is loaded - I know I can click on the refresh button of my browser, but I would prefer to click on the link to my page and have that page loaded with fresh/up-to-date weather data (skipping any cache data).
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 10, 2019, 02:53:56 PM
Wim, is there a way to force a page refresh when the page is loaded - I know I can click on the refresh button of my browser, but I would prefer to click on the link to my page and have that page loaded with fresh/up-to-date weather data (skipping any cache data).
As all data comes from PHP the browser cache will not be used for data as with html.
The server caches the data loaded from external sites. But those are not refreshed when reloading the page.
Actions when loading the page (as it is functioning now)
1. Frame of the  page with empty boxes is sent back to to the requesting browser
2. The "update script" is loaded and it starts re-loading obsolete data form external sources (DarkSky, AQ,  a.s.o.)
3. All blocks are loaded one by one and they use the available data on the server, the blocks do not reload data themselves
4. All blocks refresh their data at different intervals after they are loaded

Often one uses a cron-job so that all data on the server is always valid and step 2  just checks and find all data is OK.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 10, 2019, 05:34:06 PM
A couple more observations on the Dark Theme viewed in Chrome. . .

1. Your test page Sun block has a problem with "Estimated" font size - see Sun1. (I presume you have been making changes, as the block is no longer titled Sun, Moon & Space like mine - see Sun2. I prefer just Sun!)

2. I think the webcam fits better at $webcam_height of 155px (webcam2) rather than 160px (webcam1, where it hangs over the bottom of the frame)? (I changed mine to show width 70%, too, to reproduce the 4:3 aspect ratio without stretching.)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 10, 2019, 06:27:03 PM
A couple more observations on the Dark Theme viewed in Chrome. . .

1. Your test page Sun block has a problem with "Estimated" font size - see Sun1. (I presume you have been making changes, as the block is no longer titled Sun, Moon & Space like mine - see Sun2. I prefer just Sun!)
Yes I am testing a new sun-block.php, it should always display the correct sun-position ,also when someone from another time-zone visits your site.  That "Estimated" is only displayed in the "dark theme". I removed it in the script as all text should be translated to the default language.
Quote
2. I think the webcam fits better at $webcam_height of 155px (webcam2) rather than 160px (webcam1, where it hangs over the bottom of the frame)? (I changed mine to show width 70%, too, to reproduce the 4:3 aspect ratio without stretching.)
The problem is not with the height the webcam image. The problem is a difference in the CSS between light and dark. All block-headers are displayed lower in the dark theme, just outside the  band. In the light theme they are correctly place inside the grey band.
Have to find where it is specified.
Wim
FOUNDIT:  weatheritem has 6px padding in dark  0px in light theme
There are more differences this pushes all content lower in the box.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 10, 2019, 07:22:56 PM
FOUNDIT:  weatheritem has 6px padding in dark  0px in light theme

Well done! I wonder why. . . (But that's why my 5px correction made it "look" better!)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on January 10, 2019, 08:01:28 PM
That is an unexpected/invalid translation in the language file for english
Add to the bottom of  pwsWD/languages/lang.en.php   1 line just before the ?>
Code: [Select]
$lang['Good']= 'Good Air Quality ';

$lang['Low'] = 'Low';
?>
Wim

Is this related to the same issue?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 10, 2019, 08:49:41 PM
That "Estimated" is only displayed in the "dark theme". I removed it in the script as all text should be translated to the default language.

I did notice that the French translation is "Luminosité".

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 12, 2019, 04:08:50 PM
Small problem in Rain block: 0.3 mm rainfall today was at 0130 Z, so "Last Hour" should be zero.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 12, 2019, 04:26:31 PM
Small problem in Rain block: 0.3 mm rainfall today was at 0130 Z, so "Last Hour" should be zero.
But there is no link to that  page. Not in the Avatar not in the post.
As I am not clairvoyant, there is nothing i can do.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 12, 2019, 04:32:24 PM
Not in the Avatar not in the post.

Sorry: http://swanston.maui.co.uk/pws/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 12, 2019, 05:06:40 PM
Small problem in Rain block: 0.3 mm rainfall today was at 0130 Z, so "Last Hour" should be zero.
You are using clientraw.txt for your "livedata".
The http://swanston.maui.co.uk/clientraw.txt  has 10 fields for rain-hour, they all contain 0.3 mm
The clientrawextra.txt has 24 fields for rain-hour, the first 9 contain zero , other 15 contain0.3 mm

Seems Brian, as the programmer of WD, has to tell me how I should calculate rain-last hour.
Probably I have to subtract  the tenth = last hour value from the ninth one to get the last hour rain.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 12, 2019, 05:20:41 PM
You are using clientraw.txt for your "livedata".
The http://swanston.maui.co.uk/clientraw.txt  has 10 fields for rain-hour, they all contain 0.3 mm
The clientrawextra.txt has 24 fields for rain-hour, the first 9 contain zero , other 15 contain0.3 mm

That would explain it! I did check that WD was showing "rain last hour" correctly, and SSGauges is showing "time of last rain" correctly, before I posted. . . but didn't think to check the values in clientraw.txt.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on January 12, 2019, 05:22:35 PM
Wim, does it use clientrawhour.txt ? The last 60 mins rain is in there by minute starting at #361 if that helps.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 12, 2019, 05:31:20 PM
Wim, does it use clientrawhour.txt ? The last 60 mins rain is in there by minute starting at #361 if that helps.
http://swanston.maui.co.uk/clientrawhour.txt  Those 60 fields also contain 0.3 mm
361   rain total last 60 min for min 01   M   0.3 mm ( = 0.012 in )
362   rain total last 60 min for min 02   M   0.3 mm ( = 0.012 in )
363   rain total last 60 min for min 03   M   0.3 mm ( = 0.012 in )

It seems that all those  "rain-minute" "rain-hour" fields  all contain cumulative values, but Brian has to confirm that.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 12, 2019, 05:37:38 PM
Wim, does it use clientrawhour.txt ? The last 60 mins rain is in there by minute starting at #361 if that helps.

Wim's quicker than I am with the parser! But I agree they all contain 0.3 mm. . .

[A single tip from my modified raingauge is actually 0.25 mm = 0.01 in, but WD doesn't do mm to 2 d.p.]
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on January 12, 2019, 05:38:34 PM
 :(
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: windgust on January 12, 2019, 08:21:25 PM
To get the graphs to work using WU where do I set the API key, Do I place it in the dark weather section?
I see the station name for WU not a spot to add my API key.
Also moon rise moon set does not match WD using same lat/long
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 12, 2019, 09:01:14 PM
To get the graphs to work using WU where do I set the API key, Do I place it in the dark weather section?
I see the station name for WU not a spot to add my API key.
Also moon rise moon set does not match WD using same lat/long
IMPORTANT
So for now and at least until Feb 15, all graphs should work with your WU-station data. Just set the correct station-key usinge easyweather.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 12, 2019, 09:07:36 PM
. . .  shortened . . .
Also moon rise moon set does not match WD using same lat/long
To check this out, I need the URL of your pwsWD/ folder.
And can you please post your latitude / longitude as you set in WD and in Easyweather? I con not check these myself as settings are protected from spying eyes.

Be aware that WeatherDisplay uses a minus for latitude east of Greenwich (f.i. Europe).
Other programs use the standard minus for west of Greenwich (f.i. the USA).

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on January 12, 2019, 09:19:03 PM
Also be aware that moon data can be confusing since the rise and set seen on one calendar day may be from two different moon cycles, see this recent thread (https://www.weather-watch.com/smf/index.php/topic,67319.msg540745.html#msg540745).
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on January 13, 2019, 05:39:37 AM
its daily rain total
as per the clientrawdescription.txt
i.e so its the daily rain total 60 minutes ago
then the daily rain total 59 minutes ago
etc

clientraw.txt does have
100-109   array of last rain last hour (10 positions)
and that too is daily rain total at those times
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: blainec on January 14, 2019, 01:30:26 AM
My AQI is reading "offline". Is this normal between data updates?

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 14, 2019, 07:41:54 AM
My AQI is reading "offline". Is this normal between data updates?
The date-time seemed to be in "UTC" for other test-sites. Now it is in local as far as i can see.
Try this script for a few days, I changed only line 93 from gmdate() to date()
As the time difference here in wester Europe between UTC and local is small, this error was not found when testing.

PM or mail me if there are still problems.
Wim

P.S. better version  attached at 15:21 UTC
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 14, 2019, 08:03:29 AM
its daily rain total
as per the clientrawdescription.txt
i.e so its the daily rain total 60 minutes ago
then the daily rain total 59 minutes ago
etc

clientraw.txt does have
100-109   array of last rain last hour (10 positions)
and that too is daily rain total at those times
Thanks, also for the mail.
The array [100] -> [109] covers only 1 hour divided in 10 data points.
"total rain of the last hour" = latest data point [100] minus oldest point [109];
w34_livedata.php line 132 is changed from
Code: [Select]
$weather["rain_lasthour"]       = convert_precip ($wd[100],$from,$to);to
Code: [Select]
$value                          = (float) $wd[100] - (float) $wd[109];  # 2019-01-14
$weather["rain_lasthour"]       = convert_precip ($value ,$from,$to);   # 2019-01-14

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 14, 2019, 11:11:38 AM
Hi,

I have had this version up and running for the last few days now, however I can't seem to get the graphs working.  I have set up the WD API and tested with success and I have set up the SQL table and I can see the data arriving every minute, however I can't seem to generate the graphs.  The  'Today' graph seems to be populated with some demo data and does not seem to change.  Am I missing something?

I can switch the source of the graph data from WU and that works fine.

Is there any ideas what I am doing wrong?

The link to my site is,

http://micklehamweather.com/pwsWD/

Thanks,
Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 14, 2019, 12:04:20 PM
Hi,
I have had this version up and running for the last few days now, however I can't seem to get the graphs working.  I have set up the WD API and tested with success and I have set up the SQL table and I can see the data arriving every minute, however I can't seem to generate the graphs.  The  'Today' graph seems to be populated with some demo data and does not seem to change.  Am I missing something?

I can switch the source of the graph data from WU and that works fine.
. . . shortened . . .
Thanks,Neil
I can not check your settings, so  I attach a screenshot. How did you set these two settings?
It works like this:
If all database settings are OK:
WDapi  or the stationcron will store 1 record in the database

If charts are set to Database
 => stationcron will store one line in results.csv

In hindsight, it is more logical to let WD-api add the lines to the .csv when it is loading the DB-record.
But that file can grow very rapidly when the upload interval is set to frequently.


Just before and after midnight the two other cron-scripts will add 1 line to year and monh csv files and clean todays data from the database.
The result.csv (= this days data) is then cleared also.

===
As far as I can see, based on the file-contents, you set WDapi to upload to the database, but are not running a cron-job.

Wim

P.S. I added another post below about the sun-block


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 14, 2019, 01:39:25 PM
. . .  shortened . .
The link to my site is,  http://micklehamweather.com/pwsWD/
Thanks,Neil
I do not understand the sun block on your site.
These should be the settings (for Melbourne)  in pwsWD/w34_settings1.php.  Could you check them?
Code: [Select]
                   $TZ = "Australia/Melbourne";
                  $lat = (float) "-37.813611";
                  $lon = (float) "144.963056";
I attach the latest version of the script, for easier reference it displays the hours around the 24-hr clock. 
You have to add the azimuth script also.
At noon there should be sun, at midnight it should be dark.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 14, 2019, 02:36:56 PM
I attach the latest version of the script, for easier reference it displays the hours around the 24-hr clock. 
At noon there should be sun, at midnight it should be dark.

Azimuth/elevation not working in new Sun block here - http://swanston.maui.co.uk/pws/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 14, 2019, 02:45:30 PM
Azimuth/elevation not working in new Sun block here - http://swanston.maui.co.uk/pws/
Yes, stupid me. I wanted to check how the beta-sun script would work in Australia.
I forgot that others could also download that script.  Will do it with PM's from now on.
For the new sun script you need the Niko's version of the Azimuth/elevation script also, it is attached.
Succes, PM me if you have more problems with this version.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 14, 2019, 03:07:03 PM
For the new sun script you need the Niko's version of the Azimuth/elevation script also, it is attached.

No worries, sun/azimuth working now! And so is the rain last hour, I think: I'll check that when we get more rain  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 15, 2019, 08:36:05 AM
Thanks Wim.

I checked my settings and you were correct I had set WDapi to upload to the database, I have now changed it to 'stationcron job will the database load' - however I am still having issues.

I think I understand how it works now, I originally had WDapi to upload to the database and I could see the data coming into my SQL table on 1 minute intervals (but obviously not populating the .csv files).  Since I have changed to the cronjob load option, nothing is coming into my SQL table.  It seems like the cronjobs in WD are not running.  If I manually run the following link, it will work but nothing is happening in WD.

http://micklehamweather.com/pwsWD/w34_cron_stationcron.php

I have checked and double checked the links in WD but I can't seem to work it out why it won't work. I have included some of my settings, maybe I have missed something!

Re the sun block on my site, I have checked my settings and they match what you had suggested so again I am not sure what has happened there!

I have attached a copy of what I can currently see.

Thanks again for your help with this.

Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 15, 2019, 10:29:38 AM
Thanks Wim.
I checked my settings and you were correct I had set WDapi to upload to the database, I have now changed it to 'stationcron job will the database load' - however I am still having issues.
I think I understand how it works now, I originally had WDapi to upload to the database and I could see the data coming into my SQL table on 1 minute intervals (but obviously not populating the .csv files).  Since I have changed to the cronjob load option, nothing is coming into my SQL table.  It seems like the cronjobs in WD are not running.  If I manually run the following link, it will work but nothing is happening in WD.

http://micklehamweather.com/pwsWD/w34_cron_stationcron.php

I have checked and double checked the links in WD but I can't seem to work it out why it won't work. I have included some of my settings, maybe I have missed something!
The WDapi works fine, so you can set that to upload the SQL table.

I agree that it seems the cron-jobs are not running as they should. They run OK when manually  started.  But they do not appear to be run by WD.
Please check first if there are no spaces or other strange characters before or after the cron links.
If all seems OK on your end,  contact Brian Hamilton maybe he can see in the logs what the problem is.
Quote
Re the sun block on my site, I have checked my settings and they match what you had suggested so again I am not sure what has happened there!
I have attached a copy of what I can currently see.
Thanks again for your help with this.
Neil
The problem with the sun-block is not something you can see. Only visitors from another timezone see a strange circle.
Attached a screenshot hot is looks  when I visit your site

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 15, 2019, 11:17:11 AM
Thanks Wim - all good now, I have it working!

The issue was a leading blank space at the start!!  It was hard to spot - but now that I have noticed it, it's quite obvious....sorry!  :oops:

Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: oreitsma on January 15, 2019, 04:19:48 PM
Thanks Wim - all good now, I have it working!

The issue was a leading blank space at the start!!  It was hard to spot - but now that I have noticed it, it's quite obvious....sorry!  :oops:

Neil

Hi Neil,

Thank you! I had same problem and could not find it.
Solved!

Brgds,
Oebel
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: blainec on January 16, 2019, 03:58:21 AM
I'm having a problem using wdapi.

It seems to be set correctly, but when I press the test in WD I get "Success: Bad data". and the database does not get updated.


This is what I get when I manually execute wdapi:

Notice: Undefined variable: file_contents in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 71

Notice: Undefined offset: 2 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 74

Notice: Undefined offset: 10 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 75

Notice: Undefined offset: 9 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 76

Notice: Undefined offset: 39 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 77

Notice: Undefined offset: 6 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 78

Notice: Undefined offset: 5 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 79

Notice: Undefined offset: 41 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 80

Notice: Undefined offset: 4 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 81

Notice: Undefined offset: 8 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 82

Notice: Undefined offset: 7 in C:\Abyss Web Server\htdocs\pwsWD\w34_WDapi.php on line 83
Bad Data:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 16, 2019, 07:44:50 AM
I'm having a problem using wdapi.

It seems to be set correctly, but when I press the test in WD I get "Success: Bad data". and the database does not get updated.
. . .  shortened . . .
Bad Data:
Step 1: save the uploaded data which is put after the URL by WD in the form  URL?d=all_your_data_fields
The first part of the return message "succes" signals that some data  (at least 50 characters) was received  and is saved as a text-string for later use
2. Then the WDapi checks if a database exits "If not" the script ends.
You have set you will use a database so the settings are read to check if WDapi needs to upload to the database
The database name, password a.s.o.  are checked if they are not empty,  if empty the script ends without a message.
Then it checks if "WDapi or the cronjob" must upload. If the cronjob should do it => no message and the WDapi script ends.

3. The WDapi script connects to the database, in your case the connection is OK, otherwise there would have been an error message

4. The fields for the database are created from the text string
AND NOW the data is inserted in the database
Code: [Select]
$result = mysqli_query($conn,"INSERT INTO weatherstation(time, outsideTemp, barometer, raintoday, UV, windgust, windSpeed, radiation, dewpoint, rainrate, direction, date, lightning)
VALUES('$updated', '$temp', '$barometer', '$raintoday', '$uv', '$windgust', '$windspeed', '$solar', '$dewpoint', '$rainrate', '$direction', '$date', '$lightning')");
if ($result == false)
     { die ('Bad Data: '. mysqli_connect_error()); }


The only thing which does not works is the insert, probably the credentials for the userid are set to low.
I will read the documentation to find a better clue what is wrong, as the error message displayed is empty, try the attached replacement script
Use PHPADMIN or your cPanel and give this weather34 user all credentials possible.
===
Check http://wd34.weather-template.com//documentation/WD34-SQL-2019-01.pdf point 2.1: you could try load some data with PHPadmin, just to see  if there is an error message.
===
When you use the WDapi in your browser you get those messages as the fields are not available URL?d=all_your_data_fields


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: blainec on January 17, 2019, 04:34:01 AM
with your new script I now get an error number 1366
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 17, 2019, 07:52:00 AM
with your new script I now get an error number 1366
OK, it was the UV value which was causing the problem.
Please test this version,
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 17, 2019, 09:34:18 AM
Hi Wim,

Can you tell me what the little temperature below the main temperature is supposed to represent (see attachment)?  I assume it some kind of trend, however mine seems to be way off and it has been like this since the start.  How is this calculated?

If it helps, here is a link to my site.

http://micklehamweather.com/pwsWD/

Thanks,
Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 17, 2019, 10:24:24 AM
Hi Wim,
Can you tell me what the little temperature below the main temperature is supposed to represent (see attachment)?  I assume it some kind of trend, however mine seems to be way off and it has been like this since the start.  How is this calculated?
If it helps, here is a link to my site.http://micklehamweather.com/pwsWD/
Thanks,Neil
Compare your site with the demo-site.  It should be the temperature trend.
Most of the times it should be between -1 and + 1.
The script compares "current temp" with "temp 15 minutes" ago.
But you WD file as uploaded contains 2 extra spaces.
All fields after these two spaces are misaligned  and  current temp  is now compared to lowest dewpoint today.

Please update to the latest WD release as this is an old problem.
Or use clientraw.txt for your data.

Why do I always ask for the link to the site?
To check a lot of values with this script: http://micklehamweather.com/pwsWD/w34_module_test.php
One can check the calculated "Live data values" or the WDapi values with the field-names.
All the uploaded files, as long as they are in the default folders, can also be inspected this way.
And any individual script can be run with error-reporting on.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 17, 2019, 11:18:44 AM
Thanks again Wim - I have updated to the latest version of WD and it is working fine.

Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 17, 2019, 08:20:24 PM
Silly trivial question: why are the legends (data source, hardware, etc.) not automatically centred? Is that css too?

Legend1 is my site, legend2 is your test site - viewed in Chrome.
Title: Issue loading webcam image
Post by: GW400 on January 17, 2019, 08:24:23 PM
In w34_easyweathersetup I have used this link to my webcam image: ./webcam/aad-axis-01.jpg?
Nothing is shown under "Live Web Cam" rectangle.
If  I select "Live Web Cam" link at the bottom the static webcam image pops up.
Any idea what I'm doing wrong?

What is requirements for showing webcam image?
Can we add a url to the webcam when using an IP camera? Should we use http://xxx or just add fqdn?
When using an image what is the size requirements (X x Y pixels)?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on January 17, 2019, 08:29:00 PM
the web cam Q was asked and answered further up in this thread
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 17, 2019, 08:41:34 PM
Silly trivial question: why are the legends (data source, hardware, etc.) not automatically centred? Is that css too?

Legend1 is my site, legend2 is your test site - viewed in Chrome.
Please always the URL to your pwsWD folder.  I had to scan your previous posts to find the URL.

Yes, it is in the CSS and the three lines itself are centred. But the block with the three is not centred in the footer.
It only has a 75px left margin to not interfere with the images on the left.

As I have a longer third line it only looks like the block with the three lines is centred.
Adapting the CSS is a not so trivial task for the April release.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on January 17, 2019, 10:48:38 PM
the web cam Q was asked and answered further up in this thread

The previous post recommends: "You set the link to  "../webcam/image.jpg" which is 100% correct"
This is what I have done by specifying ../webcam/aad-axis-01.jpg , but on an "X weathercam" is shown in rectangle for Live Web Cam

ls -l webcam
total 156
-rw------- 1 weather weather 158374 Jan 17 09:26 aad-axis-01.jpg

_____________________
After posting the previous message I discovered my error: owner user and group was incorrect.
Now it is working
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: blainec on January 18, 2019, 04:19:29 AM
OK, it was the UV value which was causing the problem.
Please test this version,
Wim
It's working now.  Thank you

https://weatheryyc.com/pwsWD
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 19, 2019, 05:24:23 AM
Hi Wim,

Sorry I have another question, this maybe a bug or a lack of understanding on my part.  Currently I have an AQI reading on my site of 99 - this is based on the nearest AQ station (for me it's Footscray, Australia).  If I go to the link for this station the AQI is actually 35 - see link below.

https://aqicn.org/city/australia/melbourne/footscray/

I have then checked the output for my AQI in the module_test page, I can see the reference of an AQI of 35, but nothing for 99.  How is the 99 generated?  Maybe I am wrong, but I assumed my site should be showing the same AQI as the source, which is 35.

The link to my site is,

https://micklehamweather.com/pwsWD/

Thanks,
Neil

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 19, 2019, 08:11:19 AM
Hi Wim,

Sorry I have another question, this maybe a bug or a lack of understanding on my part.  Currently I have an AQI reading on my site of 99 - this is based on the nearest AQ station (for me it's Footscray, Australia).  If I go to the link for this station the AQI is actually 35 - see link below.

https://aqicn.org/city/australia/melbourne/footscray/

I have then checked the output for my AQI in the module_test page, I can see the reference of an AQI of 35, but nothing for 99.  How is the 99 generated?  Maybe I am wrong, but I assumed my site should be showing the same AQI as the source, which is 35.

The link to my site is,

https://micklehamweather.com/pwsWD/

Thanks,
Neil
Thank you, added future code for test and did not remove all before release  :oops:  A new version is attached.

One can check the files itself by using this script:  https://micklehamweather.com/pwsWD/w34_module_test.php
Just use list contents and select "./jsondata/gov_aqi.txt"  it shows all data (also in json).
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 19, 2019, 09:30:44 AM
Thanks Wim - it’s working fine now.

It looks like the pop up script will also need a fix as it is still showing the old AQI value.

Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 19, 2019, 09:52:38 AM
Thanks Wim - it’s working fine now.
It looks like the pop up script will also need a fix as it is still showing the old AQI value.
Neil
:oops:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 19, 2019, 12:42:46 PM
Moon rise and set appear to be shown an hour late: moon set in Edinburgh this morning was 0645, next moon rise is 1425.

http://swanston.maui.co.uk/pws/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 19, 2019, 12:54:58 PM
Moon rise and set appear to be shown an hour late: moon set in Edinburgh this morning was 0645, next moon rise is 1425.

http://swanston.maui.co.uk/pws/
There is an update on-line with all changed scripts: http://wd34.weather-template.com/
The moon-block.php and two new supporting scripts in the other/ folder could take care of it.
Wim


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bdtripps on January 19, 2019, 03:06:41 PM
Wim Thanks

http://southwestweather.com/w34wd/index.php (http://southwestweather.com/w34wd/index.php)

BTrip
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 19, 2019, 03:22:51 PM
Wim Thanks

http://southwestweather.com/w34wd/index.php (http://southwestweather.com/w34wd/index.php)

BTrip
Thanks also, please install the updates scripts  from  http://wd34.weather-template.com/   
=> Updated scripts up to 2019-01-19   link http://wd34.weather-template.com/pwsWDupdate_2019-01-19.zip
Sorry, this is a first new version of the 2017 release and it needed people to test all those scripts in the last two weeks.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bdtripps on January 19, 2019, 03:46:58 PM
Wim
Thanks again updates installed.
http://southwestweather.com/w34wd/index.php (http://southwestweather.com/w34wd/index.php)

BTrip
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weerstation on January 19, 2019, 04:03:47 PM
.
http://southwestweather.com/w34wd/index.php (http://southwestweather.com/w34wd/index.php)

BTrip

First clock I see not moving from left to right and back.  =D&gt; :thumbright:
Did you use another type of font for that?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on January 19, 2019, 04:07:59 PM
Wim
Thanks again updates installed.
http://southwestweather.com/w34wd/index.php (http://southwestweather.com/w34wd/index.php)

BTrip

That really looks good, great job Wim  =D&gt;
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 19, 2019, 04:27:56 PM
First clock I see not moving from left to right and back.  =D&gt; :thumbright:
Did you use another type of font for that?
Yes any monotype font will do.
Code: [Select]
font-family: "Lucida Console", Monaco, monospace; On request of a user as it was indeed irritating using a normal font, Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 19, 2019, 06:45:36 PM
There is an update on-line with all changed scripts: http://wd34.weather-template.com/
The moon-block.php and two new supporting scripts in the other/ folder could take care of it.

Great stuff, Wim! Special thanks for the clock. . . but Moon info pop-up rise/set still not right. See moon2 from http://swanston.maui.co.uk/pws/

P.S. _list.pdf has a few |2018-01-19| dates - should these be |2019-01-19|?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: oreitsma on January 19, 2019, 10:37:56 PM
Hi Wim,

I got a "NO Boltek file found".
https://www.weerstation-assen.nl/actueel-weer2.php (https://www.weerstation-assen.nl/actueel-weer2.php)
The Boltek file is there.

Thanks!

Brgds,
Oebel
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 20, 2019, 07:07:00 AM
Hi Wim,

I got a "NO Boltek file found".
https://www.weerstation-assen.nl/actueel-weer2.php (https://www.weerstation-assen.nl/actueel-weer2.php)
The Boltek file is there.
Thanks!
Brgds,
Oebel
To check what is happening, the URL to the pwsWD/ folder is essential. At home I can inspect and find it in the HTML. When traveling with an iPad no way. So this embedded / I Frame??? script will have to wait till tomorrow, sorry
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 20, 2019, 07:14:58 AM
Great stuff, Wim! Special thanks for the clock. . . but Moon info pop-up rise/set still not right. See moon2 from http://swanston.maui.co.uk/pws/
P.S. _list.pdf has a few |2018-01-19| dates - should these be |2019-01-19|?
The moon block is now OK. The pop-up was not touched yet, it is not on the list either. Need more time for that one.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: oreitsma on January 20, 2019, 07:57:48 AM
To check what is happening, the URL to the pwsWD/ folder is essential. At home I can inspect and find it in the HTML. When traveling with an iPad no way. So this embedded / I Frame??? script will have to wait till tomorrow, sorry
Wim

Hi Wim,

Here is the url: https://www.weerstation-assen.nl/pwsWD/index.php (https://www.weerstation-assen.nl/pwsWD/index.php)
It worked all the time, before I did this update from this template yesterday.

Brgds,
Oebel
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 20, 2019, 08:30:17 AM
Hi Wim,
Here is the url: https://www.weerstation-assen.nl/pwsWD/index.php (https://www.weerstation-assen.nl/pwsWD/index.php)
It worked all the time, before I did this update from this template yesterday.
Brgds,
Oebel
There were only minor changes to this script for checking if the file exists and has a minimal length a.s.o.

Your file seems not to be in ./demodata/ as that one is from 2018-12, so I can not check the length of your file
The message you have occurs when: the file-location is not set or the file is less then 10 characters length.

Be aware that an URL to the file will not work on some webservers as the returned file-length is then  incorrect.

The demo site display correct data, when it loads the file from the ./demodata/NSRealtime.txt  file
I moved the file to the jsondata/ folder => works OK
And renamed the demodata one to be sure => works OK
When I make a typing error in the file location in easyweather I get your message.

So please check the typing. Otherwise PM me the easyweather password so I can check.


The setting used a full URL  "http://adaddad.xx/nxdata.txt"
That should not be done as the checks for incomplete uploads fail in that case.
Always use relative address "../nxdata.txt"  when the file is in the root.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 20, 2019, 12:12:00 PM
The pop-up was not touched yet, it is not on the list either. Need more time for that one.

No problem! (Reminds me a bit of the old version I am still running that had a fine tune setting for moonrise/set in easyweathersetup, presumably to allow for daylight saving time!)

In the meantime I've temporarily added an hour offset in moon_popup.php so that moon block and moon popup rise/set agree. . . I'll keep an eye on it.

Looking forward to the eclipse tonight. . .

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: windgust on January 20, 2019, 02:26:46 PM
Is there anyway to add snowfall?
Some of use lucky or unlucky peoples get the white stuff.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 20, 2019, 02:29:52 PM
Is there anyway to add snowfall?
Some of use lucky or unlucky peoples get the white stuff.
If WeatherDisplay supports it and it is the clientraw, OK
But otherwise, how would the a script on the webserver know that there is snow at your place?
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: windgust on January 20, 2019, 04:29:41 PM
It is located in clientrawextra.txt

479   Snow Inputed into WD ToDay   Number   12.700
480   Snow Inputed into WD Month   Number   21.590
481   Snow Inputed into WD Season
Snow for the day
Snow for the month
Snow for the season
This may not work if its not in the clientraw.txt
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 20, 2019, 04:56:01 PM
It is located in clientrawextra.txt

479   Snow Inputed into WD ToDay   Number   12.700
480   Snow Inputed into WD Month   Number   21.590
481   Snow Inputed into WD Season
Snow for the day
Snow for the month
Snow for the season
This may not work if its not in the clientraw.txt
697 in clientrawextra also has the snowdeth.
But:
1.  is everybody uploading the other clientrawxx files?
2. do they manually update those fields as snowdepth and snow for the day?
3. what to do with the WDapi users?
Then: 
Where do we put it? In the rain-block i think.
===
Maybe you should move this question with the remarks so far, to the "wish" topic.
Will not be this season, so we have more time to think and find a good place to put the info.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: windgust on January 21, 2019, 03:41:55 AM
Is it possible to add it in the rain box but have an option in the block to show snow?
A drop down box, Radio button etc.

Most people who receive snow will input the reading manually.
To add it for next season is okay with me.
Maybe we need more people to comments, How many people add snow on there page.

Thanks Great template
Windgust
K1DED(Amateur Radio)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 21, 2019, 04:56:38 AM
Is it possible to add it in the rain box but have an option in the block to show snow?
A drop down box, Radio button etc.

Most people who receive snow will input the reading manually.
To add it for next season is okay with me.
Maybe we need more people to comments, How many people add snow on there page.

Thanks Great template
Windgust
K1DED(Amateur Radio)
Sorry, I was not clear. There is a separate topic for “wishes” where we can save these requests. That way they are not lost in this long discussion which is for day-to-day install problems.
Please  move your request to https://www.weather-watch.com/smf/index.php/topic,67497.0.html

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 21, 2019, 03:27:17 PM
. . . but Moon info pop-up rise/set still not right. See moon2 from http://swanston.maui.co.uk/pws/. . .
Time to test, attached a beta version of the pop-up for the April release.
I run the test-site http://wd34.weather-template.com/pwsWD/ (http://wd34.weather-template.com/pwsWD/) with timezone/at/lon  for Edinburgh city center and IMHO I think this pop-up has the correct rise set times compared to this site: https://www.timeanddate.com/moon/uk/edinburgh

Please test it at your site for errors in the calculations  (AFTER you made a copy of the current moon-popup.php).

Thanks in advance, Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 21, 2019, 05:44:12 PM
Time to test, attached a beta version of the pop-up for the April release.

Thanks, Wim.

Quote
I run the test-site with timezone/lat/lon for Edinburgh city center

I am honoured!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: johnmac78 on January 21, 2019, 07:49:54 PM
When updating files will I need to re-do all my settings in the easyweathersetup.php or can I leave the old file in place.

Thanks, John
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 21, 2019, 08:07:35 PM
When updating files will I need to re-do all my settings in the easyweathersetup.php or can I leave the old file in place.

Thanks, John
In general

Succes,
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 21, 2019, 08:16:40 PM
And so is the rain last hour, I think: I'll check that when we get more rain  :)

Sorry to report that "rain last hour" is now shown negative in clientraw version, and has yet to appear in API version. First 0.3 mm registered  by WD at 1945.

http://swanston.maui.co.uk/pws/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 21, 2019, 08:29:53 PM
Sorry to report that "rain last hour" is now shown negative in clientraw version, and has yet to appear in API version. First 0.3 mm registered  by WD at 1945.
http://swanston.maui.co.uk/pws/
IN https://www.weather-watch.com/smf/index.php/topic,67468.msg542252.html#msg542252
I decided on the mails and messages that the calculation would be CR[100] - CR[109]
Probably I misunderstood as your clientraw.txt shows it should be CR[109] - CR[100]
Will be changed tomorrow,Updated w34_livedata.php attached, only for clientraw.txt users needed
Wim

P.S. There is no "rain last hour" in WDapi yet, needs a lot of extra fields to be added.

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 21, 2019, 10:02:24 PM
Updated w34_livedata.php attached, only for clientraw.txt users

Thanks, Wim.

I suppose "rain last hour" lags behind WD because we have to wait for all the fields (100-109) to be refreshed in clientraw?

And I get -2.9 mm rain last hour at midnight reset - see clientrawrain2. (That may be my fault - I just edited my existing w34_livedata.php file to swap CR[100] and CR[109], I didn't upload the new file. . .)

Quote
P.S. There is no "rain last hour" in WDapi yet, needs a lot of extra fields to be added.

There's something like it: see APIrain2. That comes from API[43] "raintotal60".

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on January 21, 2019, 11:06:17 PM
After creating database using w34_util_createdb.php and using phpmyadmin to browse the db I get these errors:

Warning in ./libraries/sql.lib.php#613
 count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2062: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'weatherstation',
string 'weatherstation',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `weatherstation`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'weatherstation',
string 'weatherstation',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `weatherstation`',
NULL,
NULL,
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Torjan on January 22, 2019, 06:09:49 PM
Hi
In temp block trend, it appears 1.0 which should be 0.1

I use clientraw.txt on my site. Take a look here http://regnskvett.com/pwsWD/index.php?lang=en (http://regnskvett.com/pwsWD/index.php?lang=en)


Mvh Torjan
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 22, 2019, 08:04:39 PM
Hi
In temp block trend, it appears 1.0 which should be 0.1
I use clientraw.txt on my site. Take a look here http://regnskvett.com/pwsWD/index.php?lang=en
Mvh Torjan
Thank you, attached a new version of w34_livedata.php  to solve this one.
The used clientraw.txt [143] is  a logic field, it does not contain a value.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 23, 2019, 11:55:17 AM
The moon block is now OK.

Screenshot taken at 1745, before moonrise at 1818, but moon block is showing "tomorrow" moonrise and not "today".

(An hour later, after moonrise, moon block was showing "today's" 1818 correctly!)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 23, 2019, 12:00:55 PM
Time to test, attached a beta version of the [moon] pop-up for the April release.

Screenshot at 0940 (just before moonset) shows today's day/date twice so text overflows box. After moonset it was perfectly OK!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 23, 2019, 12:09:54 PM
Screenshot at 0940 (just before moonset) shows today's day/date twice so text overflows box. After moonset it was perfectly OK!
Thanks for testing. Attached the latest versions of yesterday and today.
When you find a problem, check with http://wd34.weather-template.com/pwsWD/  as I am testing also.
That demo-site runs most of the time for Edinburgh to make it "easier" for us to test both.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 23, 2019, 12:29:19 PM
Thanks for testing. Attached the latest versions of yesterday and today.

Thanks, Wim.

Quote
When you find a problem, check with http://wd34.weather-template.com/pwsWD/  as I am testing also.

I usually run them side-by-side but didn't think to check first  #-o
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Torjan on January 23, 2019, 07:15:54 PM
Thank you, attached a new version of w34_livedata.php  to solve this one.
The used clientraw.txt [143] is  a logic field, it does not contain a value.
Wim

Now it looks good.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: mldenison on January 25, 2019, 04:35:59 PM
Wow!  This is really neat.  It took maybe 20 minutes to download, install and configure.  And works flawlessly.

Kudos to you all.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 25, 2019, 07:47:45 PM
Re moon popup beta: seems a little odd to show "Sun rose at 08:18" but not "Sun set at 16:30". Screenshot after sunset, at 1938.

http://swanston.maui.co.uk/pws/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 25, 2019, 08:07:05 PM
Re moon popup beta: seems a little odd to show "Sun rose at 08:18" but not "Sun set at 16:30". Screenshot after sunset, at 1938.

http://swanston.maui.co.uk/pws/
Yes, one line missing.
Will check tomorrow.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 26, 2019, 10:27:07 AM
Yes, one line missing.
Will check tomorrow.
Wim
Attached new version moon-popup, ready for production  :wink:
Also another sun block with orange hours around the dial, also works correctly  in Edge and IE

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 26, 2019, 10:55:01 AM
Attached new version moon-popup [and] sun block

Thanks, Wim. Looking good. . .  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: mldenison on January 26, 2019, 04:04:35 PM
Which file do I modify to add/change for the 'EXTRAS'?  I'd like to add links to my other web sites.

Thanks
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 26, 2019, 04:09:49 PM
Which file do I modify to add/change for the 'EXTRAS'?  I'd like to add links to my other web sites.
Thanks
w34_frames.php
There are already two examples which do show in your menu.

Could you also check if the sr.png flag did arrive at the correct place.
That flag is missing from the menu. It should have been in the update zip you installed.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: mldenison on January 26, 2019, 06:06:30 PM
sr.png flag is now in the correct place.

The websites may be too big to show in the frame.  I'm playing with the length but it'll need more width.  And the Leuven template shows the Saratoga website for some reason:

Code: [Select]
$frame                  = 'website2';
$frm_ttls[$frame]       = 'M82A1 Leuven site';  // name in menu
$frm_src[$frame]        = 'http://www.m82a1.us/weather28/index.php?p=wsStartPage&lang=en';
$frm_hgth[$frame]       =  2800;         //height

http://www.m82a1.us/pwsWD/index.php (http://www.m82a1.us/pwsWD/index.php)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 26, 2019, 07:02:44 PM
sr.png flag is now in the correct place.
The websites may be too big to show in the frame.  I'm playing with the length but it'll need more width.  And the Leuven template shows the Saratoga website for some reason:
. . . shortened . . .
http://www.m82a1.us/pwsWD/index.php (http://www.m82a1.us/pwsWD/index.php)
It was not designed to put a large big site inside a one page only site. The original idea 4 or 5 years ago was to have a site which fits on an iPad nicely. With all weather-station information on one page.

The menu entries for extra pages are included as sometimes another page is needed for extra information which is not supported in the HWS-template. Example: a soil-sensors page.  Or a specialised forecast.

If you have one or two pages from your other websites, lets say, the start page of Leuven, you should try to fit them. In the Leuven-Template it is done with the option &ipad.  You should change the link to
$frm_src[$frame]        = 'http://www.m82a1.us/weather28/?lang=en&ipad';
or for the forecast
$frm_src[$frame]        = 'http://www.m82a1.us/weather28/?p=noaa_full_page&lang=en&ipad';

It should be eaasy and fun to adapt, but if it will not fit, no solution.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 26, 2019, 08:07:47 PM
Just noticed that all my WU Jan graphs show values to Sunday 26 Jan. . . but it's Saturday 26 Jan today!

http://swanston.maui.co.uk/pws/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: mldenison on January 26, 2019, 08:57:00 PM
Hi Wim,

That ipad switch made all the difference.  Looks great now.  The icons above the NOAA graph are a bit weird though.

I had to remove the Saratoga page.  It just won't fit well.  Then again it wasn't meant to be squeezed up.

Thanks for your help.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 26, 2019, 09:45:33 PM
Just noticed that all my WU Jan graphs show values to Sunday 26 Jan. . . but it's Saturday 26 Jan today!

http://swanston.maui.co.uk/pws/
You have to check your WU data, another glitch of WU/IBM
Last two lines in the file chartswudata/IEDINBUR98Y.txt  are
2019-1-25,9.9,7.7,5.5,9.1,7.8,4.7,97,93,83,1007,1003,21,7,37,0.00
2019-1-26,9.5,8.9,8.4,8.5,7.6,6.2,95,90,84,1003,986,14,5,32,0.08
That data is loaded from WU. Not made by any script.
Maybe your settings at WU are misaligned for the timezone OR for the lat/lon??????
No idea, Wim


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 26, 2019, 10:06:05 PM
You have to check your WU data, another glitch of WU/IBM

I might have known! Thanks, Wim.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on January 26, 2019, 10:15:28 PM
You have to check your WU data, another glitch of WU/IBM
Last two lines in the file chartswudata/IEDINBUR98Y.txt  are
2019-1-25,9.9,7.7,5.5,9.1,7.8,4.7,97,93,83,1007,1003,21,7,37,0.00
2019-1-26,9.5,8.9,8.4,8.5,7.6,6.2,95,90,84,1003,986,14,5,32,0.08
That data is loaded from WU. Not made by any script.
Maybe your settings at WU are misaligned for the timezone OR for the lat/lon??????
No idea, Wim

Maybe I have a misunderstanding of your reply, but is WU really the issue? The file shows that the last WU data is for 2019-1-26 which is Saturday, but on http://swanston.maui.co.uk/pws/ the January Temperature chart shows "Sat 25th" on the legend, and the last data point is "Sun 26th", in other words on the chart the day of the week doesn't match the date.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 26, 2019, 10:18:27 PM
Maybe I have a misunderstanding of your reply, but is WU really the issue?

I was beginning to wonder, too, because my old w34 graphs at /pwsold/ are OK. . . Lat/long OK, too.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 27, 2019, 12:17:55 AM
Updated w34_livedata.php attached, only for clientraw.txt users needed

Wim

P.S. There is no "rain last hour" in WDapi yet, needs a lot of extra fields to be added.

Update: clientraw version did OK with "rain last hour" today, although definitely delayed compared with WD client (driven by clientraw). Still getting the total negated at midnight reset, see clientrawrain3.

API version shows readings that correspond to "rain last hour" but at the wrong time, see APIrain3. I don't know what API[43] is meant to quantify.

P.S. Can we have units for "Yesterday" rain, please?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 27, 2019, 05:13:33 AM
Hi Wim,

I have noticed the wind forecast from Darksky has always been really low, it rarely gets above 10km/h, however I think I have just worked out why.

It seems the Darksky wind forecast gives a range and I think the forecast on my site is just giving the lower range of that forecast.

As an example, for today the wind forecast from Darksky is 13-48km/h and tomorrow it is to be 6-31km/h. However the forecast for those days on my site is 13km/h and 6km/h.

If this is the case, I was just wondering how hard would it be to incorporate the full range into the forecast.

The link to my site is,

https://micklehamweather.com/pwsWD/

The full darksky forecast can be seen here,

http://micklehamweather.com/wxforecast.php

Thanks,
Neil 
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 27, 2019, 08:19:46 AM
Maybe I have a misunderstanding of your reply, but is WU really the issue? The file shows that the last WU data is for 2019-1-26 which is Saturday, but on http://swanston.maui.co.uk/pws/ the January Temperature chart shows "Sat 25th" on the legend, and the last data point is "Sun 26th", in other words on the chart the day of the week doesn't match the date.
@bitsostring @niko
Sorry for the confusing. I was/am running the demo site with the same settings as @bitsostring
The graphs there were correct so I assumed another cause. But the graphs were correct as they used the SQL data.
And it was late when further checking so I thought it was the WU file.
Wrong,  :oops: I did not  set in canvas.js the correct  date format of the WU.CSV  .

Attached new version of the graph script.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 27, 2019, 08:57:53 AM
Update: clientraw version did OK with "rain last hour" today, although definitely delayed compared with WD client (driven by clientraw).
The delay is "time between clientraw uploads = ??" + "time rain block refresh = 50 seconds"
Quote
Still getting the total negated at midnight reset, see clientrawrain3.
That would imply that the oldest field of the 1 hour array would be reset to zero at midnight? As the calculation = oldest -/- latest
Quote
API version shows readings that correspond to "rain last hour" but at the wrong time, see APIrain3.
What is wrong?
Are you running two versions?  One for clientraw and 1 for WDapi?
Quote
I don't know what API[43] is meant to quantify.
According to a doc from 2017: "43 0.0  rain total last 60 minutes"
Quote
P.S. Can we have units for "Yesterday" rain, please?
Attached
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 27, 2019, 09:19:49 AM
Hi Wim,
I have noticed the wind forecast from Darksky has always been really low, it rarely gets above 10km/h,
An "original" Darksky Forecast for your area: https://darksky.net/details/-37.8142,144.9632/2019-1-29/ca12/en
The data which is on your website comes from ". /jsondata/darksky.txt"  which you can check and expand to readable text
https://micklehamweather.com/pwsWD/w34_module_test.php
=> "Check file contents" => drop down" jsondata/darksky.txt" => click "List contents => Data is shown below => click "Expand as json
Quote
however I think I have just worked out why.It seems the Darksky wind forecast gives a range and I think the forecast on my site is just giving the lower range of that forecast. As an example, for today the wind forecast from Darksky is 13-48km/h and tomorrow it is to be 6-31km/h. However the forecast for those days on my site is 13km/h and 6km/h.
Both the "official-site" as the API-json file show only 1 wind value.
The second value in your Saratoga script is the Gust-value
Quote
If this is the case, I was just wondering how hard would it be to incorporate the full range into the forecast.
Normally that would need another field as Gust is "by definition" not Wind
Quote
The link to my site is,https://micklehamweather.com/pwsWD/
The full darksky forecast can be seen here, http://micklehamweather.com/wxforecast.php
Thanks,Neil
I do not think the "low" values are in error.  Maybe also others have an opinion about this, but for now I will put it on the wish-list as "add gust value to forecast".

I attach a test version of the 3 day forecast, as there is room to add the second value.  The 8 day forecast needs changes in the css, that is for later this year.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 27, 2019, 11:25:41 AM
@bitsostring @niko
Sorry for the confusion. . . Attached new version of the graph script.

Many thanks, Wim. (And niko!)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 27, 2019, 11:41:23 AM
The delay is "time between clientraw uploads = ??" + "time rain block refresh = 50 seconds"

I got the impression it was longer than that. I'll keep an eye on it.

Quote
That would imply that the oldest field of the 1 hour array would be reset to zero at midnight? As the calculation = oldest -/- latest

There had been no rain for 4.5 hours, so all fields should have been zero anyway. (Rain last hour had been showing zero, correctly, just before midnight.)

Quote
What is wrong [with API rain last hour]?

As above, there had been no rain for 4.5 hours. And screenshot was taken after midnight reset.

Quote
Are you running two versions?  One for clientraw and 1 for WDapi?

I switch between them, using Menu/Settings, so I can spot any differences.

Quote
According to a doc from 2017: "43 0.0  rain total last 60 minutes"

My doc just says "43 raintotal60". Doesn't seem to be working here.

Quote
[Units] Attached

Many thanks.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on January 27, 2019, 11:53:38 AM
Quote
I do not think the "low" values are in error.  Maybe also others have an opinion about this, but for now I will put it on the wish-list as "add gust value to forecast".

Thanks for the explanation Wim - I was just trying to understand why the wind forecast always seemed to be rather low, and yes others may have an opinion on that.

Quote
I attach a test version of the 3 day forecast, as there is room to add the second value.

I have just updated to the the test version and it works fine.  I will see how this goes over the next few days.

Quote
The 8 day forecast needs changes in the css, that is for later this year.

Thats fine - no real rush for this.

As always....thanks for your efforts.

Neil
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: mldenison on January 29, 2019, 11:42:12 AM
Hi Wim,

I don't think the Weather Alert window is correct.  It shows a warning for the dew point below freezing.  There's a winter snow advisory out for our area.  Is the exclamation point icon supposed to do anything when you click on it?

Thanks,
Mort
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 29, 2019, 12:16:33 PM
Hi Wim,
I don't think the Weather Alert window is correct.  It shows a warning for the dew point below freezing.  There's a winter snow advisory out for our area.  Is the exclamation point icon supposed to do anything when you click on it?
Thanks,Mort
It is on the  "wish-list" at https://www.weather-watch.com/smf/index.php/topic,67497.0.html to include real warnings from NOAA.
The three warning scripts (Europe/USA/Canada) are in Beta testing and will be included in the April release.

The current messages in the alert-box are based on your weather values, so "dew-point is below freezing"  => icy road conditions.
The graphic warning sign "exclamation point icon" does nothing.
All ideas for enhancements please add them to  the "wish-list"
Wim

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: mldenison on January 29, 2019, 12:19:51 PM
Thanks, Wim.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on January 29, 2019, 05:42:27 PM
Where do I get the path for the clientraw.txt from? In the settings screen it asks for path?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 29, 2019, 05:59:28 PM
API[43] definitely not showing rain last 60 minutes, see APIrain4.

Rain today started 0430 and finished 0935, so it hadn't rained for 8 hours when screenshot was taken. And there hasn't been 1.6 mm rain in any one hour today.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 29, 2019, 08:25:30 PM
API[43] definitely not showing rain last 60 minutes, see APIrain4.
Rain today started 0430 and finished 0935, so it hadn't rained for 8 hours when screenshot was taken. And there hasn't been 1.6 mm rain in any one hour today.
So we have to ask Brian  Hamilton what the meaning of that field is . I will dig into the documentation also.

This is the WDapi string as used by Brian.
Code: [Select]
=urlstring+'?d='+timestamp+'+'+tempdata+'+'+humdata+'+'+dewdata+'+'+winddata+'+'+gustdata+'+'+dirdata+'+'+rainratedata+'+'+raindata+'+'+barodata+'+'+dirdata+'+'+bftdata+'+--+'+barodata60+'+'+raindatamonth+'+'+raindatayear+'+'+raindatayesterday+'+'+intempdata+'+'+inhumdata
  +'+'+chilldata+'+'+temp60data+'+'+dailymaxtempstr+'+'+maxtemptimestr+'+'+dailymintempstr+'+'+mintemptimestr+'+'+maxavspeedstr+'+'+maxspeedtimestr+'+'+maxspeedstr+'+'+maxgusttimestr+'+'+maxdailybaro+'+'+dailyhibarostr+'+'+mindailybaro
  +'+'+dailylobarostr+'+'+mainunit.version+'+'+mainunit.version2+'+'+windmax10+'+--+--+'+uvdata+'+--+'+solardata+'+'+avtenwinddir+'+'+raintotal60+'+--+'+daynightflag+'+--+'+avtenwinddir+'+--+--+'+daylength+'+--+--+'+maxuvstr+'+'+maxdhum+'+'+maxdhumtime+'+'+mindhum+'+'+mindhumtime
  +'+'+maxdaydew+'+'+maxddewtime+'+'+mindaydew+'+'+minddewtime+'+'+temp15data+'+'+hum15data+'+'+dew15data+'+'+indoortemp15data+'+'+indoorhum15data+'+'+extratemp1+'+'+extratemp2+'+'+extratemp3+'+'+extrahum1+'+'+extrahum2+'+'+extrahum3;
When one puts 1 field at a row
Code: [Select]
'+timestamp+'
+'+tempdata+'
+'+humdata+'
+'+dewdata+'
+'+winddata+'
+'+gustdata+'
+'+dirdata+'
+'+rainratedata+'
+'+raindata+'
+'+barodata+'
+'+dirdata+'
+'+bftdata+'
+--
+'+barodata60+'
+'+raindatamonth+'
+'+raindatayear+'
+'+raindatayesterday+'
+'+intempdata+'
+'+inhumdata+'
+'+chilldata+'
+'+temp60data+'
+'+dailymaxtempstr+'
+'+maxtemptimestr+'
+'+dailymintempstr+'
+'+mintemptimestr+'
+'+maxavspeedstr+'
+'+maxspeedtimestr+'
+'+maxspeedstr+'
+'+maxgusttimestr+'
+'+maxdailybaro+'
+'+dailyhibarostr+'
+'+mindailybaro+'
+'+dailylobarostr+'
+'+mainunit.version+'
+'+mainunit.version2+'
+'+windmax10+'
+--
+--
+'+uvdata+'
+--
+'+solardata+'
+'+avtenwinddir+'
+'+raintotal60+'
+--
+'+daynightflag+'
+--
+'+avtenwinddir+'
+--
+--
+'+daylength+'
+--
+--
+'+maxuvstr+'
+'+maxdhum+'
+'+maxdhumtime+'
+'+mindhum+'
+'+mindhumtime+'
+'+maxdaydew+'
+'+maxddewtime+'
+'+mindaydew+'
+'+minddewtime+'
+'+temp15data+'
+'+hum15data+'
+'+dew15data+'
+'+indoortemp15data+'
+'+indoorhum15data+'
+'+extratemp1+'
+'+extratemp2+'
+'+extratemp3+'
+'+extrahum1+'
+'+extrahum2+'
+'+extrahum3;

First field has a space in it, so it counts as field[ 0 ] and [ 1 ]  Field [ 43 ] has the label +raintotal60+
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on January 29, 2019, 09:33:31 PM
raintotal60 is the rain total 1 hour ago

I was provided with only what the custom tags names were from what meteohub was putting out and so it was not easy to try and figure out what everything should or should not have been
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 31, 2019, 07:09:34 PM
I had been experimenting with increased text size in Chrome browser settings and realised that it seems to affect the data-box outline size (not text size) in metar and earthquake pop-up windows too.

The metar attachment shows the result: metar2 is at default text size.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on January 31, 2019, 09:51:58 PM
I had been experimenting with increased text size in Chrome browser settings and realised that it seems to affect the data-box outline size (not text size) in metar and earthquake pop-up windows too.

The metar attachment shows the result: metar2 is at default text size.
All boxes and locations are using pixel addressing. When you increase the text-size the text will not fit as the box will not grow.
Use the Chrome built in resize where you can enlarge the whole window, not only the text.
I have no English Chrome available now, it is in my dutch version the fourth menu entry where you can enlarge the total window, not only the text-size.

Attached image, left chrome in large size, right FF in normal size.
With both sizes the text fits.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 31, 2019, 10:03:43 PM
Thanks, Wim, zoom function works well.

When you increase the text-size the text will not fit as the box will not grow.

Trouble is, when one reaches a certain age one thinks that enlarging the text might be the generic answer to one's viewing problems  :wink:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: hcorrin on January 31, 2019, 10:38:12 PM
Have you found the windows magnifier it my help
https://support.microsoft.com/en-us/help/11542/windows-use-magnifier (https://support.microsoft.com/en-us/help/11542/windows-use-magnifier)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on January 31, 2019, 11:45:29 PM
Have you found the windows magnifier it may help

Wow! I don't quite need that much, thanks!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on February 02, 2019, 03:44:17 AM
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?
Title: Weather forecast issue with weather34 for WeatherDisplay
Post by: GW400 on February 02, 2019, 06:29:48 AM
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.
Title: Re: Weather forecast issue with weather34 for WeatherDisplay
Post by: wvdkuil on February 02, 2019, 07:23:14 AM
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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 02, 2019, 07:38:34 AM
Sorry, I forgot to add url!
Try this one:
new-weather.meisal.com:82
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 02, 2019, 07:51:55 AM
Sorry, I forgot to add url!
Try this one:
new-weather.meisal.com:82
There is one script to load all external data:
Code: [Select]
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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 02, 2019, 08:15:08 AM
Thank you Win.
info.php added
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 02, 2019, 08:18:37 AM
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?
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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil 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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 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?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil 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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 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!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra 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.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil 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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra 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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil 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

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan 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.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko 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.         
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan 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.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil 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
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan 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.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra 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

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra 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

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 02, 2019, 08:03:59 PM
I would expect that the last hour would be the previous 59 minutes from the current time. . .  My vote is if the value is going to be shown then it should be correct, otherwise remove it.

I agree, too. As niko says, it's unreasonable to expect a value from the data available in clientraw or api.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 02, 2019, 08:46:18 PM
Any reason I can't bring up pop ups on phone?

Sent from my Pixel 2 using Tapatalk
Yes, they are to wide. So the CSS suppresses the pop-up's
All blocks are only displayed one below each other, fitting inside the width of the phone.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 03, 2019, 08:22:33 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
I would like to store all data in my local MySQL database to be able to access historical data.
What would be the recommended solution to this?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 03, 2019, 08:32:52 PM
I would like to store all data in my local MySQL database to be able to access historical data.
What would be the recommended solution to this?
That question you should ask in another topic or even another forum.
With a question like: "How to store all data from WeatherDisplay in a SQL database"

Probably the answer is to be found on the  MeteoTemplate website: http://www.meteotemplate.com/web/index.php
That template already uses another API from WD to upload all data and stores is in an SQL database.

Success, Wim



Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 03, 2019, 08:42:29 PM
Thank you Wim,
I'm already aware of this, but what I'm concerned about is the possibility for a user to see historical data in Weather34 for WD.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 04, 2019, 01:26:24 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

Wim,

Still having issues with the popups. The csv files are getting populated, but the cron job does not appear to be erasing the data from the day before. https://www.weather911.net/pwsWD/
Also, getting spikes of data at 00:00 every day. Thanks.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 04, 2019, 01:56:34 PM
Wim,
Still having issues with the popups. The csv files are getting populated, but the cron job does not appear to be erasing the data from the day before. https://www.weather911.net/pwsWD/
Also, getting spikes of data at 00:00 every day. Thanks.
Only the daily csv files seems to be populated, others are empty, do not even exist yet: no 2019.csv or 2019_02.csv

I ran the add-to-year  in the browser including error reporting:
 .../pwsWD/_test.php?test=w34_cron_addtoyear.php
Code: [Select]
Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES)
 in /home4/jzinckgr/public_html/pwsWD/w34_cron_addtoyear.php on line 42
same for the clean script
Code: [Select]
Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES)
in /home4/jzinckgr/public_html/pwsWD/w34_cron_empty.php on line 37

It seems that your easyweather settings are not correct.   At least the midnight cron-jobs are not allowed to access your database.

The big question: are you sure that some script is adding data to your SQL table?

I think no script is doing that. Only two scripts can add data to the sql table. 

WDapi  which can run at set interval =>  it behaves like a cron-job also.  Or the station-cron

The station-cron displays a message that it does not have to do that.
Your settings seems to be that the WDapi will do that. 

But you are using clientraw.txt for your data,  not WDapi as is shown in the footer of your page: Data Source: Clientraw C10.37S90

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 04, 2019, 02:24:07 PM
Only the daily csv files seems to be populated, others are empty, do not even exist yet: no 2019.csv or 2019_02.csv

I ran the add-to-year  in the browser including error reporting:
 .../pwsWD/_test.php?test=w34_cron_addtoyear.php
Code: [Select]
Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES)
 in /home4/jzinckgr/public_html/pwsWD/w34_cron_addtoyear.php on line 42
same for the clean script
Code: [Select]
Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES)
in /home4/jzinckgr/public_html/pwsWD/w34_cron_empty.php on line 37

It seems that your easyweather settings are not correct.   At least the midnight cron-jobs are not allowed to access your database.

The big question: are you sure that some script is adding data to your SQL table?

I think no script is doing that. Only two scripts can add data to the sql table. 

WDapi  which can run at set interval =>  it behaves like a cron-job also.  Or the station-cron

The station-cron displays a message that it does not have to do that.
Your settings seems to be that the WDapi will do that. 

But you are using clientraw.txt for your data,  not WDapi as is shown in the footer of your page: Data Source: Clientraw C10.37S90

Wim
In easy weather, I have wdapi listed to upload the data. Is this correct? What about which option to use for "live data"? Clientraw or WD API?

Sent from my Pixel 2 using Tapatalk
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 04, 2019, 02:46:19 PM
In easy weather, I have wdapi listed to upload the data. Is this correct?
NO.  How does it work:
WeatherDisplay is uploading all kind of data to your website.
For use in the HWS-template you  can chose between  clientraw.txt and WDapi
=> You have selected clientraw.txt as is shown in the footer of your website page.

For the graphs you can select two sets of data which are not uploaded  by WeatherDisplay
1. If your WD is also uploading to WU  => you can use WU to grab the data from for the graphs
2. If you are a WU-member you have to do it yourself.

To generate the data yourself,  you need a script which runs at a set interval.
a. You are NOT using the WDapi so it is not possible  to use that one as WD will never start it
b. You use clientraw.txt so you have to use the station-cron-script.

Summary: You use clientraw for your data => WDapi is not possible => only station-cron is the one to use.

Wim

P.S. Probably station-cron will fail to load the sql-table as the other scripts accessing the database fail also.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 04, 2019, 09:22:29 PM
NO.  How does it work:
WeatherDisplay is uploading all kind of data to your website.
For use in the HWS-template you  can chose between  clientraw.txt and WDapi
=> You have selected clientraw.txt as is shown in the footer of your website page.

For the graphs you can select two sets of data which are not uploaded  by WeatherDisplay
1. If your WD is also uploading to WU  => you can use WU to grab the data from for the graphs
2. If you are a WU-member you have to do it yourself.

To generate the data yourself,  you need a script which runs at a set interval.
a. You are NOT using the WDapi so it is not possible  to use that one as WD will never start it
b. You use clientraw.txt so you have to use the station-cron-script.

Summary: You use clientraw for your data => WDapi is not possible => only station-cron is the one to use.

Wim

P.S. Probably station-cron will fail to load the sql-table as the other scripts accessing the database fail also.
After looking into this further, it appears my IP address is being blocked by spamhaus and is on the PBL list. Although this doens't make sense since I can upload WD data to my server without problem. It's just the mysql that is having issue.

Also, I can't even get data tables to work with WU and I am using my station ID
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 05, 2019, 07:58:49 AM
. . . shortened . .
Also, I can't even get data tables to work with WU and I am using my station ID
You have to change your easyweathersettings from using SQL to using WU Then I can check what the problem is.
BUT:   https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KMERAYM03&graphspan=day&year=&format=1
Returns no data, only the header line.  You have a typo in your settings. 
You typed KMERAYM03   but your WU station is  KMERAYMO3   That will solve  the WU-graphs

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 05, 2019, 12:18:08 PM
Quote
The Demo site now reflects a Canadian user.  I try to test the new EC alert- and forecast-scripts.

Alert not very legible in Dark Theme, but OK in Light.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 05, 2019, 12:31:03 PM
Alert not very legible in Dark Theme, but OK in Light.
Thanks.
@ALL  Testing is for me a two stage process.
First I use the light theme and try to get all PHP (script itself, unit conversion) and in-line css (scrolling a.s.o.) correct.
After that I look at how it works in different environments, on an Ipad, with the dark theme a.s.o.
So please post all the remarks but it can take some time before it is changed on the demo site.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 05, 2019, 01:39:40 PM
You have to change your easyweathersettings from using SQL to using WU Then I can check what the problem is.
BUT:   https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KMERAYM03&graphspan=day&year=&format=1
Returns no data, only the header line.  You have a typo in your settings. 
You typed KMERAYM03   but your WU station is  KMERAYMO3   That will solve  the WU-graphs

Wim
Thanks for catching the station ID typo. Graphs working now, at least using WU. After Feb 15, who knows. Will have to get back to the sql table approach.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: saratogaWX on February 05, 2019, 04:01:43 PM
The WU graphs *should* continue to work after Feb 15th since they use the CSV download from the PWS page on WU, not the WU API.

They have said
Quote
We'd like to remind our PWS owners/contributors:
 

    Your past data will always be available to you for viewing and download in a web browser on wunderground.com, just as it always has.
    If you are in the small minority of people who use the WU API and a corresponding WU API key to obtain data in .json format, here's what's happening:

    We'll open a registration page for you to get a new API key to get your data in .json format
    You'll sign up and get a new API key for the new API
    Once the registration page is open, we'll keep the old API and your old API key active for 2 weeks to allow transition time to your new key

 
 
We'll announce in the forum when the registration page opens.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 05, 2019, 04:19:12 PM
The WU graphs *should* continue to work after Feb 15th since they use the CSV download from the PWS page on WU, not the WU API.
They have said
Quote
Your past data will always be available to you for viewing and download in a web browser on wunderground.com, just as it always has.
I tested, and when not logged-in with your account/password the download button does not appear and the adds show.

Can be a glitch, but I wait and see if they continue to allow access from a webserver.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 05, 2019, 04:38:18 PM
The WU graphs *should* continue to work after Feb 15th since they use the CSV download from the PWS page on WU, not the WU API.

They have said
I'm confused. I've been a Wu contributor for years and only have a station Id. Will I be grandfathered under the new rules? They say you'll have access to historical data, but then say data will only be stored for the last 7 days. How does new data get historized if it's deleted after 7 days?

Sent from my Pixel 2 using Tapatalk

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: saratogaWX on February 05, 2019, 04:51:32 PM
I tested, and when not logged-in with your account/password the download button does not appear and the adds show.

Can be a glitch, but I wait and see if they continue to allow access from a webserver.
Wim

Even if the download button is greyed out, the link in the script still works without login or cookies to get the CSV file with the data.

I'm confused. I've been a Wu contributor for years and only have a station Id. Will I be grandfathered under the new rules? They say you'll have access to historical data, but then say data will only be stored for the last 7 days. How does new data get historized if it's deleted after 7 days?

Sent from my Pixel 2 using Tapatalk

It's been a unholy mess for WU as the IBM team attempts to dismantle the old WeatherUnderground API and substitute a newer weather.com API.  A public relations AND a poorly planned/announced/developed conversion for the API.

The only scripts using the current WU API are for forecasts (WU-forecast.php and cousins).  The graphing scripts rely on the CSV download from weatherunderground.com and (according to them) that is not changing in the future.   IF someone was using the WU API for data (not forecasts), then those scripts will have to be changed, but AFAIK, the common scripts from Wim and I do not use the WU API for PWS data -- only the WU website CSV downloads.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 05, 2019, 05:20:19 PM
Even if the download button is greyed out, the link in the script still works without login or cookies to get the CSV file with the data.

It's been a unholy mess for WU as the IBM team attempts to dismantle the old WeatherUnderground API and substitute a newer weather.com API.  A public relations AND a poorly planned/announced/developed conversion for the API.

The only scripts using the current WU API are for forecasts (WU-forecast.php and cousins).  The graphing scripts rely on the CSV download from weatherunderground.com and (according to them) that is not changing in the future.   IF someone was using the WU API for data (not forecasts), then those scripts will have to be changed, but AFAIK, the common scripts from Wim and I do not use the WU API for PWS data -- only the WU website CSV downloads.

Thanks Ken. Interestingly, as soon as I started using the WU for my graphs, they stopped working after ~3hrs.
http://weather911.net/pwsWD/index.php
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 05, 2019, 06:09:18 PM
It's been a unholy mess for WU as the IBM team attempts to dismantle the old WeatherUnderground API and substitute a newer weather.com API.  A public relations AND a poorly planned/announced/developed conversion for the API.

Had a look at their forum (https://apicommunity.wunderground.com/weatherapi/topics/weather-underground-api-update) and I'm still confused.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: saratogaWX on February 05, 2019, 06:50:25 PM
Somewhat off topic:

Their 'forum' is a mess also -- a combination of a bad announcement, multiple rant-filled replies and calm responses by victoria from IBM and some shifting (over time) guidance about what will happen and especially WHEN.   Originally, the announcement about the shutdown of the current WU API was done in mid-2018 for cutoff on Dec 31, 2018.  It was revised to be 15-Feb-2019 as the 'current' date, but I strongly suspect that will also be moved as they are WAY BEHIND in offering the new API keys for the NEW API to anyone. 

What is currently known:
1) the wunderground.com website showing PWS historical data is NOT CHANGING (at this time) and is NOT EFFECTED by the WU API deprecation.
2) the new API might be used for forecasts in the future, but is not currently used for anything else by my scripts. 

My direct email questions to Victoria have been promptly and satisfactorily answered. 
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 05, 2019, 10:15:04 PM
Somewhat off topic:. . . Their 'forum' is a mess also

And yet that is how they say they will inform us of what happens next. I am not talking about "multiple rant-filled replies", the link I posted is their latest statement.

Quote
My direct email questions to Victoria have been promptly and satisfactorily answered.

So have mine. See https://www.weather-watch.com/smf/index.php/topic,67656.msg543354.html#msg543354


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 08, 2019, 08:18:10 PM
I have noticed the wind forecast from Darksky has always been really low, it rarely gets above 10km/h, however I think I have just worked out why.

Opposite problem here in Edinburgh! DarkSky forecasts very high. . .

We do have a Met Office warning for high winds but here that means forecast gusts of 47 mph tonight/tomorrow morning. . . not 111/118 mph.

WU forecast (old version of w34, change /pws to /pwsold in home URL) added below.


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Cheffy on February 09, 2019, 03:23:19 AM
Quote
Opposite problem here in Edinburgh! DarkSky forecasts very high. . .

Since I have been using the DarkSky forecasts I have noticed (in my area at least) the wind and to a lesser degree the rain forecasts have been somewhat unreliable.

I must say, I do prefer the WU forecasts, but understand the issues using this going forward.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on February 09, 2019, 03:35:51 AM
Opposite problem here in Edinburgh! DarkSky forecasts very high. . .

We do have a Met Office warning for high winds but here that means forecast gusts of 47 mph tonight/tomorrow morning. . . not 111/118 mph.

Maybe there's a problem with the script? I don't see that kind of windspeed when I access the darksky website forecast for Edinburgh UK https://darksky.net/details/55.9807,-3.2968/2019-2-9/us12/en  https://darksky.net/details/55.9807,-3.2968/2019-2-10/us12/en

As of now (3:34 AM GMT) I see Saturday wind forecast between 20 - 30 mph, and Sunday 10 - 20 mph

 

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 09, 2019, 08:59:23 AM
Maybe there's a problem with the script? I don't see that kind of windspeed when I access the darksky website forecast for Edinburgh UK https://darksky.net/details/55.9807,-3.2968/2019-2-9/us12/en  https://darksky.net/details/55.9807,-3.2968/2019-2-10/us12/en

As of now (3:34 AM GMT) I see Saturday wind forecast between 20 - 30 mph, and Sunday 10 - 20 mph
:oops:  To be sure that I do not use incorrect units, I check the used units in the data from  DarkSky.
But there I mistyped the settings for the UnitedKingdom  and used "uk" which should have been  "uk2" 

So the scripts knew "for sure" that the data was in km/h.  And a conversion from km/h => mph is done on the wind-data which is already in mph.
For the private version of @bitsostring / Edinburgh (he made modifications to enhance the script) change line 359 from
Code: [Select]
        if ($darksky_used_unit == 'uk') to
Code: [Select]
        if ($darksky_used_unit == 'uk2') For other UK users it is line 352

Wim

P.S. I did not find the reason for to-low wind-speeds (yet). 
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 09, 2019, 11:29:30 AM
For the private version of @bitsostring / Edinburgh change line 359

That's better! Many thanks, Wim. (And niko!)

Quote
For other UK users it is line 352 . . .

. . . of w34_livedata.php  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 09, 2019, 05:02:45 PM
Wim, thank you for all the great work you are doing!
Any chance of getting support for weather data from met.no?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 09, 2019, 05:10:51 PM
Wim, thank you for all the great work you are doing!
Any chance of getting support for weather data from met.no?
is included on the TODO list as it is also worldwide available. But it has no text forecasts. 
Which WU, EC, WXSIM  and DarkSky have.
I hope it is clear soon how we can continue to use WU. After that I will include met.no and an Australian one.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 09, 2019, 06:49:15 PM
is included on the TODO list as it is also worldwide available. But it has no text forecasts. 
Which WU, EC, WXSIM  and DarkSky have.
I hope it is clear soon how we can continue to use WU. After that I will include met.no and an Australian one.
Wim
Very good!
Looking forward to it.
I also noticed that MET have discontinued parts of their text forecasts due to little traffic.
https://api.met.no/weatherapi/blog/2018-12-21 (https://api.met.no/weatherapi/blog/2018-12-21)
However this API will still be available :
https://api.met.no/weatherapi/textforecast/1.6/documentation (https://api.met.no/weatherapi/textforecast/1.6/documentation)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 05:43:16 PM
Hi Wim,
Thanks a lot for the Weather Display version of the HWS Template. I don’t use it with Weather Display but with Meteohub and it works very well and I really like it. One minor issue I have noticed so far, my country flag isn‘t displayed in the footer, but only an empty box is shown there. How can I fix it?
Here‘s the link to my Testing-Page.

https://jensilein65.bplaced.net/pwsWD/

Best regards, Jens
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 10, 2019, 05:48:57 PM
Hi Wim,
Thanks a lot for the Weather Display version of the HWS Template. I don’t use it with Weather Display but with Meteohub and it works very well and I really like it. One minor issue I have noticed so far, my country flag isn‘t displayed in the footer, but only an empty box is shown there. How can I fix it?
Here‘s the link to my Testing-Page.
https://jensilein65.bplaced.net/pwsWD/
Best regards, Jens
The fastest way to solve this problem is to copy the  ../img/flags/dl.svg  and give the copy the correct name .. /img/flags/de.svg

IMPORTANT:  Visit: http://wd34.weather-template.com/
And install the updates , just 2 lines below the full download "Updated scripts up to 2019-01-19 plus 4 additional languages."

Success, Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 05:54:39 PM
Perfect, now the flag is shown correctly  :D
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 05:58:28 PM
Wim, another short question. In the temperature block (using German language setting) there is shown the term „Feuchtkugel“. What does that mean?

Jens
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 10, 2019, 06:16:03 PM
In the temperature block (using German language setting) there is shown the term „Feuchtkugel“. What does that mean?

That position in the temperature block is showing "Wet-bulb temperature", if that helps.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 06:16:50 PM
OK, got it. Can you plz help me with another issue. In the block Sun Moon & Space the text block within the circle is not centered and exceeds the circle respectively, at least with German language setting. Where can I fix that? I would assume in the sun_block.php, but where exactly and how?

Jens
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 10, 2019, 06:49:47 PM
Where can I fix that? I would assume in the sun_block.php, but where exactly and how?

Probably in the language file, but Wim can answer your question definitively. I am just another user  :)

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 08:36:54 PM
Hi Wim,
can you please help me with following two issues. In the block Sun Moon & Space the text block within the circle is not centered and exceeds the circle, at least with German language setting ("Bis zum Sonnenuntergang"). Where can I fix that? The second thing is regarding the monthly and yearly temperature charts. The two graphs that are shown there are named with "High" and "Niedrige Solar Radiation". The term "Niedrige Solar Radiation" doesn't fit here, maybe it has to be "Minimum Temperatur" and "High" should better be named as "Maximum Temperatur". Where can I fix it?

Jens
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on February 10, 2019, 08:56:08 PM
The translations are in languages\lang_de.txt
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 09:12:19 PM
I didn‘t find these terms in there...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 10, 2019, 09:23:39 PM
I didn‘t find these terms in there...

Try these, from lang_de.txt:

|Till Sunrise|Bis zum Sonnenaufgang|
|Till Sunset|Bis zum Sonnenuntergang|

Maybe you can abbreviate the German to fit?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 09:42:07 PM
Thanks, I will try it. Do you also have an idea where to find the terms that are used in the temperature charts?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 10, 2019, 09:51:58 PM
Do you also have an idea where to find the terms that are used in the temperature charts?

No, sorry. Actually, yes:

|Low|Niedrige Solar<br><color>Radiation</color>|

appears in lang_de.txt as well, but I advise you to wait for Wim to reply before you tackle this one, it's not in the right place!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on February 10, 2019, 10:05:21 PM
Thanks, I will try it. Do you also have an idea where to find the terms that are used in the temperature charts?

If you are looking for "Niedrige Solar Radiation" then it's also in lang_de.txt.     

|Low|Niedrige Solar<br><color>Radiation</color>|

I don't understand why you aren't seeing these translations in your file  :?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 10, 2019, 10:19:40 PM
Yes, now I found it. Thanks for the hint. Obviously I didn't read the lang_de.txt file carefully enough before. 8O
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 11, 2019, 07:54:47 AM
Hi Wim,
can you please help me with following two issues. In the block Sun Moon & Space the text block within the circle is not centered and exceeds the circle, at least with German language setting ("Bis zum Sonnenuntergang"). Where can I fix that? The second thing is regarding the monthly and yearly temperature charts. The two graphs that are shown there are named with "High" and "Niedrige Solar Radiation". The term "Niedrige Solar Radiation" doesn't fit here, maybe it has to be "Minimum Temperatur" and "High" should better be named as "Maximum Temperatur". Where can I fix it?
Jens
It is all in the design.  All texts fits perfect when using English, that is why a lot of users only use that language.
The "not fit right" problem occurs as all texts are positioned absolute. The text start (or end) at a fixed pixel in the block. 
When the translated text becomes larger it will expand to the right and can overflow at the right into other objects.
So you have to make the translation-text shorter. As I do not speak or write 6 of the 8 supported languages I do not know what would be an acceptable shortened translation for " till sunrise".
You have to find them yourself an put them in the translation file by replacing the "to long" text.

===
The high-low problem seems to be a wrong translation of the word 'Low'
I will check into that later today when i am back home.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 11, 2019, 09:43:12 AM
The high-low problem seems to be a wrong translation of the word 'Low'
I will check into that later today when i am back home.

It looked similar to the problem I reported in Reply #138 above (https://www.weather-watch.com/smf/index.php/topic,67468.msg542057.html#msg542057).
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 11, 2019, 06:37:07 PM
Hi Wim,
Thank you for the hint. I will try to shorten the „too long text“. Nevertheless, would there also be the possibility for me to modify the „starting pixel“ in the block in order to seek for a proper orientation that better fits to my needs with the German language setting?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 11, 2019, 07:34:06 PM
to modify the „starting pixel“ in the block

There is a more recent version of sun_block.php here (https://www.weather-watch.com/smf/index.php/topic,67468.msg542822.html#msg542822), with orange numerals around the dial, if you wanted to download that first.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 11, 2019, 08:06:34 PM
Hi bitsostring,
Thanks for that hint, but I think I already have that version.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 11, 2019, 08:13:26 PM
In my monthly temp popup, the "Low" text isn't written correctly. Which script is this and can I fix this?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: zitterbacke on February 11, 2019, 08:16:29 PM
You can modify it in the language file.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 11, 2019, 08:18:09 PM
In my monthly temp popup, the "Low" text isn't written correctly. Which script is this and can I fix this?
check here: https://www.weather-watch.com/smf/index.php/topic,67468.msg542057.html#msg542057
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on February 11, 2019, 09:52:39 PM
check here: https://www.weather-watch.com/smf/index.php/topic,67468.msg542057.html#msg542057
Wim
Thanks Wim. One other questions. I am getting way more bandwidth than I used to now that I am using W34 template. In WD, I have upload frequency set to every 5 min and station cron every 10min. I don't get that many visitors to my website, so wasn't sure I should be expecting this much bandwidth
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 12, 2019, 08:31:51 AM
Thanks Wim. One other questions. I am getting way more bandwidth than I used to now that I am using W34 template. In WD, I have upload frequency set to every 5 min and station cron every 10min. I don't get that many visitors to my website, so wasn't sure I should be expecting this much bandwidth
IMHO an outsider like me can not know if it is high or low.   And neither what is causing the "way more" bandwidth.
Be aware that when posting questions on a forum, people  tend to take a look as that is the only way to  help. These questions are not private 1-1 conversations but public "cries" for help.
First: Were you already running a previous version of weather34?
To at least check what is going on, I need to have the URL's to both your previous weather34 and the current HWS-template as it is called now.
Second: If this is your first "dynamic" website:
All versions of this template are continuously refreshing the data at the browsers of the visitor. Some parts every so many seconds, others every so many minutes. Those are not large chunks of data, but  it adds up when using  24/7 an iPad as a console.
Also the scripts refresh "too old" forecasts, metars, and other data files  like earthquakes. Normally that will be done when the cron-job runs. But these files can be larger. You have to inspect the .../pwsWD/jsondata/ folder for files reloaded today. And check how old they are.
All files have a different validity time, a forecast once every hour, a current condition file every run of the cron-job.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bertsp on February 12, 2019, 07:55:34 PM
Wim,
Tried your latest Beta that includes wxsim.
I have noticed a couple of small problems.
1) the Wx Alerts seem to work (NOAA) but I cannot seem to close the detail page. I guess its missing a "close" box.
2) In the wxsim detail page, the precipitation amount in Imperial (US) is not picking up leading decimal. (ie  shows 5in instead of 0.5in; 75in instead of 0.75in)
3) In the same detail page (or maybe the main also?) there are no UV icons.

I had been using the last Beta from Brian with wxsim since the beginning and this is a welcome update. Thanks
s-p.me/wxsim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 12, 2019, 08:06:23 PM
Wim,
Tried your latest Beta that includes wxsim.
I have noticed a couple of small problems.
1) the Wx Alerts seem to work (NOAA) but I cannot seem to close the detail page. I guess its missing a "close" box.
One has to click on the home button for that.
Quote
2) In the wxsim detail page, the precipitation amount in Imperial (US) is not picking up leading decimal. (ie  shows 5in instead of 0.5in; 75in instead of 0.75in)
Can not check here (no rain this full week) and no URL to your test-site
Quote
3) In the same detail page (or maybe the main also?) there are no UV icons.
Already solved at: http://release230/pwsTEST/index.php  Problem is that the icons are 00 - 013  and not 0 - 13? Is adapted in the scripts
Quote
I had been using the last Beta from Brian with wxsim since the beginning and this is a welcome update. Thanks
s-p.me/wxsim
As most script writers  I am not clairvoyant.  If you want to help with the beta release, please always supply an URL to the website.

Also check, if possible,  if the problem is already solved at http://wd34.weather-template.com/pwsTEST/

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bertsp on February 13, 2019, 01:15:36 AM
Wim,
Thank you for your response. the site is: s-p.me/wxsim (shown on my post)
Another small item is the wunit (wind speed unit) in the detailed wxsim is not following the setting (Imperial) while it is in the main wxsim page.
You can see an example of the rain forecast decimal issue on the wxsim also (yes we do have some little rain).
The beta that I am using was downloaded on the 10 of this month.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 13, 2019, 11:27:07 AM
Wim,
Thank you for your response. the site is: s-p.me/wxsim (shown on my post)
Another small item is the wunit (wind speed unit) in the detailed wxsim is not following the setting (Imperial) while it is in the main wxsim page.
You can see an example of the rain forecast decimal issue on the wxsim also (yes we do have some little rain).
The beta that I am using was downloaded on the 10 of this month.
Can you please unzip and replace attached script?
After a fresh upload of plaintext.txt it should show the UV ICON,  the decimal-point in the rain values and the windunit.
All units are the ones from  the plaintext file.  The WXSIM units are not recalculated when switching from imperial to ISO units or vice-versa.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 13, 2019, 02:20:13 PM
I notice that the Menu in all versions still says "SELECT LANGAUGE" instead of "SELECT LANGUAGE".

I couldn't work out how to correct this in the language file, as you suggested in #78 above (https://www.weather-watch.com/smf/index.php/topic,67468.msg541877.html#msg541877), I just edited line 137 of w34_menu.php
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 13, 2019, 02:34:24 PM
I notice that the Menu in all versions still says "SELECT LANGAUGE" instead of "SELECT LANGUAGE".

I couldn't work out how to correct this in the language file, as you suggested in #78 above (http://wd34.weather-template.com/pwsTEST/index.php), I just edited line 137 of w34_menu.php
As most English language words/word-groups  do not have to be translated there is no new translation-file for en.
The old structure is used in . . /languages/lang.en.php
You should remove the typo by adding this to the end of the file:
Code: [Select]
$lang['Select langauge'] = 'Select language';In all other language files  (f.i. Dutch) it is
Code: [Select]
|Select langauge|Selecteer een taal|On the left always the words from the scripts, on the right the translation.

Typing errors for the English words should be handled by the language files.
If you changes  texts  in the scripts as you did, the language files for the other languages will not find the correctly spelled words.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 13, 2019, 02:59:46 PM
You should remove the typo by adding this to the end of the file:
Code: [Select]
$lang['Select langauge'] = 'Select language';

Thanks, Wim. I obviously didn't read your earlier instructions properly. . . all OK now.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bertsp on February 13, 2019, 04:01:17 PM
Can you please unzip and replace attached script?
After a fresh upload of plaintext.txt it should show the UV ICON,  the decimal-point in the rain values and the windunit.
All units are the ones from  the plaintext file.  The WXSIM units are not recalculated when switching from imperial to ISO units or vice-versa.
Wim

Wim,
Thanks, that did it. Great work.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: TSL on February 14, 2019, 02:01:04 AM
Hi Wim,

Just installed your BETA test code that includes Cumulus support.

You can see my site here... http://weather.skybase.net/pwsTEST/index.php

Everything is working except for METAR retrieval. Clicking on Current conditions -> "Nearby" produces the errors below ...

Code: [Select]
Warning: Illegal string offset 'observed' in /var/www/html/pwsTEST/metar_load_funct.php on line 50

Warning: Illegal string offset 'raw_text' in /var/www/html/pwsTEST/metar_load_funct.php on line 51

Warning: Illegal string offset 'icao' in /var/www/html/pwsTEST/metar_load_funct.php on line 52

Warning: Illegal string offset 'name' in /var/www/html/pwsTEST/metar_load_funct.php on line 53

Warning: Illegal string offset 'barometer' in /var/www/html/pwsTEST/metar_load_funct.php on line 54

Warning: Illegal string offset 'hg' in /var/www/html/pwsTEST/metar_load_funct.php on line 54

Warning: Illegal string offset 'barometer' in /var/www/html/pwsTEST/metar_load_funct.php on line 55

Warning: Illegal string offset 'mb' in /var/www/html/pwsTEST/metar_load_funct.php on line 55

Warning: array_key_exists() expects parameter 2 to be array, string given in /var/www/html/pwsTEST/metar_load_funct.php on line 78

Warning: Illegal string offset 'clouds' in /var/www/html/pwsTEST/metar_load_funct.php on line 88

Warning: Illegal string offset 'code' in /var/www/html/pwsTEST/metar_load_funct.php on line 88

Warning: Illegal string offset 'clouds' in /var/www/html/pwsTEST/metar_load_funct.php on line 89

Warning: Illegal string offset 'text' in /var/www/html/pwsTEST/metar_load_funct.php on line 89

Warning: Illegal string offset 'dewpoint' in /var/www/html/pwsTEST/metar_load_funct.php on line 91

Warning: Illegal string offset 'celsius' in /var/www/html/pwsTEST/metar_load_funct.php on line 91

Warning: Illegal string offset 'dewpoint' in /var/www/html/pwsTEST/metar_load_funct.php on line 92

Warning: Illegal string offset 'fahrenheit' in /var/www/html/pwsTEST/metar_load_funct.php on line 92

Warning: Illegal string offset 'temperature' in /var/www/html/pwsTEST/metar_load_funct.php on line 93

Warning: Illegal string offset 'celsius' in /var/www/html/pwsTEST/metar_load_funct.php on line 93

Warning: Illegal string offset 'temperature' in /var/www/html/pwsTEST/metar_load_funct.php on line 94

Warning: Illegal string offset 'fahrenheit' in /var/www/html/pwsTEST/metar_load_funct.php on line 94

Warning: Illegal string offset 'humidity_percent' in /var/www/html/pwsTEST/metar_load_funct.php on line 95

Warning: Illegal string offset 'visibility' in /var/www/html/pwsTEST/metar_load_funct.php on line 96

Warning: Illegal string offset 'meters' in /var/www/html/pwsTEST/metar_load_funct.php on line 96

Warning: Illegal string offset 'wind' in /var/www/html/pwsTEST/metar_load_funct.php on line 97

Warning: Illegal string offset 'degrees' in /var/www/html/pwsTEST/metar_load_funct.php on line 97
Y°C Temp
'.PHP_EOL;
Y°C Dewpoint
Y% Humidity
Temperature
0 KM/H
0 MPH
0 KTS
Calm
Due North

Wind
Data Offline
Pressure Y (hPa)- Y (in)
Visibility 0 (mi) - 0 (km)

Current Conditions
Y
Location Y 14(km)
Metar:
Y

Notice: Undefined offset: 1 in /var/www/html/pwsTEST/metar_popup.php on line 285

Notice: Undefined offset: 1 in /var/www/html/pwsTEST/metar_popup.php on line 286

Notice: Undefined offset: 2 in /var/www/html/pwsTEST/metar_popup.php on line 286

Notice: Undefined offset: 1 in /var/www/html/pwsTEST/metar_popup.php on line 287

Warning: gmmktime() expects parameter 1 to be integer, string given in /var/www/html/pwsTEST/metar_popup.php on line 288
Thu 1st January 10:00 am

Airport
  Metar Aviation API Data Provided by https://www.checkwx.com/ Icons created by weather34.com

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 14, 2019, 06:32:23 AM
Hi Wim,
Just installed your BETA test code that includes Cumulus support.
You can see my site here... http://weather.skybase.net/pwsTEST/index.php
Everything is working except for METAR retrieval. Clicking on Current conditions -> "Nearby" produces the errors below ...
Code: [Select]
Warning: Illegal string offset 'observed' in /var/www/html/pwsTEST/metar_load_funct.php on line 50
. . . shortened . . .
Airport
  Metar Aviation API Data Provided by https://www.checkwx.com/ Icons created by weather34.com
The data retrieved for your airport
Code: [Select]
{"results":1,"data":["YRSI Invalid Station ICAO"]}You entered  at question "Enter your nearest airport code (XXXX)  . . . "  an invalid code  YRSI
That airport does not exist: https://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code:_Y#YR

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: TSL on February 14, 2019, 08:30:38 PM
Doh!
 I had a dyslexic moment, it should be YSRI. :oops:

 I looked at that maybe ten times and didn't see the problem :x

thanks

Tim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: TSL on February 15, 2019, 12:41:21 AM
Hi Wim,

Now that I've had a little more time to do some testing I have found the following...

In the Moon phase pop-up the text is not fitting into the boxes, bottom box edges are across the text

The acknowledgement "Design based on weather34.com" on the bottom right is off the page

The site wont run on older Safari versions i.e.

 "GET /pwsTEST/index.php HTTP/1.1" 200 5870 "-" "Mozilla/5.0 (iPad; CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1"

We get an error on the iPad - see pic


Serbian flag is missing from language selection

Temperature for today pop up is not showing data, nor is any of the others. see pics

 **** This appears to be intermittent since I've just checked it 4 hours later and there is graphs now!! ***


Today's forecast( Friday 15th) is showing the wrong icon, should be the same icon as Saturday. It picked the right icon at 11:10am today


RFE...

Password should not be stored in cleartext in settings file, see...
http://php.net/manual/en/faq.passwords.php


Contact info popup should only show enabled methods i.e. don't show twitter if account not configured.

Extras menu should only show configured options.

Extras menu items need config section in setup

When setting light theme, top bar stays dark.

the Fahrenheit indicator needs to move down a bit so it doesn't crowd the menu on iPhone

Site loads tested on the following platforms ...

Windows 7...
Firefox  60.5.1 ESR
Chrome 71.0.3578.98 (Official Build) (64-bit)

Linux RH7.6
Firefox 60.5.0 ESR
Chrome 3.0.3683.10 (Official Build) dev (64-bit)

iPhone 5S
iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1

ipad V2
iPad; CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1"

Nexus 7 tablet
Android 6.0.1 Chrome/70.0.3538.80


regards

Tim
http://weather.skybase.net/pwsTEST/index.php


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 15, 2019, 07:31:54 AM
@all beta-test  

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 15, 2019, 12:28:37 PM
Hi Wim,
Now that I've had a little more time to do some testing I have found the following...
. . . shortened . . . The site wont run on older Safari versions i.e.
. . . Password should not be stored in cleartext in settings file, see...
. . . Contact info popup should only show enabled methods i.e. don't show twitter if account not configured.
. . . When setting light theme, top bar stays dark.
. . . the Fahrenheit indicator needs to move down a bit so it doesn't crowd the menu on iPhone
. . . Tim
I think you misunderstood the definition of "beta" test or,  English is not my native language, it was me who misunderstood it.

I can only assume that your current weather-website has all these errors already solved?
But when I checked, the same remarks are there also.  It would be more polite to  post "wishes" in the  wish-list topic.

This WD34 April version includes 3  weather-alarms, WXSIM is back, Canadian text forecast are included and about 40% of the html errors are removed. And one former WD, now WC user, wanted to continue to use so the Cumulus/WC/Weewx users can now choose between 2 versions.

For every new release of this "WD" version, all user remarks will get sorted and according to my available time, they will be implemented.

Therefor, please try to help this programmer find the errors and omissions,  do not waste my time with large lists of  discussion points.

Wim

P.S.  :oops:  #-o  :oops:
Sometimes my words sound to harsh. Sorry, So as an example, it took 4 hours to modify the contact-popup (bio-popup) .
It now hides twitter if there is no twitter-account (took approx. 5 minutes).

But it also has no html errors anymore, that took 80% of the time and as I hate unnecessary info, you can remove the links also from the pop-up and that plus testing took the remaining time.

https://validator.w3.org/nu/?doc=http://weather.skybase.net/pwsTEST/bio_popup.php  => checking ends with fatal after 8 errors

https://validator.w3.org/nu/?doc=http://wd34.weather-template.com/pwsTEST/bio_popup.php no html errors

There are still numerous CSS errors but they will be removed in the June release.
Demo: the pwsTEST/ version has the links visible.  The pwsWD/ version shows no links, still the areas are clickable.

Shouldn't  there be a facebook account added also?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: TSL on February 15, 2019, 07:59:15 PM
I think you misunderstood the definition of "beta" test or,  English is not my native language, it was me who misunderstood it.

I can only assume that your current weather-website has all these errors already solved?
But when I checked, the same remarks are there also.  It would be more polite to  post "wishes" in the  wish-list topic.


My appologies, I didn't know about the "wishes" list - I will post future RFE's there. :)



P.S.  :oops:  #-o  :oops:
Sometimes my words sound to harsh. Sorry, So as an example, it took 4 hours to modify the contact-popup (bio-popup) .


Thats Ok, we all appreciate the effort you are doing to create this template and understand that it can be frustrating at times.

regards

Tim



Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 16, 2019, 08:39:06 AM
Just a little off-topic  :wink:

@TSL  and all users of abbreviations in their posts

The WW forum caters for an international public with a lot of  Dutch, Spanish, Italian, Korean a.s.o visitors.
Maybe English is "spoken" all over the world when one is on vacation, but please refrain from using abbreviations such as RFE  as for over ?50%? of the forum visitors English is NOT their native language. 

All those non-native speakers often use  translate.google.com But that tool only knows that "RFE" is not English but it  uses" Translate from: Haitian Creole"  So when I read your post, I assumed it was a typo and ignored it, because my brain knows what it stands for. But my brain got it wrong, it was essential information and it seemed to mean  for @TSL and maybe other native english speaking software professionals: "Request for Enhancements"

For me, as an older European person, it definitely stands for  RadioFreeEurope,  for immigrants to the US => Request For Evidence (RFE)
The other meanings for RFE => https://en.wikipedia.org/wiki/RFE

A search for RFE on this forum yield 33 results of the rfe letters as (part of) a word  in posts. Only  the last one, the only one with the rfe as a separate  word is this topic.

IMHO IWBW NTU abbreviations when we want to make our point.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on February 16, 2019, 06:21:17 PM
keep up the good work Wim
we all appreciate your dedication  :D
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: TSL on February 17, 2019, 12:53:26 AM


IMHO IWBW NTU abbreviations when we want to make our point.
Wim

My apologies again !  #-o

As for myself, I work for one of the top computer companies in the world with 135,000+ employees in over 300 countries and the term RFE ( Request for Enhancement ) has always been understood in any conversation I've had with anyone anywhere and is considered universal.

That being said ... I shall refrain from using any abbreviations in future outside of the work environment in this forum  :D

regards

Tim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 17, 2019, 11:06:39 AM
Something funny in the Nearby metar pop-up this morning. . . Is this a CheckWX problem?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 17, 2019, 11:25:56 AM
Something funny in the Nearby metar pop-up this morning. . . Is this a CheckWX problem?
Suddenly all metar pop-ups, old or new, show a date of 1-1-1970 UTC and an error message when error reporting is on.
And you are the first to notice it?   Thanks  :D 
First make a copy of the current script and please test this version,
Wim

P.S.  "Is this a CheckWX problem" => yes
The date field in the json file now contains something more then the expected string:
Code: [Select]
"observed":"17-02-2019 <span class=\"tx-light tx-12\">@<\/span> 11:00Z",
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 17, 2019, 11:52:49 AM
First make a copy of the current script and please test this version

New version shows the wrong time: 00:20 am  instead of 1120Z (UTC).

. . . and later 00:50 am instead of 1150Z.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 17, 2019, 12:57:44 PM
New version shows the wrong time: 00:20 am  instead of 1120Z (UTC).

. . . and later 00:50 am instead of 1150Z.
Yes the invalid data is still there, so the time fields are more or less valid.
The "garbage in"  results in "garbage out" for the time field, but without large error messages.
The unexpected values are still there, but shorter
Code: [Select]
"observed":"17-02-2019 @<\/span> 12:00Z"
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 18, 2019, 01:02:49 PM
Second beta version April release ready for download.
Read more at and download from http://wd34.weather-template.com/beta.php

Comments welcome at https://www.weather-watch.com/smf/index.php/topic,67675.0.html

Do not update the beta releases, just remove old folder and test the new one from scratch, thanks
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 18, 2019, 02:04:09 PM
Yes the invalid data is still there, so the time fields are more or less valid.
The "garbage in"  results in "garbage out" for the time field, but without large error messages.
The unexpected values are still there, but shorter
Code: [Select]
"observed":"17-02-2019 @<\/span> 12:00Z"

So there is nothing I can do about it?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 18, 2019, 02:08:58 PM
So there is nothing I can do about it?
i assume it will go away, but I modified the script a bit and see if this removes the extra unneeded characters.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 18, 2019, 02:17:00 PM
I assume it will go away, but I modified the script a bit and see if this removes the extra unneeded characters.

That's looking good. Thanks, Wim.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 18, 2019, 09:20:25 PM
I assume it will go away

Thought I'd contact CheckWX anyway, here's their reply:

"Thanks for bringing this issue to our attention.  It has been corrected.
I apologize for the inconvenience and thank you for using CheckWX"
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 18, 2019, 09:24:39 PM
Thought I'd contact CheckWX anyway, here's their reply:

"Thanks for bringing this issue to our attention.  It has been corrected.
I apologize for the inconvenience and thank you for using CheckWX"
Thanks  :D
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 21, 2019, 06:27:14 PM
You should remove the typo by adding this to the end of the file:
Code: [Select]
$lang['Select langauge'] = 'Select language';
In all other language files  (f.i. Dutch) it is
Code: [Select]
|Select langauge|Selecteer een taal|On the left always the words from the scripts, on the right the translation.

It may be that Dutch is the only language file with that phrase, it doesn't appear, e.g., in the current French or German language files. . . I haven't checked them all. In French and German the entries are just |language|choisir... or |language|sprache… - with language spelled correctly.

Basically, the Menu headings are not always translated.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: hcorrin on February 21, 2019, 08:09:05 PM
Looks like the metar34.txt has changed again the popup gives error 500 in IE11 and edge says something about humidity and line 103 in the metar_load_funct.php it was ok early this morning
http://www.hc-iom.co.uk/pwsWD/index.php (http://www.hc-iom.co.uk/pwsWD/index.php)

{"results":1,"data":[{"icao":"EGNS","name":"Isle of Man","observed":"21-02-2019 @ 16:50Z","raw_text":"EGNS 211650Z 15009KT 9000 FEW006 10\/08 Q1023 NOSIG","barometer":{"mb":1022.92,"hg":30.21,"kpa":102.29},"clouds":[{"code":"FEW","base_feet_agl":600,"base_meters_agl":600,"text":"Few"}],"dewpoint":{"celsius":8,"fahrenheit":46},"elevation":{"feet":55.77,"meters":17},"flight_category":"VFR","humidity":{"percent":88},"temperature":{"celsius":10,"fahrenheit":50},"visibility":{"miles":"559","miles_float":5.59,"meters":"8,996","meters_float":8996.23},"wind":{"degrees":150,"speed_kts":9,"speed_mph":10,"speed_mps":5}}]}

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 21, 2019, 08:18:27 PM
Looks like the metar34.txt has changed again the popup gives error 500 in IE11 and edge says something about humidity and line 103 in the metar_load_funct.php it was ok early this morning http://www.hc-iom.co.uk/pwsWD/index.php (http://www.hc-iom.co.uk/pwsWD/index.php)
Yes they changed the API and the humidity was a string "humidity": 88, is now an array: "humidity":{"percent":88}

Attached new version of script for the normal release pwsWD! Do not for beta test pwsTEST.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 21, 2019, 08:22:41 PM
Looks like the metar34.txt has changed again the popup gives error 500 in IE11 and edge says something about humidity and line 103 in the metar_load_funct.php it was ok early this morning

Metar pop-up working OK here in Chrome, Edge and IE11.

No, it's not! Pop-up is working, humidity isn't. . . Sorry  #-o
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 21, 2019, 08:25:20 PM
Metar pop-up working OK here in Chrome, Edge and IE11.
Not anymore at 21:25 CET,
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: hcorrin on February 21, 2019, 09:19:29 PM
Thanks Wim that sorted it, why they keep changing it is another question
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 21, 2019, 10:24:57 PM
Thanks Wim that sorted it

+1
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on February 22, 2019, 12:11:23 PM
Basically, the Menu headings are not always translated.

Still on the subject of Menu headings, I find it strange that "Settings" is headed "FIRST SETUP" because it is only FIRST the first time you use it.

I use Settings three or four times a day  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on February 24, 2019, 11:36:25 PM
just a FYI
the setup from the control panel is now available without needing to create the special file
in the latest update of WD  :D
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 25, 2019, 04:34:33 PM
I use WeeWX to read data from my Vantage Pro2 using Weather Envoy and generating realtime.txt output file.
From w34_easyweatherseup February 18 beta I choose "Cumulus using realtime.txt".
This works seemingly perfect, but Cumulus logo is displayed in lower left corner.
It would probably be more correct to honor WeeWX developers work and display their logo instead.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 25, 2019, 05:46:25 PM
In w34_easyweathersetup February 18 beta when selecting language there is an option reading "Your language/country flag"
If I choose this one the Canadian flag is displayed at the bottom. All my timezone and coordinates etc. are referring to Norway.
Is there a way of overriding/choosing the correct flag?


See: http://weather.misal.com
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 25, 2019, 06:20:17 PM
In w34_easyweathersetup February 18 beta when selecting language there is an option reading "Your language/country flag"
If I choose this one the Canadian flag is displayed at the bottom. All my timezone and coordinates etc. are referring to Norway.
Is there a way of overriding/choosing the correct flag?
See: http://weather.misal.com
Yes that last choice is for the "xx" flag
So if you f.i. live in Belgium you have three official languages, German, French and Dutch(Flamish)
But the Belgian flag has no language.
Same for Canada, two languages: French and English, but no language for the Canadian Flag.

Therefor if your country name is NOT listed in the dropdown, you select the last choice "Your country" and the "xx" flag is displayed.
You then find your own country flag, make a copy, rename that copy to xx.svg and your country flag will be displayed.

As long as there is no Norwegian language file, you should copy img/flags/no.svg to img/flags/xx.svg (replacing the Canadian one).
After the browser cache invalidates your Norwegian flag will be in the bottom.

This will be described in the documentation of the April release

Wim

The link for your site in your message is invalid
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on February 25, 2019, 06:42:17 PM
I use WeeWX to read data from my Vantage Pro2 using Weather Envoy and generating realtime.txt output file.
From w34_easyweatherseup February 18 beta I choose "Cumulus using realtime.txt".
This works seemingly perfect, but Cumulus logo is displayed in lower left corner.
It would probably be more correct to honor WeeWX developers work and display their logo instead.
Yes,  I have to create a few extra logo's as clientraw.txt has become a standard on its own, and is used by other weather-programs.
Same for cumulus <  > realtime.txt , used also by WeatherCat and Weewx.

Will be implemented in the April release. Needs adaptions in the index, the start-frame script and easyweather.
I am testing it already, but for now a QAD (QuickAndDdirty) modifed script to display the Weewx logo, lines 171-173

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on February 25, 2019, 07:16:02 PM
If it helps GW400's site is http://weather.meisal.com/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 26, 2019, 07:34:15 PM
Yes that last choice is for the "xx" flag
So if you f.i. live in Belgium you have three official languages, German, French and Dutch(Flamish)
But the Belgian flag has no language.
Same for Canada, two languages: French and English, but no language for the Canadian Flag.

Therefor if your country name is NOT listed in the dropdown, you select the last choice "Your country" and the "xx" flag is displayed.
You then find your own country flag, make a copy, rename that copy to xx.svg and your country flag will be displayed.

As long as there is no Norwegian language file, you should copy img/flags/no.svg to img/flags/xx.svg (replacing the Canadian one).
After the browser cache invalidates your Norwegian flag will be in the bottom.

This will be described in the documentation of the April release

Wim

The link for your site in your message is invalid

Thank's! That worked.
Attached is a more correct image of the Norwegian flag.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on February 26, 2019, 07:36:25 PM
Yes,  I have to create a few extra logo's as clientraw.txt has become a standard on its own, and is used by other weather-programs.
Same for cumulus <  > realtime.txt , used also by WeatherCat and Weewx.

Will be implemented in the April release. Needs adaptions in the index, the start-frame script and easyweather.
I am testing it already, but for now a QAD (QuickAndDdirty) modifed script to display the Weewx logo, lines 171-173

Wim

Perfect! Works like a charm.
However, official WeeWX logo does not look good on black background, but that is not anything we expect you to fix :-)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Eagleizer on March 01, 2019, 07:29:58 AM
I have tried everything to get this to work. I received all the keys I needed and have tried altering my lat and long many times, but to no avail.
The forecast is wrong, it will get to near 30C tomorrow. The sunrise and sunset are wrong. I am unsure of the current conditions.
Here is an image. The red squares, I'm so are wrong. The green ones, I'm uncertain.
Any help please.

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 01, 2019, 07:36:25 AM
I have tried everything to get this to work. I received all the keys I needed and have tried altering my lat and long many times, but to no avail.
The forecast is wrong, it will get to near 30C tomorrow. The sunrise and sunset are wrong. I am unsure of the current conditions.
Here is an image. The red squares, I'm so are wrong. The green ones, I'm uncertain.
Any help please.
Without a link to the pws folder, there is nothing I can do. 
I think it is pwdWD/ but that also gives a 404 http://www.maryweather.net.au/pwsWD/

Wim

P.S. The footer of the page also displays if it is clientraw or WD-api, but that is not copied either
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Eagleizer on March 01, 2019, 07:45:54 AM
Without a link to the pws folder, there is nothing I can do. 
I think it is pwdWD/ but that also gives a 404 http://www.maryweather.net.au/pwsWD/

Wim

P.S. The footer of the page also displays if it is clientraw or WD-api, but that is not copied either

Try here. Thanks for looking.
http://www.maryweather.net.au/weather/pwsWD/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 01, 2019, 07:59:23 AM
Try here. Thanks for looking.
http://www.maryweather.net.au/weather/pwsWD/
You used the wrong coordinates, this is from the DarkSky data  which locates your station north of Hawai i in the ocean.
Code: [Select]
latitude":25.5225,"longitude":-152.692,
Maryborough AU coordinates are
-25.539595   = minus  = south of the equator
152.6654131 = plus =  right of Greenwhich.

DO NOT use the + or - before the coordinates as set in WD, but use the "official" + and -.

Wim
P.S.  It will take about an hour before the changes of the coordinates  take effect as the DarkSky data is cached.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Eagleizer on March 01, 2019, 08:05:05 AM
You used the wrong coordinates, this is from the DarkSky data  which locates your station north of Hawai i in the ocean.
Code: [Select]
latitude":25.5225,"longitude":-152.692,
Maryborough AU coordinates are
-25.539595   = minus  = south of the equator
152.6654131 = plus =  right of Greenwhich.

DO NOT use the + or - before the coordinates as set in WD, but use the "official" + and -.

Wim
P.S.  It will take about an hour before the changes of the coordinates  take effect as the DarkSky data is cached.
I thought that I had tried all of them.
Again, tanks you very much.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on March 02, 2019, 03:55:10 PM
Still having problems with the metar...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 02, 2019, 04:15:32 PM
Still having problems with the metar...
:oops:
forgot to update the pwsWD/ version also. Attached a new version of the script
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on March 02, 2019, 04:27:11 PM
:oops:
forgot to update the pwsWD/ version also. Attached a new version of the script

Good deal.  Anxiously awaiting the April release...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 02, 2019, 04:47:56 PM
Good deal.  Anxiously awaiting the April release...
You should test the latest beta fro March 1, is as good as the April release, but it still has all error reporting switched on.
http://wd34.weather-template.com/beta.php

Wim

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 03, 2019, 02:56:04 PM
Still on the subject of Menu headings, I find it strange that "Settings" is headed "FIRST SETUP" because it is only FIRST the first time you use it.

I use Settings three or four times a day  :)
Corrected on both points.  All menu items are now translated.  So  "FIRST SETUP (protected)  " can be translated also.
Check the latest beta  at  http://wd34.weather-template.com/pwsTEST/index.php?lang=nl

I will update the other language files before the end of March and will also move the english .php  to a .txt file also.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 03, 2019, 03:08:04 PM
Perfect! Works like a charm.
However, official WeeWX logo does not look good on black background, but that is not anything we expect you to fix :-)
In April release there is a "lightgrey" background-color.
Code: [Select]
<img src="http://www.weewx.com/weewx-logo-128x128.png" width="35" height="35" alt="Weewx"
         style="background-color: lightgrey; padding: 2px;">
Looks good in Dark and Light I think.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 03, 2019, 03:11:28 PM
Corrected on both points.  All menu items are now translated.  So  "FIRST SETUP (protected)  " can be translated also.
Check the latest beta  at  http://wd34.weather-template.com/pwsTEST/index.php?lang=nl

Good job, Wim! (But the "FIRST SETUP" heading "Instellingen" is in cap and lower case?)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 03, 2019, 03:20:45 PM
Good job, Wim! (But the "FIRST SETUP" heading "Instellingen" is in cap and lower case?)
One can translate as one wants.
|FIRST SETUP|INSTELLINGEN|
of
|FIRST SETUP|Instellingen|
But it would be better to be more consistent,  :oops:
I prefer lowercase as it reads easier. So  I changed the language file for Dutch to have lowercase entries in the menu.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 03, 2019, 06:37:52 PM
In April release there is a "lightgrey" background-color.
Code: [Select]
<img src="http://www.weewx.com/weewx-logo-128x128.png" width="35" height="35" alt="Weewx"
         style="background-color: lightgrey; padding: 2px;">
Looks good in Dark and Light I think.

Should this code snippet be inserted into w34_index.php?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 03, 2019, 07:25:48 PM
Should this code snippet be inserted into w34_index.php?
No this is strictly BETA.
In the beta/April release I moved the images from index.php and the frames.php to the settings. So that we can add and change it at one place without changing at multiple others.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 03, 2019, 09:23:46 PM
w34_cron_stationcron.php is not executed. I can run it manually using _test.php?test=w34_cron_stationcron.php.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 04, 2019, 07:25:46 AM
w34_cron_stationcron.php is not executed. I can run it manually using _test.php?test=w34_cron_stationcron.php.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 04, 2019, 10:56:45 AM
If it helps GW400's site is http://weather.meisal.com/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 04, 2019, 02:36:43 PM

Thank you!
Sorry to Wim that I forgot to include url :-(
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 04, 2019, 02:40:10 PM
  • What is the URL?   
    PLEASE understand that you are not the only one using these scripts and I have to support my own scripts also on four forums in multiple languages.  I am not clairvoyant and can not remember every individual request
  • As you state that the cron-job runs from the browser,  there seems to be no problem with the cronjob itself.
    So please tell me what your problem is.
  • Adding  _test.php only adds the display of all debug info. 
    Do not use that when running a job from WeatherDisplay or whatever cron-server-program you are using.
    Cron servers do not like to get large blobs of data from the jobs they start.
  • http://wd34.weather-template.com/documentation/WDapi-stationcron-2019-01.pdf
Wim
My problem is that cron job is not executed.
I use WeeWX. WDapi is not possible with current setup.
http://weather.meisal.com
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 04, 2019, 02:57:05 PM
My problem is that cron job is not executed.
I use WeeWX. WDapi is not possible with current setup.
http://weather.meisal.com
Cronjobs are started from somewhere else and only executed on your weather34/ website.
WeatherPrograms such as WeatherDisplay  or Meteobridge are able to function as a cron-server themselves.
Small linux computers such as RaspBerry have built in cron-servers also.

Or you can use a free (or almost free) con-provider.
There are multiple discussions on the weather-fora about which providers can be used. 
Sometimes your website provider has a free cron service also.
Some of the names I got when using Google   https://cron-job.org/en/  https://www.cronjob.de/  https://www.setcron.com/

But this topic/discussion is not the right place and by hiding it here in this topic you will get far less answers than starting a topic such as" Which (free) cronjob server should I use?"

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 04, 2019, 03:11:38 PM
Cronjobs are started from somewhere else and only executed on your weather34/ website.
WeatherPrograms such as WeatherDisplay  or Meteobridge are able to function as a cron-server themselves.
Small linux computers such as RaspBerry have built in cron-servers also.

Or you can use a free (or almost free) con-provider.
There are multiple discussions on the weather-fora about which providers can be used. 
Sometimes your website provider has a free cron service also.
Some of the names I got when using Google   https://cron-job.org/en/  https://www.cronjob.de/  https://www.setcron.com/

But this topic/discussion is not the right place and by hiding it here in this topic you will get far less answers than starting a topic such as" Which (free) cronjob server should I use?"

Wim

This states why the script is not executed when not using programs like WeatherDisplay.
It was not very clear anywhere that I need to create a cron job myself. At least could not find it anywhere.
With this knowledge I'm able to move forward.
Thank's again for helping!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 04, 2019, 03:55:12 PM
This states why the script is not executed when not using programs like WeatherDisplay.
It was not very clear anywhere that I need to create a cron job myself. At least could not find it anywhere.
With this knowledge I'm able to move forward.
Thank's again for helping!

Ended up defining this cron task:
*/1 * * * * /usr/bin/php -q /home/weather/public_html/w34_cron_stationcron.php

I verified it is running once every minute and updates MYSQL db and csv file as expected

I assume I will also need two additional jobs running w34_cron_addtoyear.php and w34_cron_empty.php.
Correct?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 04, 2019, 04:05:32 PM
Ended up defining this cron task:
*/1 * * * * /usr/bin/php -q /home/weather/public_html/w34_cron_stationcron.php

I verified it is running once every minute and updates MYSQL db and csv file as expected

I assume I will also need two additional jobs running w34_cron_addtoyear.php and w34_cron_empty.php.
Correct?
1. You should only use the SQL table if you do not  upload to WeatherUnderground.  The data from WeatherUnderground is more extensive (more fields) and can be used for other fine scripts also.
2. Only if you do not upload to WU you need the 5 minutes before midnight en 5 minutes after midnight cron-jobs also.

Wim

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 04, 2019, 04:10:43 PM
1. You should only use the SQL table if you do not  upload to WeatherUnderground.  The data from WeatherUnderground is more extensive (more fields) and can be used for other fine scripts also.
2. Only if you do not upload to WU you need the 5 minutes before midnight en 5 minutes after midnight cron-jobs also.

Wim

Confirming that I do not upload to WeatherUnderground.
I should be good to go then.
G400
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 04, 2019, 04:19:35 PM
Confirming that I do not upload to WeatherUnderground.
I should be good to go then.
G400
Yes, you need the two other cron-jobs also.  Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on March 04, 2019, 08:52:05 PM
I updated to your new template Wim today
good job Wim
was relatively easy :)

I do see one error, might be that my php version 5.5.38   is a bit below minimum, and that is the moon phase script
http://weather-display.com/pwsWD/

Fatal error: Class 'Moon' not found in /homepages/22/d75034112/htdocs/weather-display/english/pwsWD/moon_block.php on line 42

I also see Overwegend bewolkt  in the current conditions ( I set to use clientraw for that)
:)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 04, 2019, 10:26:20 PM
Another Metar problem in production version: is this related to the one posted on the beta site or is it CheckWX again?

P.S. Same error on the 2220Z Metar.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: hcorrin on March 04, 2019, 11:07:18 PM
I got the following on my production site http://www.hc-iom.co.uk/pwsWD/index.php (http://www.hc-iom.co.uk/pwsWD/index.php)
metar popup gave error 500 in IE11 and
PHP Notice: Undefined index: name in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_load_funct.php on line 61
PHP Notice: Undefined offset: 1 in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_popup.php on line 286
PHP Notice: Undefined offset: 1 in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_popup.php on line 288

in MS edge
this is the text from the metar34 file
{"results":1,"data":[{"wind":{"degrees":240,"speed_kts":16,"speed_mph":18,"speed_mps":8},"temperature":{"celsius":6,"fahrenheit":43},"dewpoint":{"celsius":2,"fahrenheit":36},"humidity":{"percent":76},"barometer":{"mb":992.92,"hg":29.32,"kpa":99.29},"visibility":{"miles":"Greater than 6","miles_float":6.21,"meters":"10,000+","meters_float":10000},"ceiling":{"code":"BKN","text":"Broken","feet_agl":2000,"meters_agl":609.6},"elevation":{"feet":55.77,"meters":17},"location":{"coordinates":[-4.62389,54.083302],"type":"Point"},"icao":"EGNS","observed":"2019-03-04T21:50:00.000Z","raw_text":"EGNS 042150Z 24016KT 210V270 9999 BKN020 06/02 Q0993","clouds":[{"code":"BKN","text":"Broken","base_feet_agl":2000,"base_meters_agl":2000}],"flight_category":"MVFR"}]}


looks like things have altered again, I think CheckWX need to get there act together
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on March 05, 2019, 05:50:48 AM
I got the following on my production site http://www.hc-iom.co.uk/pwsWD/index.php (http://www.hc-iom.co.uk/pwsWD/index.php)
metar popup gave error 500 in IE11 and
PHP Notice: Undefined index: name in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_load_funct.php on line 61


I'm getting that error too in Firefox and Edge.

http://ucweather.org/pwsWD/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 05, 2019, 06:21:57 AM
@ALL
The format of the JSON file from the METAR provider has changed again.
Sorry, this should not have been visible for the production version. But because I knew that not all errors are removed I left full debugging code switched on. Therefor we get those errors.  As I am "off the grid" for at least 3 weeks after tomorrow I have very little time left to find a solution.

FOR NOW: Start easyweather and select nearly at the bottom at the question
"Where do we get our current conditions from?"  => "Use Darksky for current conditions (needs API key)."
That way your main window will not load the METAR scripts.
And do not use the "nearby" pop-up for now until i have had a chance to find out why they removed the airport name and others from the .JSON

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on March 05, 2019, 06:59:01 AM
my issue has been resolved, thanks Wim
for some reason the others folder had not been uploaded /expanded with the other folders via the WS_FTP program
so I just had to upload that folder
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 05, 2019, 07:14:57 AM
. . .  shortened . . .
I also see Overwegend bewolkt  in the current conditions ( I set to use clientraw for that)
:)
In your setup, the information for the "currentconditon block" comes partly from WD-clientraw (icon / text).
The rest comes from the 1 hour forecast from DarkSky

So you probably selected for DarkSky the language:  "Dutch" .
A beautifull language understood in the Netherlands, Flanders (Belgium) and a few municipalities at the upper north-west  of France. But it is at no use in NZ.

If you select English the forecast block and the 1 hour forecast will all be English.
But you have to wait an hour to see the changes as the forecasts are cached  to stay within the limits for your DarkSky API.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 05, 2019, 07:31:53 AM
METAR CHANGES  for pwsWD

As other users already discovered, the layout changed again.
I attach a zip with the two changed scripts for the pwsWD users.

The updates for the beta will be posted in the other topic.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: staccermaccer on March 05, 2019, 08:45:56 AM
Hi, Wim

Replaced the two files, works like a charm now!

Staccermaccer,
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 05, 2019, 08:53:26 AM
Ended up defining this cron task:
*/1 * * * * /usr/bin/php -q /home/weather/public_html/w34_cron_stationcron.php

I verified it is running once every minute and updates MYSQL db and csv file as expected
. . . shortened . . .
The cronjob has two tasks.I think you are running the cron-job far to fast. Once every 5 minutes is OK.
For the external files, such as forecasts,  METAR a.s.o. the cache time is (far) more than 5 minutes.   
The cron-job has to check every file for its last  file-modified-time and load the file when it is above 80% of the allowed age.

The graphs .csv files for today (result.csv) will accept 1 minute values, but the graphs itself has not that much room to display all those values.

And every day all those values in your sql-table are discarded also and replaced with a single line in your monthly/yearly .csv file which will be only used  to display those graphs.

There is no advantage in accessing an external hosted web-server every minute 24/7 for the graphs-weather-data.
And some web-hosting companies may think that it looks like a DDOS attack and block the IP-address.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on March 05, 2019, 09:07:35 AM
I got that conditions and darksky fixed
the Dutch forecast was default in the drop down on initial setup..but I had not noticed that..I selected English  :wink:
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on March 05, 2019, 10:57:58 AM
METAR CHANGES  for pwsWD

As other users already discovered, the layout changed again.
  • The airport-name is not available anymore / for now??.
  • The date/time field layout changed from:
    old:   01-03-2019 @ 07:20Z"
    new: 2019-03-05T05:55:00.000Z
I attach a zip with the two changed scripts for the pwsWD users.

The updates for the beta will be posted in the other topic.

Wim

Working okay here now.  Thanks, Wim.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 05, 2019, 03:29:39 PM
  • The airport-name is not available anymore / for now??.
  • The date/time field layout changed from:
    old:   01-03-2019 @ 07:20Z"
    new: 2019-03-05T05:55:00.000Z

I e-mailed CheckWX support, and they say:

"In the decoded METAR the 'name' is now referenced as 'station.name' as 'name' was ambiguous.
All datetimes are now in proper ISODate format as other users complained they were not consistent."

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 06, 2019, 07:23:43 AM
The cronjob has two tasks.
  • Loading all external files
  • Generating one line in the daily CSV and the SQL table
I think you are running the cron-job far to fast. Once every 5 minutes is OK.
For the external files, such as forecasts,  METAR a.s.o. the cache time is (far) more than 5 minutes.   
The cron-job has to check every file for its last  file-modified-time and load the file when it is above 80% of the allowed age.

The graphs .csv files for today (result.csv) will accept 1 minute values, but the graphs itself has not that much room to display all those values.

And every day all those values in your sql-table are discarded also and replaced with a single line in your monthly/yearly .csv file which will be only used  to display those graphs.

There is no advantage in accessing an external hosted web-server every minute 24/7 for the graphs-weather-data.
And some web-hosting companies may think that it looks like a DDOS attack and block the IP-address.

Wim
I have reduced to every 5 minutes.

I see from  crontab log file (I'm piping the output to a separate log file) that w34_cron_addtoyear.php is throwing error message: "Couldn not write headers to chartsmysql/2019_03.csv"
The strange thing is that data is written to file (2019_03.csv is attached).
Scheduled crontab jobs running w34_cron_empty.php and w34_cron_stationcron.php with the same user does work
http://weather.meisal.com
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: NorCal Dan on March 11, 2019, 02:42:16 AM
Happening with both prod and beta versions...always sucks having to rely on someone else for data and they make changes...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Harry on March 11, 2019, 03:45:43 AM
Happening with both prod and beta versions...always sucks having to rely on someone else for data and they make changes...

Mine just comes up blank.  http://ucweather.org/pwsWD/
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 11, 2019, 10:16:13 AM
Mine just comes up blank.

https://earthquake-report.com/ gives Error 503, no server is available to service this request

Update: it's working again this evening!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on March 13, 2019, 12:18:54 AM
Is there a reason my template is not auto refreshing like it used to? I've got it displayed on a fire tablet.
http://weather911.net/pwsWD/index.php


Sent from my Pixel 2 using Tapatalk


Sent from my Pixel 2 using Tapatalk

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 13, 2019, 02:38:46 PM
Is there a reason my template is not auto refreshing like it used to? I've got it displayed on a fire tablet.
http://weather911.net/pwsWD/index.php
. . . shortened . . .
It works OK and refreshes OK in Chrome on my Mac.
As I have no access to a "fire tablet"I can not furthere test that.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 25, 2019, 08:07:17 PM
Working okay here now.  Thanks, Wim.

But not picking up the metar station name in production? (It's OK in beta.)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 26, 2019, 08:33:17 AM
How can I change the update frequency when reading data from Cumulus type realtime.txt?
Currently it seems to be updating about once every minute.
Data are updated every 3-4s in realtime.txt.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 26, 2019, 04:54:14 PM
How can I change the update frequency when reading data from Cumulus type realtime.txt?
Currently it seems to be updating about once every minute.
Data are updated every 3-4s in realtime.txt.
I put it  in on the todo list.
For now I Will be home on wendnesday night (CET) and first task is to finalize the April release.

Be aware that there are multiple independent reads of realtime data every minute, depending on the data-type.
F.I. Wind is requested faster as temp.
And your web server should be able to cope with all these requests.

I propose a factor, 1 = default speed, 2 = twice as fast, a.s.o.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: GW400 on March 26, 2019, 09:00:17 PM
I put it  in on the todo list.
For now I Will be home on wendnesday night (CET) and first task is to finalize the April release.

Be aware that there are multiple independent reads of realtime data every minute, depending on the data-type.
F.I. Wind is requested faster as temp.
And your web server should be able to cope with all these requests.

I propose a factor, 1 = default speed, 2 = twice as fast, a.s.o.
Wim
Very good! I agree April release should be #1 priority

My suggestions:
Wind - default = 1/30s, 2 = 1/15s, 3 = 1/5s
Temp - default = 1/60s, 2 = 1/30s, 3 = probably not needed
Rain - default = 1/60s, 2 = 1/30s, 3 = 1/5s (nice to have during heavy rain)

My web server should not have any issues with this extra load.
G400
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 29, 2019, 02:46:46 PM
The orange arc corresponding to Luminance % is not easily visible in production moon block, dark theme.

(I'm not running beta, and the beta demo site is not showing the moon block, so I can't check if it is different in beta.)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on March 29, 2019, 03:52:51 PM
The orange arc corresponding to Luminance % is not easily visible in production moon block, dark theme.

(I'm not running beta, and the beta demo site is not showing the moon block, so I can't check if it is different in beta.)
This was a CSS background setting so it is a problem in both versions.
Removed it for this item in the script itself. Attach a script for your production version. It should be OK.

The beta version http://wd34.weather-template.com/pwsTEST/?theme=dark with the moon block seems OK now also.
 
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on March 29, 2019, 04:54:59 PM
Attach a script for your production version. It should be OK.

Many thanks, Wim. Yes, both versions look good now  :)

P.S. Welcome back!
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 01, 2019, 05:40:32 PM
But not picking up the metar station name in production? (It's OK in beta.)
This one is OK?
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on April 01, 2019, 05:54:15 PM
This one is OK?

Yes, that works! Thanks, Wim.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 02, 2019, 11:22:18 PM
So I just found this version of W34 (i was using Brian's). I have installed the Beta 3/31 version. Everything working very good. Trying to reformat my Menu Items to work with this version.

I have links to other web pages and they open in a new tab. So I'm trying to figure out how to do this within the iframe code that is used in the new menu structure.

My old links were coded like this:

Code: [Select]
<li><!---Link 2---><div class="nav-text"><a target="_new" href="http://premiuma.accuweather.com/premium/radar.asp?LocationID=55331US&display=0&site=msp&level=metro&anim=1" title="MSP Metro Radar"> <?php echo $weather34mapicon;?> MSP Metro Radar</a></div></li>
Anyone know how to reformat my links?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on April 02, 2019, 11:25:05 PM
I'm sure a link to the page would help anyone trying to help you.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 02, 2019, 11:51:37 PM
The page link is in the code.

I figured it anyway, no worries.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: niko on April 03, 2019, 12:40:15 AM
A link to your page...
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 03, 2019, 02:01:13 AM
Does anyone know where the icons in the menu come from? The code for the "info" icon is <?php echo $info;?> but I have searched and can't find the graphic anywhere. I would like to know what icons are available.

(https://www.loweprofile.com/images/misc/menu.jpg)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 03, 2019, 07:38:03 AM
Does anyone know where the icons in the menu come from? The code for the "info" icon is <?php echo $info;?> but I have searched and can't find the graphic anywhere. I would like to know what icons are available.
Most "icons" are  svg-scripts.

Some are coded as external links
Code: [Select]
<img style="vertical-align: bottom; width : 60px;" rel="prefetch" src="w34_icons/mc_day.svg" alt="Mostly cloudy">
Other icons are copied as text when a script is run. Most of those svg blocks are in the  w34_shared.php script.
Code: [Select]
<?php echo $info;?>
Some other grpahs/icons are in the scripts themselves and will be moved to either an icon folder or the shared script in the upcoming releases.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 03, 2019, 05:25:48 PM
Anyone know how to set up NWS weather alerts in US.

I'm getting a "Wind Advisory" and the correct alert should be "Flooding"

If I leave blank I get same alert.

(https://www.loweprofile.com/images/misc/weather_alerts.jpg)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 03, 2019, 05:50:44 PM
Anyone know how to set up NWS weather alerts in US.

I'm getting a "Wind Advisory" and the correct alert should be "Flooding"

If I leave blank I get same alert.

(https://www.loweprofile.com/images/misc/weather_alerts.jpg)
https://www.weather-watch.com/smf/index.php/topic,67675.msg544913.html#msg544913
The standard curly/nws scripts are used as downloaded from KenTrue/Saratoga.
I did not modify anything.  You do not have to  modify the scripts either.   You should only set the areas you want the warnings
http://wd34.weather-template.com/beta.php =>
For users from the USA, you have to modify your Curly/NWS weatherwarnings in the pwsTEST/nws-alerts-142/ folder

That is something for the new documentation.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 04, 2019, 02:51:39 AM
Ok, I read that. Did not understand. I will look into further on my own.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 04, 2019, 10:25:02 PM
Ok I got NWS alerts working but when I click on the alert I get this error message:

Forbidden
You don't have permission to access /pws2/nws-alerts-142/nws-summary.php on this server.
Server unable to read htaccess file, denying access to be safe

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


I have all permissions set correctly. I run several site from this domain and I haven't seen this error anywhere else.
Also is there a better thread to post this issue on? I've searched the entire forum but not sure best area for this.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 06, 2019, 05:58:26 AM
Ok I got NWS alerts working but when I click on the alert I get this error message:

Forbidden
You don't have permission to access /pws2/nws-alerts-142/nws-summary.php on this server.
Server unable to read htaccess file, denying access to be safe

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


I have all permissions set correctly. I run several site from this domain and I haven't seen this error anywhere else.
Also is there a better thread to post this issue on? I've searched the entire forum but not sure best area for this.

With almost all website-providers, the permissions  and the owner for the folders and scripts are set correctly when you upload the complete pws folder.

But in your case: https://www.loweprofile.com/pws2/nws-alerts-142/NWS-alerts_read_me.html  => not allowed to display either!
That is an html file. So this is a permission error.
Success,
Wim


Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on April 06, 2019, 11:12:41 AM
The beta version http://wd34.weather-template.com/pwsTEST/?theme=dark with the moon block seems OK now also.

Maybe the moon ring should be the same width as the sun ring - or vice versa?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 06, 2019, 01:30:05 PM
Thanks Wim,  I had tried permissions at 755 on the file mentioned in the error, but not all. I set the folder and all contents to 755, and it works, maps an all.

Thanks!!!!!!!!!!!!!!!!!

With almost all website-providers, the permissions  and the owner for the folders and scripts are set correctly when you upload the complete pws folder.

But in your case: https://www.loweprofile.com/pws2/nws-alerts-142/NWS-alerts_read_me.html  => not allowed to display either!
That is an html file. So this is a permission error.
  • check the date of the files in that folder. Are they newly created? Or still the ones from the download? The scripts need execution permission.
  • change the permissions of that readme file and see what permission works.
  • check the permissions of the pws2/nws-alerts-142/ with your ftp program and set the permissions for the folder AND the contents to 755.
Success,
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 11, 2019, 12:52:36 PM
The April version is online for download at http://wd34.weather-template.com/
And I also added a new topic (https://www.weather-watch.com/smf/index.php/topic,67862.new#new) to post your questions for this release in.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on April 16, 2019, 11:09:52 AM
Found a Serbian flag sr.svg file (in an old version of w34) to replace the current sr.png. Unzip, add it to /img/flags/ directory and change line 149 of w34_menu.php from

Code: [Select]
<a href="index.php?lang=sr"><img src="img/flags/sr.png"  title="Serbian"      width="25px" height="15px"></a>&nbsp;

to
Code: [Select]
<a href="index.php?lang=sr"><img src="img/flags/sr.svg"  title="Serbian"      width="25px" height="25px"></a>&nbsp;

I presume this (or something similar) would work in beta and the new release.

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on April 16, 2019, 01:30:44 PM
Yes, it needs more as the scripts do not know about the 'sr' language. It is on the f

Want to add Torjan's Norwegian translation to my original version. I've added the translation file lang_no.txt to /languages, and the flag link to w34_menu.php, but how many/which other scripts need changing?

This is not an important project, so if you tell me it's difficult I won't bother!

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 16, 2019, 04:28:21 PM
Want to add Torjan's Norwegian translation to my original version. I've added the translation file lang_no.txt to /languages, and the flag link to w34_menu.php, but how many/which other scripts need changing?

This is not an important project, so if you tell me it's difficult I won't bother!
The allowed languages : $lngsArr array in w34_common.php

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on April 16, 2019, 06:28:40 PM
The allowed languages : $lngsArr array in w34_common.php

Thanks, Wim. Working now  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Bunty on April 17, 2019, 08:19:37 AM
Mine works but with some problems.  It does not load when using https://stillwaterweather.com/pwsWD (https://stillwaterweather.com/pwsWD) Instead this error page come up which reads:   Not Found,  The requested URL /pwsWD/.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 But it does load when using https://stillwaterweather.com/pwsWD/index.php (https://stillwaterweather.com/pwsWD/index.php)

Another thing, in menu, I can't select between dark and light theme without getting the same error.  Same with the C button in the upper right corner.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 17, 2019, 10:00:06 AM
Mine works but with some problems.  It does not load when using https://stillwaterweather.com/pwsWD (https://stillwaterweather.com/pwsWD) Instead this error page come up which reads:   Not Found,  The requested URL /pwsWD/.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 But it does load when using https://stillwaterweather.com/pwsWD/index.php (https://stillwaterweather.com/pwsWD/index.php)

Another thing, in menu, I can't select between dark and light theme without getting the same error.  Same with the C button in the upper right corner.
That message is a standard "Apache" message
It is not normal that Apache is trying to load a   " .php"  script.

Check your cPanel settings or check with your provider.
Normally Apache loads   index.php  or index.html or index.htm  when no script or file is mentioned.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Tlowe on April 22, 2019, 03:33:00 PM
Does this version of W34 support the extra charts page? It was named "wxcharts.php" in the original W34. I have searched but can't find any info on the previous extra page of charts.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 22, 2019, 03:43:40 PM
Does this version of W34 support the extra charts page? It was named "wxcharts.php" in the original W34. I have searched but can't find any info on the previous extra page of charts.
There has been numerous extra pages and scripts. Some are added. such as WXSIM.

Please add your "requests for enhancements" to the "wish-list" topic, and include some sort of screenshot.
I am fairly new to these scripts and have no history of all extra's from the past.
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: Weather Display on April 22, 2019, 06:49:01 PM
http://www.weather-display.com/downloadfiles/wxcharts.zip
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on April 24, 2019, 12:10:52 PM
Hi,

Having a problem with my April rain popup date. Today is saying it is Friday the 24th, when it is Tues. How can this be fixed? Thanks.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 24, 2019, 12:24:03 PM
Hi,

Having a problem with my April rain popup date. Today is saying it is Friday the 24th, when it is Tues. How can this be fixed? Thanks.
Do you have a link / URL to your  pwsWD site? I need to access the site to check what the problem could be.

I attach the current version of the script, just to test if it removes the problem.
1. make a copy of your website version of w34_graph_xx.php
2. unzip attachment
3. upload the un-zipped version of w34_graph_xx.php replacing the one with the problem.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: jzinckgra on April 24, 2019, 12:50:52 PM
Do you have a link / URL to your  pwsWD site? I need to access the site to check what the problem could be.

I attach the current version of the script, just to test if it removes the problem.
1. make a copy of your website version of w34_graph_xx.php
2. unzip attachment
3. upload the un-zipped version of w34_graph_xx.php replacing the one with the problem.

Wim

yes, sorry about that: http://weather911.net/pwsWD/index.php (http://weather911.net/pwsWD/index.php)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on April 24, 2019, 12:59:00 PM
yes, sorry about that: http://weather911.net/pwsWD/index.php (http://weather911.net/pwsWD/index.php)
The attached version comes from http://wd34.weather-template.com/pwsWD/ , it is from the same release and works correct.

Please  try this script and let me know if the problem is solved.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 06:59:21 AM
Hi, my big temp disappears after a short time for some reason, refresh the page and it comes back,  also in the marked area, its foreign  text.
I am also trying to update the wind speed and direction to every 2 seconds, when i count it appears to be around 40 seconds yet in the settings they were set to 16 which does not match what its doing (40s) i changed them to 2 anyway but i have a feeling it might not even be that file (WD34_settings.php)?

I am using wd clientraw and wxsim

Thanks
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 12, 2019, 07:18:49 AM
Hi, my big temp disappears after a short time for some reason, refresh the page and it comes back,
Maybe: The temp script fails when there is an incomplete upload.
I could not replicate that. I waited about 10 automatic reloads and the area remains unaffected.
Questions:  What browser do you use? Does it happen with other browsers?  Which provider?
Quote
also in the marked area, its foreign  text.
There are a lot of "regional" languages for the DarkSky forecast. There is a setting nearly at the bottom where you select the language for the DarkSky forecast. After you change that and save the settings, please wait max 1 hour until the cached 9dutch) forecast is replaced  with one with your selected language
Quote
I am using wd clientraw
Thanks
Success, Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 07:35:57 AM
HI Wim, thank you for the reply, i am using Chrome on 2 laptops both and both do the same with the temp, very strange, when you say provider, i assume you mean, hostgator or 1and1 etc, well its my own Kimsufi server. I still have an older version running here (http://www.brecklandweather.com/PWS34-X5wxsim/) and that temp works ok

Regarding the forecast settings, its set to English (Which is the default) already, i didnt change that, i will wait for the hour to pass :)

I did amend my reply adding the part about the wind speed update times, i will like them at 2s and have adjusted the setting but the default was 16s, yet when i count it they are at about 40s so that does not match the default at 16. I have them at 2 second in the older version as show here (http://www.brecklandweather.com/PWS34-X5wxsim/), there are 3 pages that have the same settings so i changed all 3, perhaps i missed one :) wd34_settings.php, wd34_settings1.php and wd34_settings copy.php

The big temp appears to disappear after 5 minutes., just loaded MS Edge and IE9 and FF to test those
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 12, 2019, 08:02:43 AM
HI Wim, thank you for the reply, i am using Chrome on 2 laptops both and both do the same with the temp, very strange, when you say provider, i assume you mean, hostgator or 1and1 etc, well its my own Kimsufi server. I still have an older version running here (http://www.brecklandweather.com/PWS34-X5wxsim/) and that temp works ok
Those are totally different versions, much of the code is changed.

I will investigate deeper / longer. Maybe an incomplete load of the block contents.
Are other blocks affected, or do they look normal?
Quote
Regarding the forecast settings, its set to English (Which is the default) already, i didnt change that, i will wait for the hour to pass :)
http://www.brecklandweather.com/pwsWD/forecastDShourly_popup.php =>The texts are all in Dutch
./jsondata/darksky.txt => all in Dutch
So I think there is a typing error with the DarkSky API-key
You need that to display the bottom part of the current conditions block, that part shows the current/expected conditions for this/coming hour.
Quote
I did amend my reply adding the part about the wind speed update times, i will like them at 2s and have adjusted the setting but the default was 16s, yet when i count it they are at about 40s so that does not match the default at 16. I have them at 2 second in the older version as show here (http://www.brecklandweather.com/PWS34-X5wxsim/), there are 3 pages that have the same settings so i changed all 3, perhaps i missed one :) wd34_settings.php, wd34_settings1.php and wd34_settings copy.php
The individual refresh-times can be altered in w34_blocks.php
A fast check at http://www.brecklandweather.com/pwsWD/w34_blocks.php?sce=view  shows that the refresh-time is default 40 seconds.  External providers do not like  multiple users refreshing the blocks at 2 seconds as that involes loading multiple .PHP scripts and data-sets.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 08:17:50 AM
Thank you Wim, thats sorted the refresh times, i have no issues with my server and refresh times, for y clients at add them to a white list that prevents them from being affected by the firewall and cphulk, i/they could use 1 seconds (if wanted) and we wouldnt be affected. But yes, many providers do not like this but this is the benefit of having your own server, you can set it to how you like :)

Re the temp, all the browser return the same issue, thats FF, Chrome, IE and Edge

Re the dark sky side of things, i have just checked the api and the code is totally different to what it was when i used it for the previous script, very strange, i have updated it to the new api code and now awaiting any change, all the other blocks appear ok...

I have just clicked on the Nearby link and that opens the METAR, i have changed the airport in the settings and just double checked yet its still showing your default METAR (EBBR Brussels) perhaps ths has not cached yet?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 08:24:49 AM
Sorry wim, just noticed that the temp for the coming hour in that current conditions block (now its working) is about 16C too high
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 08:50:15 AM
Best to do a new reply in case you miss it, i left it on the light theme and the temp is still there after 12 minutes, so its just on the dark theme
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 12, 2019, 08:51:54 AM
Sorry wim, just noticed that the temp for the coming hour in that current conditions block (now its working) is about 16C too high
http://www.brecklandweather.com/pwsWD/_test.php?test=forecastDShourly_popup.php
Shows those "to high" temps.

Question: This is the data received from DarkSky: http://www.brecklandweather.com/pwsWD/jsondata/darksky.txt

Where are you located?  This is the latitude / longitude you used, according to DarkSky?
    [latitude] => 0.6136
    [longitude] => 52.4636
This is the answer from DarkSky in your browser: https://darksky.net/forecast/0.6136,52.4636/ca12/en
Middle of Nowhere

If you are in the UK somewhere near Brandon it should be switched.

Please do not use this type of timezone:  [timezone] => Etc/GMT-3
Use one of these https://www.php.net/manual/en/timezones.europe.php as they will switch automatically for daylight savings time.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 12, 2019, 09:03:39 AM
. . . shortened . .
I have just clicked on the Nearby link and that opens the METAR, i have changed the airport in the settings and just double checked yet its still showing your default METAR (EBBR Brussels) perhaps ths has not cached yet?
As others can not inspect your settings, did you enter the METAR api code in your settings?

You can check yourself all contents of the files
http://www.brecklandweather.com/pwsWD/w34_module_test.php
=> bottom left select "jsondata/metar34.txt"
==> click "List contents"
Code: [Select]
contents of "./jsondata/metar34.txt", processed as filetype "text file"
Filetime (UTC): 2019-03-29T16:40:44+00:00 which an age of 16 hrs 18 min 34 seconds
The filetimes show that the data is never refreshed.
==> click "Load files" at the bottom
Code: [Select]
w34_load_files.php (59) METAR not loaded API=ADD YOUR API KEYThe metar-api key was not entered as it still contains the default value.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 09:20:03 AM
http://www.brecklandweather.com/pwsWD/_test.php?test=forecastDShourly_popup.php
Shows those "to high" temps.

Question: This is the data received from DarkSky: http://www.brecklandweather.com/pwsWD/jsondata/darksky.txt

Where are you located?  This is the latitude / longitude you used, according to DarkSky?
    [latitude] => 0.6136
    [longitude] => 52.4636
This is the answer from DarkSky in your browser: https://darksky.net/forecast/0.6136,52.4636/ca12/en
Middle of Nowhere

If you are in the UK somewhere near Brandon it should be switched.

Please do not use this type of timezone:  [timezone] => Etc/GMT-3
Use one of these https://www.php.net/manual/en/timezones.europe.php as they will switch automatically for daylight savings time.

Wim

HA HA, yep, definitely not there, i wish, i took the long/lat from google, i will have another look at that, thanks,
(from Your location to 52.4633865, 0.6601383) i got it from the link in the settings, but i think i had them the wrong way round and missed off the - so corrected both, so must be a waiting game for it to cache now as the popup is still the same.

I didnt notice anything about a METAR api, just adding the airport code, so i will have another look at that too, (just done it and now working) thank you

Did you see the part about the temp disappearing being only on the Dark theme? no rush as the Light theme is ok :) thanks again for your time Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 09:35:16 AM
OK, looking good so far Wim, that erronous forecast temp is now down from 29C to a more UK realistic summer figure of 14C, yeah i know, go figure, it 30C+ most of last  years summer lol


I did test the temperature_small.php and when i 1st did so there was an error, but not since and i didnt record it, typical, it think it said line 480, i will monitor that, but if you ever need access to test this last big temp issue, i have no issues with that, just shout me and i will let ya know the password.

PS, love that test script, great addition :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 12, 2019, 09:39:17 AM
Best to do a new reply in case you miss it, i left it on the light theme and the temp is still there after 12 minutes, so its just on the dark theme
It seems that when running the dark theme. it sometimes happens that a global variable $theme does not keep its value.
It switches from "dark" to "???" => the scripts use "light" then
So when you start with dark the css for dark is loaded and the classes used in the code are correct in the css
Code: [Select]
<div class="circleOut">
<div class="temperaturecircle"></div>
<div class="temptextmild">12.1<suptemp>&deg;</suptemp></div>
</div><!-- end circleOut -->
When the change to "???" occurs the CSS loaded is still the dark one but the code now changes to
Code: [Select]
<div class="circleOut">
<div class="mild">  </div>
<div class="temptext">12.1<suptemp>&deg;</suptemp></div>
</div><!-- end circleOut -->
Those classes are not in the light-css so the colors are not displayed.

When starting with "light" light theme the light css is loaded.
When $theme changes to "???" there is no problem as the generated code remains the same.

===
I have multiple windows open on my test servers for over 30 minutes but the changes do not occur at my test-site.

Wim




Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on June 12, 2019, 09:48:43 AM
I have multiple windows open on my test servers for over 30 minutes but the changes do not occur at my test-site.

Happens a lot on the Calgary, Alberta test site. I presumed it was because you don't like to upload other people's data too often.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 09:52:53 AM
For me, it shows when starting with dark or light and starting with light and then switch to dark, i only know this for sure because ive only just done that with my tablet using Chrome browser, i have to nip off for a couple of hours so if i dont reply im not being rude.
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 12, 2019, 09:54:53 AM
Happens a lot on the Calgary, Alberta test site. I presumed it was because you don't like to upload other people's data too often.
But that one is default light-theme, I will switch it to dark and check.

I am checking if you override the default theme, how long the server remembers it.
After that the default switches in.
FOUND IT:
Code: [Select]
if (array_key_exists('theme', $_GET)
    && ($_GET['theme'] == 'dark' || $_GET['theme'] == 'light'))
     {  $theme = $_GET['theme'];
        SetCookie('theme', $theme, time()+ 600); }

The blocks are loaded without the theme,
Code: [Select]
http://wd34.weather-template.com/pwsWD/temperature_block.php?_=1560333164161so after 600 seconds without a refresh, the $theme switches back to the default.

Solution: For now set the line 158 of w34_settings.php from
Code: [Select]
        SetCookie('theme', $theme, time()+ 600); } to any value you see appropriate for "camping" visitors, example 10 hours
Code: [Select]
        SetCookie('theme', $theme, time()+ 36000); } Normal visitors who visit your site in the theme you choose yourself, do not have any problems.

I checked your avatar at the left of your post.
This whole problem occurs while you yourself set the avatar-globe to "http://www.brecklandweather.com/pwsWD/?theme=dark", but your settings to light.
Never occurred to me that your settings were default "light"
Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on June 12, 2019, 10:08:55 AM
But that one is default light-theme, I will switch it to dark and check.

Sorry, Wim, I always view dark theme  :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on June 12, 2019, 10:25:42 AM
I am checking if you override the default theme, how long the server remembers it.

I reckoned about 12 mins, but I wasn't watching all the time!

Quote
FOUND IT:

so after 600 seconds without a refresh, the $theme switches back to the default.

 =D&gt;
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: BWX on June 12, 2019, 12:19:55 PM
Thats great, thank you :)
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on June 30, 2019, 11:31:58 AM
Trying to get the 'test_image' in w34_frames.php (Atlantic Surface Analysis .png image) working in Jan release (url as left), but it won't come up.

I got it working immediately in the July release, so thought I would go back and enable it in my custom Jan release  :?
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on June 30, 2019, 11:57:09 AM
Trying to get the 'test_image' in w34_frames.php (Atlantic Surface Analysis .png image) working in Jan release (url as left), but it won't come up.
I got it working immediately in the July release, so thought I would go back and enable it in my custom Jan release  :?
I do not think the code to do that for that was already in the Jan release, and the internal code between April and July is changed also.

Wim
Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on June 30, 2019, 12:28:36 PM
I do not think the code to do that for that was already in the Jan release

It was in the changes you made on 9 January:

I changed the scripts to also include plain images without an iframe.
Attached zip, replace two scripts but do not forget to make a copy of the current scripts first.
You can check the result at http://wd34.weather-template.com/pwsWD/w34_start_frame.php?frame=TEST

But I'll check: my w34_frames.php is dated

$scrpt_vrsn_dt  = 'w34_frames.php|00|2019-01-09|'; # test img

but my w34_start_frame.php is still dated 26 December . . .

Title: Re: weather34 for WeatherDisplay (clientraw and WDapi)
Post by: bitsostring on June 30, 2019, 02:19:35 PM
It was in the changes you made on 9 January: [shortened] But I'll check

Long story short, I uploaded a copy of w34_start_frame.php (dated 2019-01-09) from the 2019-01-19 update .zip and everything seems to work OK.

My apologies  #-o
Title: *** closed ****weather34 for WeatherDisplay (clientraw and WDapi)
Post by: wvdkuil on July 12, 2019, 01:17:24 PM
The current (July) version of the scripts do no resemble anything of the 2017 versions of weather34 I started with.

Therefor it is better not to use the "weather34" text anymore to lessen the confusion.

I close this topic there are more recent topics  about HWS-Template WD34 version.

Wim