[rrd-users] Measuring rain from weatherstation

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sun Dec 7 23:40:09 CET 2014


> If you have the option of resetting the counter after an arbitrary 
> reading, then I could see a way of getting it more accurate.
>
> Read the value "quite often". While it is returning "<0.5" then assume 0. 
> When it switched to "<1" then use 0.5 and reset the counter. You will 
> potentially lose a tiny amount of rainfall, but you'd have to be resetting 
> the counter just at the point where the bucket tips (assuming it's a 
> tipping bucket system) - but unless your reading points are a long way 
> apart, that's unlikely.
>
> You now have a value that's normally 0 but "pulses" to 0.5 each time 0.5 
> units of rain are measured. My mind isn't working well enough right now to 
> work out the best way to put that into the RRD database.
> One thought is to accumulate "units" of rain into a file which is read by 
> your script that updates the rest of the weather parameters.
> Another is just to insert 0 or 0.5 at frequent intervals - you'll get a 
> spike each time the rainfall reaches 0.5mm, which can be averaged out by 
> RRD. Probably need to use derive and insert 0.5 followed by 0 one second 
> later.

As before: don't write to RRDtool unless the value tipped over to the next 
number.  There won't be spikes. The amount of rain will be divided by the 
amount of seconds since the last update.



More information about the rrd-users mailing list