***closed*** weather34 for WeatherDisplay (clientraw and WDapi)

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.

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

I might have known! Thanks, 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.

I was beginning to wonder, too, because my old w34 graphs at /pwsold/ are OK. . . Lat/long OK, too.


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?


clientrawrain3.JPG

APIrain3.JPG

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

@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.


w34_graph_xx.php.zip (5.31 KB)

The delay is “time between clientraw uploads = ??” + “time rain block refresh = 50 seconds”

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
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?
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”
P.S. Can we have units for “Yesterday” rain, please?
Attached


rainfall_block.php.zip (4.11 KB)

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

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
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
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


forecastDS3days_block.php.zip (2.46 KB)

Many thanks, Wim. (And niko!)

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

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.)

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.

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.

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.

[Units] Attached

Many thanks.

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.

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.

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

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 *** closed*** HWS Template (WD34) Wish List 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

Thanks, Wim.

Where do I get the path for the clientraw.txt from? In the settings screen it asks for path?

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.


APIrain4.JPG

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.

=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

'+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

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