You've commented out the relevant code (in _augment_packet()), but it looks
to me like you're doing it the right way.

The only type that needs to be emitted is 'rain', but it's always a good
idea to augment the packet with anything else that can be relied on. So,
you might consider emitting 'totalRain' as well. It can always be
calculated from the database, but some people like to store it in the
database along with 'rain'.

I couldn't quite parse your sentence about whether the number of bucket
tips needs to be reset once in a while, or need *not* be reset. Assuming
the former, and assuming it's an unsigned integer, you could just let it
roll over, which calculate_rain() will detect.

Hope that helps. Not sure I answered your question.



On Sun, Jan 17, 2021 at 3:16 AM [email protected] <[email protected]>
wrote:

> Hello all!
>
> So, I've beed doing some searching & reading about how WeeWX handles rain
> data from various weather station devices. However, it's not clear to me
> what would the right strategy be in my case.
>
> I'm using a Microbit climate kit <https://www.sparkfun.com/products/16274> and
> wrote a custom microbit program to serialise and send weather data through
> USB to a Raspberry pi which feeds it to WeeWX. Similarly, I used
> weesx-arduino-weather-station
> <https://github.com/wrybread/weewx-ArduinoWeatherStation> driver as a
> base driver and modified it for my case. I also read how HP1000 driver
> handles rain (I read it in a previous post in this forum if I remember
> correctly) but I can't say I found it enlightening (it probably has to with
> my level of comprehension for WeeWX code).
>
> I attach my version of the driver. It's as simple as I my mind could
> program it. Please do not pay attention to my current way of reading rain
> data. I know it doesn't work. If I only correct the data binding, WeeWX
> stores rain data incrementally for every LOOP packet, as expected.
>
> Subsequently, my question is *not* how to retrieve rain data from the
> weather station, rather than how to feed it to WeeWX in order to get
> meaningful observations. The limitations on my microbit weather station are
> these:
> * No real time clock available on Microbit. I could use uptime, but it's
> not so useful as the microbit refuses to work properly every few days, so
> it needs to be reset. I could reset it manually with a cronjob if needed.
> * Rain data from the weather station only includes one number = bucket
> tips (which I convert to mm on microbit) which can only go up until
> microbit is reset - and it *needs* not be reset once in a while.
>
> How does one handle the last_rain, total_rain and rain data in WeeWX? The
> official documentation did not answer my question so if you could point me
> on the right direction or ideally describe the strategy I should follow, it
> would be great!
>
> Thank you all for your time! Cheers!
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/00e5c25d-87c8-4f1d-91ce-2effcb98761an%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/00e5c25d-87c8-4f1d-91ce-2effcb98761an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDG8Dz8PAHPbDqHQ81aBdAonywBw28WUDaAWP8KJ%3DQgMw%40mail.gmail.com.

Reply via email to