HWS-template (WD34) July version available

Hi,
Just installed installed the latest version and I an not get the WXSIM for cast to work. I am using Weather Display Clientraw for real time data and that working okay. In easyweather setup I have WXSIM set for the forecast under Options for top row module 2 & 3. Is there a need to manually edit some files to point to the location of the plaintext.txt file? I see nowhere in Easyweather setup to enter the path for plaintext.txt as I do for clientraw.txt .

Regards
Jerry
newbeithweather.com

you may need to edit wxsimPP/plaintext-parser.php

As @blainec mentioned in the previous post, you have to configure the original wxsim-parser script.
And you need the WXSIM windows program running and uploading also.

These are the original Ken True stand-alone WXSIM scripts, without any modification. That way you can “drop in” a new version if Ken has an update.
And you can always test the original script,
http://newbeithweather.com/pwsWD/wxsimPP/plaintext-parser.php
and include it on a page in the menu. :smiley:

The only drawback is that you have to set the correct location of the plaintext file in line 133 of plaintext-parser.php :wink:

$plaintextFile = '../../plaintext.txt'; 

This default setting points to the root folder of your website ( => newbeithweather.com/ )

It seems your plaintext.txt file is in http://newbeithweather.com/pwsWD/wdisplay/plaintext.txt Change the line 133 to

$plaintextFile = '../wdisplay/plaintext.txt'; 

The “…/” drops the file pointer from the wxsimPP/ folder ( were the wxsim script “lives” ) to the pwsWD/ folder
The “wdisplay/” moves the pointer up into that folder so the script can find the plaintext.txt file it needs.

Success, Wim

I’m almost sorry to bother someone again, but I can’t figure this out myself -

Now my template is mysterious again.

  • It sometime reports offline, although w34_cron_stationcron.php is run every 5 minutes.

  • Today data are completely “impossible”. My chartsmydata/today.txt looks weird. When I run w34_cron_stationcron.php, data seems to be added for a completely random time, for example for a time on August 14th. Until 0:55 it looks right, then it goes wrong. Well, it must be WU sending wrong data ??

  • In addition, - chart for wind month after August 25, wind strength is higher than gust

weather.inaogmogens.dk

Mogens

To me, that seems to be a WU problem (99%) or maybe a problem with your API-key (< 1%)
Debug console "weather.inaogmogens.dk"
=>left bottom your recent data from wu file “./jsondata/wucom.txt” is already selected, so click “List contents”,
I click that and the big box shows:

Filetime (UTC): 2019-08-28T09:10:44+00:00 which an age of 0 hrs 01 min 27 seconds

So the file is just retrieved (current file time) BUT look at the contents
=>The line with “List this file as” click on "Expand it as json "

                    [stationID] => IDKFREDE2
                    [obsTimeUtc] => 2019-08-27T20:59:44Z
                    [obsTimeLocal] => 2019-08-27 22:59:44
                    [neighborhood] => Kvissel Braending
                    [softwareType] => WS-1002 V2.4.4
                    [country] => DK
                    [solarRadiation] => 0
                    [humidity] => 87
                    [qcStatus] => 1
                    [metric] => Array

When I reload the files with the bottom selector labeled “Load external files” and => click on “Load files”,
=> the file is retrieved at Filetime (UTC): 2019-08-28T09:20:33+00:00 which an age of 0 hrs 00 min 24 seconds
And the date/time is now

                    [stationID] => IDKFREDE2
                    [obsTimeUtc] => 2019-08-28T09:20:16Z
                    [obsTimeLocal] => 2019-08-28 11:20:16

Not much what you or I can do. Sometimes recent data, sometimes old data is retrieved from WU.
Just check if the retrieved data is stalled again, later on.
You can also use this link in your browser to check if there are error messages, replace “_YOUR_API_KEY_HERE” with your WU-api key
https://api.weather.com/v2/pws/observations/current?stationId=IDKFREDE2&format=json&units=m&numericPrecision=decimal&apiKey=_YOUR_API_KEY_HERE

Sometimes the data is invalid and the dashboard is half empty or a white page with invalid data
Can you PM me your WU API key as I always get correct data with my key.

My own key also fails. Definitely a problem with WU

Now I get this message:

{"metadata":{"transaction_id":"8838963446811046191"},"success":false,"errors":[{"error":{"code":"AKI-0001","message":"Weather Company API is currently unavailable."}}]}

Wim

The parser works OK now.
BUT my script expects at least 8 forecasts, yours has 7

So change the line 43 in fpwsWD/orecastWXSIMblock.php from

