gjr80 / weewx-saratoga

A WeeWX extension to support the Saratoga Weather Website Templates
GNU Affero General Public License v3.0
3 stars 2 forks source link

clientrawdaily.txt has too many values. #7

Open ktrue opened 3 years ago

ktrue commented 3 years ago

The clientrawdaily.txt has 442 entries defined in Weather-Display. The weewx-saratoga one has 470 entries in it.

I've attached the current (from Weather-Display 10.37Sb125) description file.

clientrawdescription.txt

gjr80 commented 3 years ago

I'm adding up the number of clientrawdaily fields in the linked document to 471 (that includes the optional 28 indoor temp fields and start and end fields). By my calculations:

1(12345) + 31(hi temp + 31(lo temp) + 31(rain) + 31(baro) + 31(wspeed) + 31(wdir) + 12(rain) + 31(humid) + 1(hr) + 1(min) + 1(day) + 28(temp) + 28(baro) + 28(humid) + 28(wdir) + 28(wspeed) + 28(solar) + 28(UV) + 1(rain) + 12(rain) + 28(optional intemp) + 1(EOR)

Have I got something wrong?

ktrue commented 3 years ago

Nope.. it's the (optional) Indoor Temperature fields in your record, that I didn't have in my WD clientrawdaily.txt I've added the descriptions to the table.

You've got the correct number of fields.

We do need to check that the fields have comparable content.

gjr80 commented 3 years ago

OK. Yes we (I) do need to check field content. When I was checking the extra fields I added to clientrawextra this morning I noticed a few fields that appeared to be obviously wrong. I guess we should get the structure correct (correct number of fields) and then I will work through checking the report template tag against content. I expect I will need to pick your brains though on some of the fields, for example

'Temp last 7 days (28 data points (4 per day)'

When we put these templates together some years ago it was a mix of best guesses, reverse engineering of existing WD files and interpretation of the description document. I am sure we we will find a number fields that are wrong.

ktrue commented 3 years ago

I'll send a note to Brian regarding what times the 4 data-points per day represent.

ktrue commented 3 years ago

Brian responded that the observation times are midnight, 6am, noon, 6pm for the last 7 days.

ktrue commented 3 years ago

I've updated the descriptions for the groups of 28 observations to reflect the Day -n @hh:mm legends.

Also, the values shown should be in clientraw*.txt units 'C,knots,hPa,mm' -- I think they're currently using the WEEWXtags units (F,mph,inHg,in)

gjr80 commented 3 years ago

Thanks for that. 0/6/12/18 is pretty straightforward, not sure that I can get those from an existing WeeWX tag though and might need to write a search list extension. Will be easy enough. Bit tied up today and astronomy tonight so going to be a Sunday job I suspect.

clientraws should be using fixed units, though daily, extra and hour use a lot of search list extensions which could (but shouldn’t) be using native database units or the defaults from weewx.conf `[StdReport] [[Defaults]]’

gjr80 commented 3 years ago

Fixed some temperature, wind speed and pressure field units in clientrawdaily.txt. A number of tags in the template did not have forced units so they were picking up default units from weewx.conf [StdReport] [[Defaults]]. For me that is C, km/h, hPa and mm ; km/h and knots are not that different so as to stand out as obviously wrong (as C and F do) so I guess that is why I missed that. Interesting that the template concerned is essentially the same as has been used for many years and this has never been noticed, could be due to the introduction of [StdReport] [[Defaults]] a few WeeWX versions ago I guess.

To update download the updated clientrawdaily.txt.tmpl using:

$ wget https://raw.githubusercontent.com/gjr80/weewx-saratoga/main/skins/Clientraw/clientrawdaily.txt.tmpl

and copy the downloaded file over the existing clientrawdaily.txt.tmpl

ktrue commented 3 years ago

Did the install.. looks better. Still some rogue units in the following areas:

233 | Temp Day -7@00:00 to 260 | Temp Day -1 @18:00 are in F (should be C)

261 | Baro Day -7 @00:00 to 288 | Baro Day -1 @18:00 are in inHg (should be hPa)

345 | Wind Speed Day -7 @00:00 to 372 | Wind Speed Day -1 @18:00 they should be in knots (not mph)

442 | (optional)Indoor Temp Day -7 @00:00 to 469 | (optional)Indoor Temp Day -1 @18:00 are in F (should be C)

ktrue commented 3 years ago

D'Oh.. ignore my above. I must have checked before the updates ran.

Looks fine now... sorry for the false alarm.

ktrue commented 3 years ago

One question about times when doing the database query. As I understand it, the database is kept in UTC (using unix epoch times).

When you do the queries for the 28 values using 00/06/12/18 as the hours, are those queries adjusted from 'local time' to UTC so they correctly show the values at local time 00/06/12/18?