te923 driver rain calculation is missing data

46 views
Skip to first unread message

mph

unread,
Aug 19, 2019, 4:36:46 PM8/19/19
to weewx-user

dayrain.png

Hello,

today it was a bit rainy here and my weather station Garni 857 (Hideki clone) is showing the 24h rain volume as 9.8 mm (14 bucket tips of 0.7 mm each).
But weewx shows just 7.9 mm of rain (12 bucket tips with weewx/te923 driver bucket volume correction 0.7 -> ~0.65 mm).

Seems that 2 of the bucket tips are lost by weewx/te923 driver.

The today weewx rain history is visible on the attached image.
Please, see attached txt file with almanac read from the station using wee_device --history.
Only the changes of the "rain" value are included.
At the end of the file is copy of the result of wee_device --current call.

The "rain" field changed from 265 to 279 tips in last 24 hours.
But weewx image shows just 12 tips.

My weather system is backed-up and there's no drop or loss in the weather data.

Any suggestions?

Thank you
Pavel
almanac.txt

Andrew Milner

unread,
Aug 19, 2019, 10:26:18 PM8/19/19
to weewx-user
My suggestion is that the first reading of the day is probably at 267 - the first reading you posted (265) is from 10 minutes before the hour.  Not knowing your timezone it is hard to be certain.  Remember though that a reading timed at 00:00 contains data FOR THE PRECEDING PERIOD, so would be for the previous day.

mph

unread,
Aug 20, 2019, 12:13:23 AM8/20/19
to weewx-user
Hello Andrew,

thank you for your answer.
The time period shouldn't be the problem, because the first reading form alamanac - 265 - is at dateTime: 1566161340 = Sunday 18. August 2019 20:49:00
The latest reading - 279 - is at dateTime: 1566235140 = Monday 19. August 2019 17:19:00. My timezone is +2 GMT (22:49-19:19 local time).

So this is clearly less than 24 hours. Even on the picture you may see, that all the records fall between Aug 18th 21:00 and Aug 19th 21:00.
I am not writing about the rain "Today", but about the rain "In the past 24 hours". That means $span($day_delta=1).rain.sum, not the $day.rain.sum by weewx language.

I could decode all the timestamps in the records to find exactly these "lost" ticks of course, but it is not necessary I think.


mph

Dne úterý 20. srpna 2019 4:26:18 UTC+2 Andrew Milner napsal(a):

mph

unread,
Aug 20, 2019, 1:02:07 AM8/20/19
to weewx-user
Ok,

I've decoded all the almanac data and there is an excerpt:

01:19:00, 265   ticks
01:49:00, 267 = 2
02:19:00, 268 = 1
02:49:00, 271 = 2
04:49:00, 272 = 1
05:49:00, 273 = 1
07:49:00, 274 = 1
08:19:00, 275 = 1
10:49:00, 276 = 1
19:19:00, 279 = 3

As you may see, my almanac has 30 min interval, all times are local time.
Between 01:19 and 03:00 local time there are 5 ticks recorded, but weewx shows just 4 ticks. This is one missing tick.

The fact is, that at 02:17 local time my RPi is backing up the weewx database to local file server. It took less than one minute and I am doing it "safe way" - weewx stop/DB copy/weewx start.
But if the weewx/te923 driver is losing tick in that period, then theres something wrong - current station data always show actual tick count and it is correct.
Seems there may be a problem with "tick-delta" calculation.

Maybe upon service restart the weewx/te923 driver should read the latest recorded tick count and then start to compute the delta ticks from current loop record.


mph


Dne pondělí 19. srpna 2019 22:36:46 UTC+2 mph napsal(a):

Andrew Milner

unread,
Aug 20, 2019, 1:46:20 AM8/20/19
to weewx-user
what are the database values for rain?

not sure what the almanac is - or do you mean database?  does your database store rain, ticks or both?

mph

unread,
Aug 20, 2019, 2:55:13 AM8/20/19
to weewx-user
I am sorry, I don't have acces to my weewx database now.
I will check and post the database data later.

The almanac is the set of historic records stored in the weather station internal memory.
It can be (and actualy was) obtained by calling wee_device --history
The almanac records are very similar to - if not the same as - loop records obtained via USB connection by weewx.


mph

Dne úterý 20. srpna 2019 7:46:20 UTC+2 Andrew Milner napsal(a):

Andrew Milner

unread,
Aug 20, 2019, 3:46:26 AM8/20/19
to weewx-user
Right - so the almanac is the logger in the station

Is the almanac the same as the LOOP data or the REC data?  Does weewx build a record for the database or does the hardware provide the REC data for the database record?

It seems to me that you probably need to run with debug enabled (maybe debug=2) and see what exactly happens when you stop and start weewx.  You certainly need to determine exactly what is passed from the station to the driver and onward into weewx and the database under those conditions.  Of course weewx will be using whatever is in the database for generating plots - so knowing what exactly is in the database (compared to in the logger) may prove helpful information.

Sorry - but there seem to many unknowns to just guess - maybe the TE923 author has additional input/information.


Good luck

gjr80

unread,
Aug 20, 2019, 4:23:15 AM8/20/19
to weewx-user
Hi,

Andrew is right you are going to have to look at the TE923 driver. However, I think what you need to see is what the driver is picking up from your station and how this data is decoded (WeeWX will just be processing the data fed by the driver so you probably won’t find out too much more than you already know by looking at the loop/archive data coming out of the driver). Fortunately the TE923 driver has one additional debug features. Edit weewx.conf and set debug=1, then go down to the [TE923] stanza and set debug_decode=true. Save weewx.conf and restart WeeWX.

If you look in the log you should now see the raw data being read from the station as well as the decoded data obtained from the raw data. Unfortunately it’s all or nothing, you can’t just display the rain data - you will see everything so you are going to have a lot of log info to wade through. You should be able to reconcile your almanac data against the decoded data and hopefully gain some insight into what is happening.

Gary
Reply all
Reply to author
Forward
0 new messages