cloudy cloudy

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

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

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

Offline wvdkuil

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

Offline bitsostring

  • Posts: 1,050
  • Oregon Scientific WMR200
  • Edinburgh, U.K.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 64.0.3282.140
    • Home Weather Station
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #47 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.


« Last Edit: January 04, 2019, 05:42:39 PM by bitsostring »
It's meant to be fun. . .

Offline R_o_B

  • Posts: 347
  • Maple Bay, British Columbia, Canada
  • OS/Browser:
  • Win NT 10.0
  • Firefox 52.0
    • Tzouhalem-Maple Bay Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #48 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.
R_o_B
---
eMail: [email protected]

Offline wvdkuil

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

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,580
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 71.0.3578.98
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #50 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.

Offline wvdkuil

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

Offline eb3bvb

  • Posts: 157
  • Torrelavega, Cantabria
  • OS/Browser:
  • Win NT 10.0
  • Firefox 64.0
    • meteotorrelavega
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #52 on: January 03, 2019, 06:38:51 PM »
Hi, changed the script:
w34 livedata.php
has not given an error
Thank you
Emilio

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,580
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Mac OS X 10.10.5
  • Chrome 71.0.3578.98
    • Traveling RV Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #53 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:

Offline Weather Display

  • Posts: 87,468
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 71.0.3578.98
    • Weather Display
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #54 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?
« Last Edit: January 03, 2019, 06:59:49 PM by Weather Display »

Offline eb3bvb

  • Posts: 157
  • Torrelavega, Cantabria
  • OS/Browser:
  • Win NT 10.0
  • Firefox 64.0
    • meteotorrelavega
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #55 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

Offline R_o_B

  • Posts: 347
  • Maple Bay, British Columbia, Canada
  • OS/Browser:
  • Win NT 10.0
  • Firefox 52.0
    • Tzouhalem-Maple Bay Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #56 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!  :?
R_o_B
---
eMail: [email protected]

Offline wvdkuil

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

Offline wvdkuil

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

Offline R_o_B

  • Posts: 347
  • Maple Bay, British Columbia, Canada
  • OS/Browser:
  • Win NT 10.0
  • Firefox 52.0
    • Tzouhalem-Maple Bay Weather
Re: weather34 for WeatherDisplay (clientraw and WDapi)
« Reply #59 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:
R_o_B
---
eMail: [email protected]