BobAtchley / weewx-ws6in1

weewx driver for the 6 in 1 PC weather station clones
GNU General Public License v3.0
5 stars 6 forks source link

Rain spikes with full data buffer #15

Open BobAtchley opened 9 months ago

BobAtchley commented 9 months ago

See this thread: https://groups.google.com/g/weewx-user/c/rIbaSfEgpFs

It would appear that if the weather station consul data buffer is full the final entry of the data buffer is overwritten with the days rain accumulation. For a situation where power is lost there are several use cases 1) power outage starts before midnight. In this case when power is restored the rain accumulation is useful as it provides the amount of rain that was missed (but not when it occurred within the power outage) 2) No rain before or during the outage - rain accumulation will be 0mm so all good 3) No rain before the power outage but some during 4) Some rain before the outage, no rain during the outage 5) Some rain before the outage, some during the outage

The driver is limited in what it can do 1) it does not have information on when the outage started 2) it does not have information on the amount of rain recorded before the outage I could get the driver to read the database to get the data before the outage, but that will make it much more complicated feels wrong. My simple answer is 1) recognise that the data buffer is full so that the last entry different to the normal delta entries, 2) Log this as a warning to the error logs (which allows the user to something about it manually) 3) discard the data entry (it causes errors if treated in the normal way)

The fundamental issue is not with the weather station or the driver, but with the user who has allowed the data buffer to become full

BobAtchley commented 9 months ago

I have been able to repeat this issue: 1) Waited 50 days and then a wet day 2) Stopped weewx, 3) ran the csv uillity 4) Set weewx debug to 1 5) Restarted weewx

The csv utility shows that no extraneous data was recorded in the data buffer (last date/time was 9 Feb as expected) Examination of the logs shows that, as expected, no data was 'yielded' to weewx main loop from the data buffer. But it also shows the first 'yielded' data from the main loop contained an erroneous value of 6.8mm with a rain rate of 0.0, and the second one contained a rain value of 0 but a rain rate 27.2.

This is a 'feature' of these weather stations. The information could be useful if one had a long power outage - although note actual rain from midnight was 14.2 mm, so 6.8 reading is ... strange.

Probably best approach is to ignore the first 2 main loop readings that would have yielded these values.

But real fix is not to let the buffer get full !!!!!!!!

BobAtchley commented 9 months ago

Version 1.05 now suppresses the first 2 packets read from the weather station console. Tested and extraneous rain values no longer added