if (!isset ($arr_pp) || count ($arr_pp) < 8 ) {echo '<b style="color: red;"><small>wxsim file not ready</small></b>'; return;}

to

if (!isset ($arr_pp) || count ($arr_pp) < 6 ) {echo '<b style="color: red;"><small>wxsim file not ready</small></b>'; return;}

That check makes sure that the complete wxsim forecast is uploaded. Sometimes the uploading of the large WXSIM forecast-files takes so much time that an incomplete forecast is processed.

Wim

Thanks Wim, It’s working fine now. Thank you much for your help.

Regards
Jerry

:oops: Forget, you have to change two other lines also, for the popups in the wxsim forecast block.
forecastWXSIMdaily_popup.php and forecastWXSIMtext_popup.php both change line 39 from

if (!isset ($arr_pp) || count ($arr_pp) < 8 )   // check if correct plaintext.txt  was found and processed

to

if (!isset ($arr_pp) || count ($arr_pp) < 6 )   // check if correct plaintext.txt  was found and processed

Wim

I saw that the popups went working after i made the last post. I just edited the 2 popup files and all is well now, I think :roll:
Thank you

Regards

Jerry

Looks like WU is sending correct data again
weather.inaogmogens.dk

At 4:50 p.m.
I was too early to write …
There are still problems, but it looks better than it did yesterday

A “sneak preview”, still working on it.
A history script only using ones own data.
Script one:
All yearly data from WU is loaded from WU and stored in a folder on the webserver
All yearly files (mostly the 2019 one) are checked for missing lines which are retrieved using the WU-API-
The updated yearly files are read to find the high-lows for this month, this year and all-time
All this history will have the same units as the weather-program uses
The data for temp, rain, humidity, dewpoint, pressure, wind, gust coming from WU are stored in 1 file chartsmydata/history.txt

The station-cron job updates the history.txt and will also add UV and solar if the station uses those sensors.

The addtoyear-cron will move todays values to yesterdays values
The empty-cron will clear the month values (every 1st day of a month) and the year values (every Jan 1st).
It should also save 3 monthly backups and 3 yearly backups.

ToDo
Live-data script should use the history table for missing fields with some weather-programs
Write a script to update the history when f.i. there are errors in the WU data.

Demo history script: https://www.weerstation-herent.be/pws07/ => in the “Current Conditions block” bottom area.

Beta: will be available September 7, including history and all updates so far.

Wim


Looks good, Wim, but I’m also interested in the rain radar pop-up I’ve just noticed on your clientraw demo site. . . When is that going to be available?

$blck_ppp [$script][]   = array ('show' => true,      'popup' => 'rain_popup.php',    'chartinfo' => 'popup',   'text' => lang('Rain radar') );

I think it was already discussed, but maybe on the dutch forum.
It is a copy of the webcam pop-up, adapted for a rain-radar image

Wim


rain_popup.php.zip (1.76 KB)

Thanks, Wim :slight_smile:

I’ll just get rid of the big X top left so I can read the time. . .

Hi Wim

(Doh!) I have just noticed a little more information in the October requests post… Please ignore the following if you wish however it would be good for more detail on the setup. I suspect the NexstormNG software maybe the route to take…I am quite happy to be a tester if needed…

Another question please. I have just re-installed my Stormtracker PCI system and it is now running. I see that we can use the output on the template. I have searched but cannot find where to find or generate the NSRealtime.txt file. I have the old version of nexstorm (v1.9) running. Would it be better if I have the new NexstormNG software instead. Will this give better and more meaningful data?

Just love the template, is there a way to send a few “beer” tokens to thank you for your efforts?

Cheers

Jon

Sorry, it was waiting for more test-files.
In easyweather, settings for Boltek according te image
Can you test this script with your files?

Wim


boltek_c_small.php.zip (3.12 KB)

In my chart for wind today and wind month:
Since August 26, winds and gusts have been swapped.
The ./chartsmydata/today.txt file also appears to have swapped values.

Data received with
https://api.weather.com/v2/pws/observations/current?stationId=IDKFREDE2&format=json&units=m&numericPrecision=decimal&apiKey=_MY_API-key_
looks real.

Is this something I can fix myself - and possibly how?

weather.inaogmogens.dk


Thanks for finding this error, which occurs only for stations who get their data from WU.
And use their website to store the graphs data, as you are doing from August 26.
Attached an updated script

Wim


w34_livedata.php.zip (8.66 KB)

Thank you very much
The latest lines in ./chartsmydata/today.txt now look real - just like the latest part of the chart.
Mogens

Hi Wim,

Will do. I need to spend some time with the nexstorm system which will be tomorrow I suspect. I am just setting up bind for the home network…

Jon